diff --git a/README.markdown b/README.markdown index 1952b214..42c6b6cc 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,3 @@ -# Serendipity - a PHP Weblog/Blog software - -[Serendipity](http://s9y.org) is a PHP-powered weblog application which gives the user an easy way to maintain an online diary, weblog or even a complete homepage. While the default package is designed for the casual blogger, Serendipity offers a flexible, expandable and easy-to-use framework with the power for professional applications. +# Serendipity - A reliable, secure & extensible PHP blog +[Serendipity](https://s9y.org) is a PHP-powered weblog engine which gives the user an easy way to maintain a blog. While the default package is designed for the casual blogger, Serendipity offers an expandable framework with the power for professional applications. \ No newline at end of file diff --git a/bundled-libs/Cache/Lite.php b/bundled-libs/Cache/Lite.php index c74eb243..5770f3d1 100644 --- a/bundled-libs/Cache/Lite.php +++ b/bundled-libs/Cache/Lite.php @@ -19,8 +19,8 @@ * * @package Cache_Lite * @category Caching -* @version $Id: Lite.php,v 1.54 2009/07/07 05:34:37 tacker Exp $ * @author Fabien MARTY +* @author Markus Tacker */ define('CACHE_LITE_ERROR_RETURN', 1); @@ -247,6 +247,12 @@ class Cache_Lite * @var boolean */ var $_errorHandlingAPIBreak = false; + + var $_hashedDirectoryGroup = NULL; + + var $_cacheFileMode = NULL; + + var $_cacheFileGroup = NULL; // --- Public methods --- @@ -272,16 +278,30 @@ class Cache_Lite * 'hashedDirectoryLevel' => level of the hashed directory system (int), * 'hashedDirectoryUmask' => umask for hashed directory structure (int), * 'errorHandlingAPIBreak' => API break for better error handling ? (boolean) + * 'hashedDirectoryGroup' => group of hashed directory structure (int | string) (see function chgrp) + * 'cacheFileMode' => filesystem mode of newly created cache files (int) + * 'cacheFileGroup' => group of newly created cache files (int | string) (see function chgrp) * ); + * + * If sys_get_temp_dir() is available and the + * 'cacheDir' option is not provided in the + * constructor options array its output is used + * to determine the suitable temporary directory. + * + * @see http://de.php.net/sys_get_temp_dir + * @see http://pear.php.net/bugs/bug.php?id=18328 * * @param array $options options * @access public */ - function Cache_Lite($options = array(NULL)) + function __construct($options = array(NULL)) { foreach($options as $key => $value) { $this->setOption($key, $value); } + if (!isset($options['cacheDir']) && function_exists('sys_get_temp_dir')) { + $this->setOption('cacheDir', sys_get_temp_dir() . DIRECTORY_SEPARATOR); + } } /** @@ -295,7 +315,7 @@ class Cache_Lite */ function setOption($name, $value) { - $availableOptions = array('errorHandlingAPIBreak', 'hashedDirectoryUmask', 'hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode'); + $availableOptions = array('errorHandlingAPIBreak', 'hashedDirectoryUmask', 'hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode', 'hashedDirectoryGroup', 'cacheFileMode', 'cacheFileGroup'); if (in_array($name, $availableOptions)) { $property = '_'.$name; $this->$property = $value; @@ -329,7 +349,7 @@ class Cache_Lite } if ($this->_onlyMemoryCaching) { return false; - } + } } if (($doNotTestCacheValidity) || (is_null($this->_refreshTime))) { if (file_exists($this->_file)) { @@ -376,8 +396,8 @@ class Cache_Lite } } if ($this->_automaticCleaningFactor>0 && ($this->_automaticCleaningFactor==1 || mt_rand(1, $this->_automaticCleaningFactor)==1)) { - $this->clean(false, 'old'); - } + $this->clean(false, 'old'); + } if ($this->_writeControl) { $res = $this->_writeAndControl($data); if (is_bool($res)) { @@ -387,7 +407,7 @@ class Cache_Lite // if $res if false, we need to invalidate the cache @touch($this->_file, time() - 2*abs($this->_lifeTime)); return false; - } + } } else { $res = $this->_write($data); } @@ -534,7 +554,7 @@ class Cache_Lite */ function raiseError($msg, $code) { - include_once dirname(__FILE__) . '/../PEAR.php'; + include_once('PEAR.php'); return PEAR::raiseError($msg, $code, $this->_pearErrorMode); } @@ -599,7 +619,7 @@ class Cache_Lite $motif = ($group) ? 'cache_'.$group.'_' : 'cache_'; } if ($this->_memoryCaching) { - foreach($this->_memoryCachingArray as $key => $v) { + foreach($this->_memoryCachingArray as $key => $v) { if (strpos($key, $motif) !== false) { unset($this->_memoryCachingArray[$key]); $this->_memoryCachingCounter = $this->_memoryCachingCounter - 1; @@ -613,7 +633,7 @@ class Cache_Lite return $this->raiseError('Cache_Lite : Unable to open cache directory !', -4); } $result = true; - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (($file != '.') && ($file != '..')) { if (substr($file, 0, 6)=='cache_') { $file2 = $dir . $file; @@ -654,7 +674,19 @@ class Cache_Lite } return $result; } - + + /** + * Touch the cache file while are recreating it to avoid + * launch this task more then once when necessary + * When the cache recreated and Added in Cache Memory + * @return void + * @access private + */ + function _touchCacheFile(){ + if (file_exists($this->_file)) { + @touch($this->_file); + } + } /** * Add some date in the memory caching array * @@ -663,6 +695,7 @@ class Cache_Lite */ function _memoryCacheAdd($data) { + $this->_touchCacheFile(); $this->_memoryCachingArray[$this->_file] = $data; if ($this->_memoryCachingCounter >= $this->_memoryCachingLimit) { list($key, ) = each($this->_memoryCachingArray); @@ -707,8 +740,8 @@ class Cache_Lite function _read() { $fp = @fopen($this->_file, "rb"); - if ($this->_fileLocking) @flock($fp, LOCK_SH); if ($fp) { + if ($this->_fileLocking) @flock($fp, LOCK_SH); clearstatcache(); $length = @filesize($this->_file); $mqr = get_magic_quotes_runtime(); @@ -718,9 +751,13 @@ class Cache_Lite if ($this->_readControl) { $hashControl = @fread($fp, 32); $length = $length - 32; - } + } + if ($length) { - $data = @fread($fp, $length); + $data = ''; + // See https://bugs.php.net/bug.php?id=30936 + // The 8192 magic number is the chunk size used internally by PHP. + while(!feof($fp)) $data .= fread($fp, 8192); } else { $data = ''; } @@ -760,13 +797,29 @@ class Cache_Lite for ($i=0 ; $i<$this->_hashedDirectoryLevel ; $i++) { $root = $root . 'cache_' . substr($hash, 0, $i + 1) . '/'; if (!(@is_dir($root))) { - @mkdir($root, $this->_hashedDirectoryUmask); + if (@mkdir($root)) + { + @chmod($root, $this->_hashedDirectoryUmask); + if (! is_null($this->_hashedDirectoryGroup)) + @chgrp($root, $this->_hashedDirectoryGroup); + } } } } + // if both _cacheFileMode and _cacheFileGroup is null, then we don't need to call + // file_exists (see below: if ($is_newfile) ...) + $is_newfile = (! is_null($this->_cacheFileMode) || !is_null($this->_cacheFileGroup)) + && ! @file_exists($this->_file); $fp = @fopen($this->_file, "wb"); if ($fp) { if ($this->_fileLocking) @flock($fp, LOCK_EX); + if ($is_newfile) + { + if (! is_null($this->_cacheFileMode)) + @chmod($this->_file, $this->_cacheFileMode); + if (! is_null($this->_cacheFileGroup)) + @chgrp($this->_file, $this->_cacheFileGroup); + } if ($this->_readControl) { @fwrite($fp, $this->_hash($data, $this->_readControlType), 32); } @@ -781,7 +834,7 @@ class Cache_Lite if ($this->_fileLocking) @flock($fp, LOCK_UN); @fclose($fp); return true; - } + } return $this->raiseError('Cache_Lite : Unable to write cache file : '.$this->_file, -1); } @@ -831,5 +884,3 @@ class Cache_Lite } } - -?> diff --git a/bundled-libs/Cache/Lite/File.php b/bundled-libs/Cache/Lite/File.php new file mode 100644 index 00000000..d8ca31c1 --- /dev/null +++ b/bundled-libs/Cache/Lite/File.php @@ -0,0 +1,90 @@ + +*/ + +require_once('Cache/Lite.php'); + +class Cache_Lite_File extends Cache_Lite +{ + + // --- Private properties --- + + /** + * Complete path of the file used for controlling the cache lifetime + * + * @var string $_masterFile + */ + var $_masterFile = ''; + + /** + * Masterfile mtime + * + * @var int $_masterFile_mtime + */ + var $_masterFile_mtime = 0; + + // --- Public methods ---- + + /** + * Constructor + * + * $options is an assoc. To have a look at availables options, + * see the constructor of the Cache_Lite class in 'Cache_Lite.php' + * + * Comparing to Cache_Lite constructor, there is another option : + * $options = array( + * (...) see Cache_Lite constructor + * 'masterFile' => complete path of the file used for controlling the cache lifetime(string) + * ); + * + * @param array $options options + * @access public + */ + function __construct($options = array(NULL)) + { + $options['lifetime'] = 0; + parent::__construct($options); + if (isset($options['masterFile'])) { + $this->_masterFile = $options['masterFile']; + } else { + return $this->raiseError('Cache_Lite_File : masterFile option must be set !'); + } + if (!($this->_masterFile_mtime = @filemtime($this->_masterFile))) { + return $this->raiseError('Cache_Lite_File : Unable to read masterFile : '.$this->_masterFile, -3); + } + } + + /** + * Test if a cache is available and (if yes) return it + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return string data of the cache (else : false) + * @access public + */ + function get($id, $group = 'default', $doNotTestCacheValidity = false) + { + if ($data = parent::get($id, $group, true)) { + if ($filemtime = $this->lastModified()) { + if ($filemtime > $this->_masterFile_mtime) { + return $data; + } + } + } + return false; + } + +} diff --git a/bundled-libs/Cache/Lite/Function.php b/bundled-libs/Cache/Lite/Function.php index 9e1ce28f..0814b58f 100644 --- a/bundled-libs/Cache/Lite/Function.php +++ b/bundled-libs/Cache/Lite/Function.php @@ -11,12 +11,11 @@ * Technical choices are described in the 'docs/technical' file * * @package Cache_Lite -* @version $Id: Function.php,v 1.11 2006/12/14 12:59:43 cweiske Exp $ * @author Sebastian BERGMANN * @author Fabien MARTY */ -require_once dirname(__FILE__) . '/../Lite.php'; +require_once('Cache/Lite.php'); class Cache_Lite_Function extends Cache_Lite { @@ -82,7 +81,7 @@ class Cache_Lite_Function extends Cache_Lite * @param array $options options * @access public */ - function Cache_Lite_Function($options = array(NULL)) + function __construct($options = array(NULL)) { $availableOptions = array('debugCacheLiteFunction', 'defaultGroup', 'dontCacheWhenTheOutputContainsNOCACHE', 'dontCacheWhenTheResultIsFalse', 'dontCacheWhenTheResultIsNull'); while (list($name, $value) = each($options)) { @@ -92,7 +91,7 @@ class Cache_Lite_Function extends Cache_Lite } } reset($options); - $this->Cache_Lite($options); + parent::__construct($options); } /** @@ -207,5 +206,3 @@ class Cache_Lite_Function extends Cache_Lite } } - -?> diff --git a/bundled-libs/Cache/Lite/NestedOutput.php b/bundled-libs/Cache/Lite/NestedOutput.php new file mode 100644 index 00000000..81ece30d --- /dev/null +++ b/bundled-libs/Cache/Lite/NestedOutput.php @@ -0,0 +1,56 @@ + +*/ + +require_once('Cache/Lite/Output.php'); + +class Cache_Lite_NestedOutput extends Cache_Lite_Output +{ + private $nestedIds = array(); + private $nestedGroups = array(); + + /** + * Start the cache + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return boolean|string false if the cache is not hit else the data + * @access public + */ + function start($id, $group = 'default', $doNotTestCacheValidity = false) + { + $this->nestedIds[] = $id; + $this->nestedGroups[] = $group; + $data = $this->get($id, $group, $doNotTestCacheValidity); + if ($data !== false) { + return $data; + } + ob_start(); + ob_implicit_flush(false); + return false; + } + + /** + * Stop the cache + * + * @param boolen + * @return string return contents of cache + */ + function end() + { + $data = ob_get_contents(); + ob_end_clean(); + $id = array_pop($this->nestedIds); + $group = array_pop($this->nestedGroups); + $this->save($data, $id, $group); + return $data; + } + +} diff --git a/bundled-libs/Cache/Lite/Output.php b/bundled-libs/Cache/Lite/Output.php index 37cba664..9880cfa4 100644 --- a/bundled-libs/Cache/Lite/Output.php +++ b/bundled-libs/Cache/Lite/Output.php @@ -7,11 +7,10 @@ * Technical choices are described in the 'docs/technical' file * * @package Cache_Lite -* @version $Id: Output.php,v 1.4 2006/01/29 00:22:07 fab Exp $ * @author Fabien MARTY */ -require_once dirname(__FILE__) . '/../Lite.php'; +require_once('Cache/Lite.php'); class Cache_Lite_Output extends Cache_Lite { @@ -27,9 +26,9 @@ class Cache_Lite_Output extends Cache_Lite * @param array $options options * @access public */ - function Cache_Lite_Output($options) + function __construct($options) { - $this->Cache_Lite($options); + parent::__construct($options); } /** @@ -67,6 +66,3 @@ class Cache_Lite_Output extends Cache_Lite } } - - -?> diff --git a/bundled-libs/HTTP/Request2.php b/bundled-libs/HTTP/Request2.php index 36c413fa..b835822e 100644 --- a/bundled-libs/HTTP/Request2.php +++ b/bundled-libs/HTTP/Request2.php @@ -1,1030 +1,1037 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * A class representing an URL as per RFC 3986. - */ -require_once 'Net/URL2.php'; - -/** - * Exception class for HTTP_Request2 package - */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Class representing a HTTP request message - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://tools.ietf.org/html/rfc2616#section-5 - */ -class HTTP_Request2 implements SplSubject -{ - /**#@+ - * Constants for HTTP request methods - * - * @link http://tools.ietf.org/html/rfc2616#section-5.1.1 - */ - const METHOD_OPTIONS = 'OPTIONS'; - const METHOD_GET = 'GET'; - const METHOD_HEAD = 'HEAD'; - const METHOD_POST = 'POST'; - const METHOD_PUT = 'PUT'; - const METHOD_DELETE = 'DELETE'; - const METHOD_TRACE = 'TRACE'; - const METHOD_CONNECT = 'CONNECT'; - /**#@-*/ - - /**#@+ - * Constants for HTTP authentication schemes - * - * @link http://tools.ietf.org/html/rfc2617 - */ - const AUTH_BASIC = 'basic'; - const AUTH_DIGEST = 'digest'; - /**#@-*/ - - /** - * Regular expression used to check for invalid symbols in RFC 2616 tokens - * @link http://pear.php.net/bugs/bug.php?id=15630 - */ - const REGEXP_INVALID_TOKEN = '![\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]!'; - - /** - * Regular expression used to check for invalid symbols in cookie strings - * @link http://pear.php.net/bugs/bug.php?id=15630 - * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html - */ - const REGEXP_INVALID_COOKIE = '/[\s,;]/'; - - /** - * Fileinfo magic database resource - * @var resource - * @see detectMimeType() - */ - private static $_fileinfoDb; - - /** - * Observers attached to the request (instances of SplObserver) - * @var array - */ - protected $observers = array(); - - /** - * Request URL - * @var Net_URL2 - */ - protected $url; - - /** - * Request method - * @var string - */ - protected $method = self::METHOD_GET; - - /** - * Authentication data - * @var array - * @see getAuth() - */ - protected $auth; - - /** - * Request headers - * @var array - */ - protected $headers = array(); - - /** - * Configuration parameters - * @var array - * @see setConfig() - */ - protected $config = array( - 'adapter' => 'HTTP_Request2_Adapter_Socket', - 'connect_timeout' => 10, - 'timeout' => 0, - 'use_brackets' => true, - 'protocol_version' => '1.1', - 'buffer_size' => 16384, - 'store_body' => true, - 'local_ip' => null, - - 'proxy_host' => '', - 'proxy_port' => '', - 'proxy_user' => '', - 'proxy_password' => '', - 'proxy_auth_scheme' => self::AUTH_BASIC, - 'proxy_type' => 'http', - - 'ssl_verify_peer' => true, - 'ssl_verify_host' => true, - 'ssl_cafile' => null, - 'ssl_capath' => null, - 'ssl_local_cert' => null, - 'ssl_passphrase' => null, - - 'digest_compat_ie' => false, - - 'follow_redirects' => false, - 'max_redirects' => 5, - 'strict_redirects' => false - ); - - /** - * Last event in request / response handling, intended for observers - * @var array - * @see getLastEvent() - */ - protected $lastEvent = array( - 'name' => 'start', - 'data' => null - ); - - /** - * Request body - * @var string|resource - * @see setBody() - */ - protected $body = ''; - - /** - * Array of POST parameters - * @var array - */ - protected $postParams = array(); - - /** - * Array of file uploads (for multipart/form-data POST requests) - * @var array - */ - protected $uploads = array(); - - /** - * Adapter used to perform actual HTTP request - * @var HTTP_Request2_Adapter - */ - protected $adapter; - - /** - * Cookie jar to persist cookies between requests - * @var HTTP_Request2_CookieJar - */ - protected $cookieJar = null; - - /** - * Constructor. Can set request URL, method and configuration array. - * - * Also sets a default value for User-Agent header. - * - * @param string|Net_Url2 $url Request URL - * @param string $method Request method - * @param array $config Configuration for this Request instance - */ - public function __construct( - $url = null, $method = self::METHOD_GET, array $config = array() - ) { - $this->setConfig($config); - if (!empty($url)) { - $this->setUrl($url); - } - if (!empty($method)) { - $this->setMethod($method); - } - $this->setHeader( - 'user-agent', 'HTTP_Request2/2.2.1 ' . - '(http://pear.php.net/package/http_request2) PHP/' . phpversion() - ); - } - - /** - * Sets the URL for this request - * - * If the URL has userinfo part (username & password) these will be removed - * and converted to auth data. If the URL does not have a path component, - * that will be set to '/'. - * - * @param string|Net_URL2 $url Request URL - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setUrl($url) - { - if (is_string($url)) { - $url = new Net_URL2( - $url, array(Net_URL2::OPTION_USE_BRACKETS => $this->config['use_brackets']) - ); - } - if (!$url instanceof Net_URL2) { - throw new HTTP_Request2_LogicException( - 'Parameter is not a valid HTTP URL', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - // URL contains username / password? - if ($url->getUserinfo()) { - $username = $url->getUser(); - $password = $url->getPassword(); - $this->setAuth(rawurldecode($username), $password? rawurldecode($password): ''); - $url->setUserinfo(''); - } - if ('' == $url->getPath()) { - $url->setPath('/'); - } - $this->url = $url; - - return $this; - } - - /** - * Returns the request URL - * - * @return Net_URL2 - */ - public function getUrl() - { - return $this->url; - } - - /** - * Sets the request method - * - * @param string $method one of the methods defined in RFC 2616 - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException if the method name is invalid - */ - public function setMethod($method) - { - // Method name should be a token: http://tools.ietf.org/html/rfc2616#section-5.1.1 - if (preg_match(self::REGEXP_INVALID_TOKEN, $method)) { - throw new HTTP_Request2_LogicException( - "Invalid request method '{$method}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $this->method = $method; - - return $this; - } - - /** - * Returns the request method - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Sets the configuration parameter(s) - * - * The following parameters are available: - *
    - *
  • 'adapter' - adapter to use (string)
  • - *
  • 'connect_timeout' - Connection timeout in seconds (integer)
  • - *
  • 'timeout' - Total number of seconds a request can take. - * Use 0 for no limit, should be greater than - * 'connect_timeout' if set (integer)
  • - *
  • 'use_brackets' - Whether to append [] to array variable names (bool)
  • - *
  • 'protocol_version' - HTTP Version to use, '1.0' or '1.1' (string)
  • - *
  • 'buffer_size' - Buffer size to use for reading and writing (int)
  • - *
  • 'store_body' - Whether to store response body in response object. - * Set to false if receiving a huge response and - * using an Observer to save it (boolean)
  • - *
  • 'local_ip' - Specifies the IP address that will be used for accessing - * the network (string)
  • - *
  • 'proxy_type' - Proxy type, 'http' or 'socks5' (string)
  • - *
  • 'proxy_host' - Proxy server host (string)
  • - *
  • 'proxy_port' - Proxy server port (integer)
  • - *
  • 'proxy_user' - Proxy auth username (string)
  • - *
  • 'proxy_password' - Proxy auth password (string)
  • - *
  • 'proxy_auth_scheme' - Proxy auth scheme, one of HTTP_Request2::AUTH_* constants (string)
  • - *
  • 'proxy' - Shorthand for proxy_* parameters, proxy given as URL, - * e.g. 'socks5://localhost:1080/' (string)
  • - *
  • 'ssl_verify_peer' - Whether to verify peer's SSL certificate (bool)
  • - *
  • 'ssl_verify_host' - Whether to check that Common Name in SSL - * certificate matches host name (bool)
  • - *
  • 'ssl_cafile' - Cerificate Authority file to verify the peer - * with (use with 'ssl_verify_peer') (string)
  • - *
  • 'ssl_capath' - Directory holding multiple Certificate - * Authority files (string)
  • - *
  • 'ssl_local_cert' - Name of a file containing local cerificate (string)
  • - *
  • 'ssl_passphrase' - Passphrase with which local certificate - * was encoded (string)
  • - *
  • 'digest_compat_ie' - Whether to imitate behaviour of MSIE 5 and 6 - * in using URL without query string in digest - * authentication (boolean)
  • - *
  • 'follow_redirects' - Whether to automatically follow HTTP Redirects (boolean)
  • - *
  • 'max_redirects' - Maximum number of redirects to follow (integer)
  • - *
  • 'strict_redirects' - Whether to keep request method on redirects via status 301 and - * 302 (true, needed for compatibility with RFC 2616) - * or switch to GET (false, needed for compatibility with most - * browsers) (boolean)
  • - *
- * - * @param string|array $nameOrConfig configuration parameter name or array - * ('parameter name' => 'parameter value') - * @param mixed $value parameter value if $nameOrConfig is not an array - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException If the parameter is unknown - */ - public function setConfig($nameOrConfig, $value = null) - { - if (is_array($nameOrConfig)) { - foreach ($nameOrConfig as $name => $value) { - $this->setConfig($name, $value); - } - - } elseif ('proxy' == $nameOrConfig) { - $url = new Net_URL2($value); - $this->setConfig(array( - 'proxy_type' => $url->getScheme(), - 'proxy_host' => $url->getHost(), - 'proxy_port' => $url->getPort(), - 'proxy_user' => rawurldecode($url->getUser()), - 'proxy_password' => rawurldecode($url->getPassword()) - )); - - } else { - if (!array_key_exists($nameOrConfig, $this->config)) { - throw new HTTP_Request2_LogicException( - "Unknown configuration parameter '{$nameOrConfig}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $this->config[$nameOrConfig] = $value; - } - - return $this; - } - - /** - * Returns the value(s) of the configuration parameter(s) - * - * @param string $name parameter name - * - * @return mixed value of $name parameter, array of all configuration - * parameters if $name is not given - * @throws HTTP_Request2_LogicException If the parameter is unknown - */ - public function getConfig($name = null) - { - if (null === $name) { - return $this->config; - } elseif (!array_key_exists($name, $this->config)) { - throw new HTTP_Request2_LogicException( - "Unknown configuration parameter '{$name}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - return $this->config[$name]; - } - - /** - * Sets the autentification data - * - * @param string $user user name - * @param string $password password - * @param string $scheme authentication scheme - * - * @return HTTP_Request2 - */ - public function setAuth($user, $password = '', $scheme = self::AUTH_BASIC) - { - if (empty($user)) { - $this->auth = null; - } else { - $this->auth = array( - 'user' => (string)$user, - 'password' => (string)$password, - 'scheme' => $scheme - ); - } - - return $this; - } - - /** - * Returns the authentication data - * - * The array has the keys 'user', 'password' and 'scheme', where 'scheme' - * is one of the HTTP_Request2::AUTH_* constants. - * - * @return array - */ - public function getAuth() - { - return $this->auth; - } - - /** - * Sets request header(s) - * - * The first parameter may be either a full header string 'header: value' or - * header name. In the former case $value parameter is ignored, in the latter - * the header's value will either be set to $value or the header will be - * removed if $value is null. The first parameter can also be an array of - * headers, in that case method will be called recursively. - * - * Note that headers are treated case insensitively as per RFC 2616. - * - * - * $req->setHeader('Foo: Bar'); // sets the value of 'Foo' header to 'Bar' - * $req->setHeader('FoO', 'Baz'); // sets the value of 'Foo' header to 'Baz' - * $req->setHeader(array('foo' => 'Quux')); // sets the value of 'Foo' header to 'Quux' - * $req->setHeader('FOO'); // removes 'Foo' header from request - * - * - * @param string|array $name header name, header string ('Header: value') - * or an array of headers - * @param string|array|null $value header value if $name is not an array, - * header will be removed if value is null - * @param bool $replace whether to replace previous header with the - * same name or append to its value - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setHeader($name, $value = null, $replace = true) - { - if (is_array($name)) { - foreach ($name as $k => $v) { - if (is_string($k)) { - $this->setHeader($k, $v, $replace); - } else { - $this->setHeader($v, null, $replace); - } - } - } else { - if (null === $value && strpos($name, ':')) { - list($name, $value) = array_map('trim', explode(':', $name, 2)); - } - // Header name should be a token: http://tools.ietf.org/html/rfc2616#section-4.2 - if (preg_match(self::REGEXP_INVALID_TOKEN, $name)) { - throw new HTTP_Request2_LogicException( - "Invalid header name '{$name}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - // Header names are case insensitive anyway - $name = strtolower($name); - if (null === $value) { - unset($this->headers[$name]); - - } else { - if (is_array($value)) { - $value = implode(', ', array_map('trim', $value)); - } elseif (is_string($value)) { - $value = trim($value); - } - if (!isset($this->headers[$name]) || $replace) { - $this->headers[$name] = $value; - } else { - $this->headers[$name] .= ', ' . $value; - } - } - } - - return $this; - } - - /** - * Returns the request headers - * - * The array is of the form ('header name' => 'header value'), header names - * are lowercased - * - * @return array - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Adds a cookie to the request - * - * If the request does not have a CookieJar object set, this method simply - * appends a cookie to "Cookie:" header. - * - * If a CookieJar object is available, the cookie is stored in that object. - * Data from request URL will be used for setting its 'domain' and 'path' - * parameters, 'expires' and 'secure' will be set to null and false, - * respectively. If you need further control, use CookieJar's methods. - * - * @param string $name cookie name - * @param string $value cookie value - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - * @see setCookieJar() - */ - public function addCookie($name, $value) - { - if (!empty($this->cookieJar)) { - $this->cookieJar->store( - array('name' => $name, 'value' => $value), $this->url - ); - - } else { - $cookie = $name . '=' . $value; - if (preg_match(self::REGEXP_INVALID_COOKIE, $cookie)) { - throw new HTTP_Request2_LogicException( - "Invalid cookie: '{$cookie}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $cookies = empty($this->headers['cookie'])? '': $this->headers['cookie'] . '; '; - $this->setHeader('cookie', $cookies . $cookie); - } - - return $this; - } - - /** - * Sets the request body - * - * If you provide file pointer rather than file name, it should support - * fstat() and rewind() operations. - * - * @param string|resource|HTTP_Request2_MultipartBody $body Either a - * string with the body or filename containing body or - * pointer to an open file or object with multipart body data - * @param bool $isFilename Whether - * first parameter is a filename - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setBody($body, $isFilename = false) - { - if (!$isFilename && !is_resource($body)) { - if (!$body instanceof HTTP_Request2_MultipartBody) { - $this->body = (string)$body; - } else { - $this->body = $body; - } - } else { - $fileData = $this->fopenWrapper($body, empty($this->headers['content-type'])); - $this->body = $fileData['fp']; - if (empty($this->headers['content-type'])) { - $this->setHeader('content-type', $fileData['type']); - } - } - $this->postParams = $this->uploads = array(); - - return $this; - } - - /** - * Returns the request body - * - * @return string|resource|HTTP_Request2_MultipartBody - */ - public function getBody() - { - if (self::METHOD_POST == $this->method - && (!empty($this->postParams) || !empty($this->uploads)) - ) { - if (0 === strpos($this->headers['content-type'], 'application/x-www-form-urlencoded')) { - $body = http_build_query($this->postParams, '', '&'); - if (!$this->getConfig('use_brackets')) { - $body = preg_replace('/%5B\d+%5D=/', '=', $body); - } - // support RFC 3986 by not encoding '~' symbol (request #15368) - return str_replace('%7E', '~', $body); - - } elseif (0 === strpos($this->headers['content-type'], 'multipart/form-data')) { - require_once 'HTTP/Request2/MultipartBody.php'; - return new HTTP_Request2_MultipartBody( - $this->postParams, $this->uploads, $this->getConfig('use_brackets') - ); - } - } - return $this->body; - } - - /** - * Adds a file to form-based file upload - * - * Used to emulate file upload via a HTML form. The method also sets - * Content-Type of HTTP request to 'multipart/form-data'. - * - * If you just want to send the contents of a file as the body of HTTP - * request you should use setBody() method. - * - * If you provide file pointers rather than file names, they should support - * fstat() and rewind() operations. - * - * @param string $fieldName name of file-upload field - * @param string|resource|array $filename full name of local file, - * pointer to open file or an array of files - * @param string $sendFilename filename to send in the request - * @param string $contentType content-type of file being uploaded - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function addUpload( - $fieldName, $filename, $sendFilename = null, $contentType = null - ) { - if (!is_array($filename)) { - $fileData = $this->fopenWrapper($filename, empty($contentType)); - $this->uploads[$fieldName] = array( - 'fp' => $fileData['fp'], - 'filename' => !empty($sendFilename)? $sendFilename - :(is_string($filename)? basename($filename): 'anonymous.blob') , - 'size' => $fileData['size'], - 'type' => empty($contentType)? $fileData['type']: $contentType - ); - } else { - $fps = $names = $sizes = $types = array(); - foreach ($filename as $f) { - if (!is_array($f)) { - $f = array($f); - } - $fileData = $this->fopenWrapper($f[0], empty($f[2])); - $fps[] = $fileData['fp']; - $names[] = !empty($f[1])? $f[1] - :(is_string($f[0])? basename($f[0]): 'anonymous.blob'); - $sizes[] = $fileData['size']; - $types[] = empty($f[2])? $fileData['type']: $f[2]; - } - $this->uploads[$fieldName] = array( - 'fp' => $fps, 'filename' => $names, 'size' => $sizes, 'type' => $types - ); - } - if (empty($this->headers['content-type']) - || 'application/x-www-form-urlencoded' == $this->headers['content-type'] - ) { - $this->setHeader('content-type', 'multipart/form-data'); - } - - return $this; - } - - /** - * Adds POST parameter(s) to the request. - * - * @param string|array $name parameter name or array ('name' => 'value') - * @param mixed $value parameter value (can be an array) - * - * @return HTTP_Request2 - */ - public function addPostParameter($name, $value = null) - { - if (!is_array($name)) { - $this->postParams[$name] = $value; - } else { - foreach ($name as $k => $v) { - $this->addPostParameter($k, $v); - } - } - if (empty($this->headers['content-type'])) { - $this->setHeader('content-type', 'application/x-www-form-urlencoded'); - } - - return $this; - } - - /** - * Attaches a new observer - * - * @param SplObserver $observer any object implementing SplObserver - */ - public function attach(SplObserver $observer) - { - foreach ($this->observers as $attached) { - if ($attached === $observer) { - return; - } - } - $this->observers[] = $observer; - } - - /** - * Detaches an existing observer - * - * @param SplObserver $observer any object implementing SplObserver - */ - public function detach(SplObserver $observer) - { - foreach ($this->observers as $key => $attached) { - if ($attached === $observer) { - unset($this->observers[$key]); - return; - } - } - } - - /** - * Notifies all observers - */ - public function notify() - { - foreach ($this->observers as $observer) { - $observer->update($this); - } - } - - /** - * Sets the last event - * - * Adapters should use this method to set the current state of the request - * and notify the observers. - * - * @param string $name event name - * @param mixed $data event data - */ - public function setLastEvent($name, $data = null) - { - $this->lastEvent = array( - 'name' => $name, - 'data' => $data - ); - $this->notify(); - } - - /** - * Returns the last event - * - * Observers should use this method to access the last change in request. - * The following event names are possible: - *
    - *
  • 'connect' - after connection to remote server, - * data is the destination (string)
  • - *
  • 'disconnect' - after disconnection from server
  • - *
  • 'sentHeaders' - after sending the request headers, - * data is the headers sent (string)
  • - *
  • 'sentBodyPart' - after sending a part of the request body, - * data is the length of that part (int)
  • - *
  • 'sentBody' - after sending the whole request body, - * data is request body length (int)
  • - *
  • 'receivedHeaders' - after receiving the response headers, - * data is HTTP_Request2_Response object
  • - *
  • 'receivedBodyPart' - after receiving a part of the response - * body, data is that part (string)
  • - *
  • 'receivedEncodedBodyPart' - as 'receivedBodyPart', but data is still - * encoded by Content-Encoding
  • - *
  • 'receivedBody' - after receiving the complete response - * body, data is HTTP_Request2_Response object
  • - *
- * Different adapters may not send all the event types. Mock adapter does - * not send any events to the observers. - * - * @return array The array has two keys: 'name' and 'data' - */ - public function getLastEvent() - { - return $this->lastEvent; - } - - /** - * Sets the adapter used to actually perform the request - * - * You can pass either an instance of a class implementing HTTP_Request2_Adapter - * or a class name. The method will only try to include a file if the class - * name starts with HTTP_Request2_Adapter_, it will also try to prepend this - * prefix to the class name if it doesn't contain any underscores, so that - * - * $request->setAdapter('curl'); - * - * will work. - * - * @param string|HTTP_Request2_Adapter $adapter Adapter to use - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setAdapter($adapter) - { - if (is_string($adapter)) { - if (!class_exists($adapter, false)) { - if (false === strpos($adapter, '_')) { - $adapter = 'HTTP_Request2_Adapter_' . ucfirst($adapter); - } - if (!class_exists($adapter, false) - && preg_match('/^HTTP_Request2_Adapter_([a-zA-Z0-9]+)$/', $adapter) - ) { - include_once str_replace('_', DIRECTORY_SEPARATOR, $adapter) . '.php'; - } - if (!class_exists($adapter, false)) { - throw new HTTP_Request2_LogicException( - "Class {$adapter} not found", - HTTP_Request2_Exception::MISSING_VALUE - ); - } - } - $adapter = new $adapter; - } - if (!$adapter instanceof HTTP_Request2_Adapter) { - throw new HTTP_Request2_LogicException( - 'Parameter is not a HTTP request adapter', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $this->adapter = $adapter; - - return $this; - } - - /** - * Sets the cookie jar - * - * A cookie jar is used to maintain cookies across HTTP requests and - * responses. Cookies from jar will be automatically added to the request - * headers based on request URL. - * - * @param HTTP_Request2_CookieJar|bool $jar Existing CookieJar object, true to - * create a new one, false to remove - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setCookieJar($jar = true) - { - if (!class_exists('HTTP_Request2_CookieJar', false)) { - require_once 'HTTP/Request2/CookieJar.php'; - } - - if ($jar instanceof HTTP_Request2_CookieJar) { - $this->cookieJar = $jar; - } elseif (true === $jar) { - $this->cookieJar = new HTTP_Request2_CookieJar(); - } elseif (!$jar) { - $this->cookieJar = null; - } else { - throw new HTTP_Request2_LogicException( - 'Invalid parameter passed to setCookieJar()', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - - return $this; - } - - /** - * Returns current CookieJar object or null if none - * - * @return HTTP_Request2_CookieJar|null - */ - public function getCookieJar() - { - return $this->cookieJar; - } - - /** - * Sends the request and returns the response - * - * @throws HTTP_Request2_Exception - * @return HTTP_Request2_Response - */ - public function send() - { - // Sanity check for URL - if (!$this->url instanceof Net_URL2 - || !$this->url->isAbsolute() - || !in_array(strtolower($this->url->getScheme()), array('https', 'http')) - ) { - throw new HTTP_Request2_LogicException( - 'HTTP_Request2 needs an absolute HTTP(S) request URL, ' - . ($this->url instanceof Net_URL2 - ? "'" . $this->url->__toString() . "'" : 'none') - . ' given', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - if (empty($this->adapter)) { - $this->setAdapter($this->getConfig('adapter')); - } - // magic_quotes_runtime may break file uploads and chunked response - // processing; see bug #4543. Don't use ini_get() here; see bug #16440. - if ($magicQuotes = get_magic_quotes_runtime()) { - set_magic_quotes_runtime(false); - } - // force using single byte encoding if mbstring extension overloads - // strlen() and substr(); see bug #1781, bug #10605 - if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { - $oldEncoding = mb_internal_encoding(); - mb_internal_encoding('8bit'); - } - - try { - $response = $this->adapter->sendRequest($this); - } catch (Exception $e) { - } - // cleanup in either case (poor man's "finally" clause) - if ($magicQuotes) { - set_magic_quotes_runtime(true); - } - if (!empty($oldEncoding)) { - mb_internal_encoding($oldEncoding); - } - // rethrow the exception - if (!empty($e)) { - throw $e; - } - return $response; - } - - /** - * Wrapper around fopen()/fstat() used by setBody() and addUpload() - * - * @param string|resource $file file name or pointer to open file - * @param bool $detectType whether to try autodetecting MIME - * type of file, will only work if $file is a - * filename, not pointer - * - * @return array array('fp' => file pointer, 'size' => file size, 'type' => MIME type) - * @throws HTTP_Request2_LogicException - */ - protected function fopenWrapper($file, $detectType = false) - { - if (!is_string($file) && !is_resource($file)) { - throw new HTTP_Request2_LogicException( - "Filename or file pointer resource expected", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $fileData = array( - 'fp' => is_string($file)? null: $file, - 'type' => 'application/octet-stream', - 'size' => 0 - ); - if (is_string($file)) { - if (!($fileData['fp'] = @fopen($file, 'rb'))) { - $error = error_get_last(); - throw new HTTP_Request2_LogicException( - $error['message'], HTTP_Request2_Exception::READ_ERROR - ); - } - if ($detectType) { - $fileData['type'] = self::detectMimeType($file); - } - } - if (!($stat = fstat($fileData['fp']))) { - throw new HTTP_Request2_LogicException( - "fstat() call failed", HTTP_Request2_Exception::READ_ERROR - ); - } - $fileData['size'] = $stat['size']; - - return $fileData; - } - - /** - * Tries to detect MIME type of a file - * - * The method will try to use fileinfo extension if it is available, - * deprecated mime_content_type() function in the other case. If neither - * works, default 'application/octet-stream' MIME type is returned - * - * @param string $filename file name - * - * @return string file MIME type - */ - protected static function detectMimeType($filename) - { - // finfo extension from PECL available - if (function_exists('finfo_open')) { - if (!isset(self::$_fileinfoDb)) { - self::$_fileinfoDb = @finfo_open(FILEINFO_MIME); - } - if (self::$_fileinfoDb) { - $info = finfo_file(self::$_fileinfoDb, $filename); - } - } - // (deprecated) mime_content_type function available - if (empty($info) && function_exists('mime_content_type')) { - return mime_content_type($filename); - } - return empty($info)? 'application/octet-stream': $info; - } -} -?> + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * A class representing an URL as per RFC 3986. + */ +if (!class_exists('Net_URL2', true)) { + require_once 'Net/URL2.php'; +} + +/** + * Exception class for HTTP_Request2 package + */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Class representing a HTTP request message + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://tools.ietf.org/html/rfc2616#section-5 + */ +class HTTP_Request2 implements SplSubject +{ + /**#@+ + * Constants for HTTP request methods + * + * @link http://tools.ietf.org/html/rfc2616#section-5.1.1 + */ + const METHOD_OPTIONS = 'OPTIONS'; + const METHOD_GET = 'GET'; + const METHOD_HEAD = 'HEAD'; + const METHOD_POST = 'POST'; + const METHOD_PUT = 'PUT'; + const METHOD_DELETE = 'DELETE'; + const METHOD_TRACE = 'TRACE'; + const METHOD_CONNECT = 'CONNECT'; + /**#@-*/ + + /**#@+ + * Constants for HTTP authentication schemes + * + * @link http://tools.ietf.org/html/rfc2617 + */ + const AUTH_BASIC = 'basic'; + const AUTH_DIGEST = 'digest'; + /**#@-*/ + + /** + * Regular expression used to check for invalid symbols in RFC 2616 tokens + * @link http://pear.php.net/bugs/bug.php?id=15630 + */ + const REGEXP_INVALID_TOKEN = '![\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]!'; + + /** + * Regular expression used to check for invalid symbols in cookie strings + * @link http://pear.php.net/bugs/bug.php?id=15630 + * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html + */ + const REGEXP_INVALID_COOKIE = '/[\s,;]/'; + + /** + * Fileinfo magic database resource + * @var resource + * @see detectMimeType() + */ + private static $_fileinfoDb; + + /** + * Observers attached to the request (instances of SplObserver) + * @var array + */ + protected $observers = array(); + + /** + * Request URL + * @var Net_URL2 + */ + protected $url; + + /** + * Request method + * @var string + */ + protected $method = self::METHOD_GET; + + /** + * Authentication data + * @var array + * @see getAuth() + */ + protected $auth; + + /** + * Request headers + * @var array + */ + protected $headers = array(); + + /** + * Configuration parameters + * @var array + * @see setConfig() + */ + protected $config = array( + 'adapter' => 'HTTP_Request2_Adapter_Socket', + 'connect_timeout' => 10, + 'timeout' => 0, + 'use_brackets' => true, + 'protocol_version' => '1.1', + 'buffer_size' => 16384, + 'store_body' => true, + 'local_ip' => null, + + 'proxy_host' => '', + 'proxy_port' => '', + 'proxy_user' => '', + 'proxy_password' => '', + 'proxy_auth_scheme' => self::AUTH_BASIC, + 'proxy_type' => 'http', + + 'ssl_verify_peer' => true, + 'ssl_verify_host' => true, + 'ssl_cafile' => null, + 'ssl_capath' => null, + 'ssl_local_cert' => null, + 'ssl_passphrase' => null, + + 'digest_compat_ie' => false, + + 'follow_redirects' => false, + 'max_redirects' => 5, + 'strict_redirects' => false + ); + + /** + * Last event in request / response handling, intended for observers + * @var array + * @see getLastEvent() + */ + protected $lastEvent = array( + 'name' => 'start', + 'data' => null + ); + + /** + * Request body + * @var string|resource + * @see setBody() + */ + protected $body = ''; + + /** + * Array of POST parameters + * @var array + */ + protected $postParams = array(); + + /** + * Array of file uploads (for multipart/form-data POST requests) + * @var array + */ + protected $uploads = array(); + + /** + * Adapter used to perform actual HTTP request + * @var HTTP_Request2_Adapter + */ + protected $adapter; + + /** + * Cookie jar to persist cookies between requests + * @var HTTP_Request2_CookieJar + */ + protected $cookieJar = null; + + /** + * Constructor. Can set request URL, method and configuration array. + * + * Also sets a default value for User-Agent header. + * + * @param string|Net_Url2 $url Request URL + * @param string $method Request method + * @param array $config Configuration for this Request instance + */ + public function __construct( + $url = null, $method = self::METHOD_GET, array $config = array() + ) { + $this->setConfig($config); + if (!empty($url)) { + $this->setUrl($url); + } + if (!empty($method)) { + $this->setMethod($method); + } + $this->setHeader( + 'user-agent', 'HTTP_Request2/2.3.0 ' . + '(http://pear.php.net/package/http_request2) PHP/' . phpversion() + ); + } + + /** + * Sets the URL for this request + * + * If the URL has userinfo part (username & password) these will be removed + * and converted to auth data. If the URL does not have a path component, + * that will be set to '/'. + * + * @param string|Net_URL2 $url Request URL + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setUrl($url) + { + if (is_string($url)) { + $url = new Net_URL2( + $url, array(Net_URL2::OPTION_USE_BRACKETS => $this->config['use_brackets']) + ); + } + if (!$url instanceof Net_URL2) { + throw new HTTP_Request2_LogicException( + 'Parameter is not a valid HTTP URL', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + // URL contains username / password? + if ($url->getUserinfo()) { + $username = $url->getUser(); + $password = $url->getPassword(); + $this->setAuth(rawurldecode($username), $password? rawurldecode($password): ''); + $url->setUserinfo(''); + } + if ('' == $url->getPath()) { + $url->setPath('/'); + } + $this->url = $url; + + return $this; + } + + /** + * Returns the request URL + * + * @return Net_URL2 + */ + public function getUrl() + { + return $this->url; + } + + /** + * Sets the request method + * + * @param string $method one of the methods defined in RFC 2616 + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException if the method name is invalid + */ + public function setMethod($method) + { + // Method name should be a token: http://tools.ietf.org/html/rfc2616#section-5.1.1 + if (preg_match(self::REGEXP_INVALID_TOKEN, $method)) { + throw new HTTP_Request2_LogicException( + "Invalid request method '{$method}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $this->method = $method; + + return $this; + } + + /** + * Returns the request method + * + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * Sets the configuration parameter(s) + * + * The following parameters are available: + *
    + *
  • 'adapter' - adapter to use (string)
  • + *
  • 'connect_timeout' - Connection timeout in seconds (integer)
  • + *
  • 'timeout' - Total number of seconds a request can take. + * Use 0 for no limit, should be greater than + * 'connect_timeout' if set (integer)
  • + *
  • 'use_brackets' - Whether to append [] to array variable names (bool)
  • + *
  • 'protocol_version' - HTTP Version to use, '1.0' or '1.1' (string)
  • + *
  • 'buffer_size' - Buffer size to use for reading and writing (int)
  • + *
  • 'store_body' - Whether to store response body in response object. + * Set to false if receiving a huge response and + * using an Observer to save it (boolean)
  • + *
  • 'local_ip' - Specifies the IP address that will be used for accessing + * the network (string)
  • + *
  • 'proxy_type' - Proxy type, 'http' or 'socks5' (string)
  • + *
  • 'proxy_host' - Proxy server host (string)
  • + *
  • 'proxy_port' - Proxy server port (integer)
  • + *
  • 'proxy_user' - Proxy auth username (string)
  • + *
  • 'proxy_password' - Proxy auth password (string)
  • + *
  • 'proxy_auth_scheme' - Proxy auth scheme, one of HTTP_Request2::AUTH_* constants (string)
  • + *
  • 'proxy' - Shorthand for proxy_* parameters, proxy given as URL, + * e.g. 'socks5://localhost:1080/' (string)
  • + *
  • 'ssl_verify_peer' - Whether to verify peer's SSL certificate (bool)
  • + *
  • 'ssl_verify_host' - Whether to check that Common Name in SSL + * certificate matches host name (bool)
  • + *
  • 'ssl_cafile' - Cerificate Authority file to verify the peer + * with (use with 'ssl_verify_peer') (string)
  • + *
  • 'ssl_capath' - Directory holding multiple Certificate + * Authority files (string)
  • + *
  • 'ssl_local_cert' - Name of a file containing local cerificate (string)
  • + *
  • 'ssl_passphrase' - Passphrase with which local certificate + * was encoded (string)
  • + *
  • 'digest_compat_ie' - Whether to imitate behaviour of MSIE 5 and 6 + * in using URL without query string in digest + * authentication (boolean)
  • + *
  • 'follow_redirects' - Whether to automatically follow HTTP Redirects (boolean)
  • + *
  • 'max_redirects' - Maximum number of redirects to follow (integer)
  • + *
  • 'strict_redirects' - Whether to keep request method on redirects via status 301 and + * 302 (true, needed for compatibility with RFC 2616) + * or switch to GET (false, needed for compatibility with most + * browsers) (boolean)
  • + *
+ * + * @param string|array $nameOrConfig configuration parameter name or array + * ('parameter name' => 'parameter value') + * @param mixed $value parameter value if $nameOrConfig is not an array + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException If the parameter is unknown + */ + public function setConfig($nameOrConfig, $value = null) + { + if (is_array($nameOrConfig)) { + foreach ($nameOrConfig as $name => $value) { + $this->setConfig($name, $value); + } + + } elseif ('proxy' == $nameOrConfig) { + $url = new Net_URL2($value); + $this->setConfig(array( + 'proxy_type' => $url->getScheme(), + 'proxy_host' => $url->getHost(), + 'proxy_port' => $url->getPort(), + 'proxy_user' => rawurldecode($url->getUser()), + 'proxy_password' => rawurldecode($url->getPassword()) + )); + + } else { + if (!array_key_exists($nameOrConfig, $this->config)) { + throw new HTTP_Request2_LogicException( + "Unknown configuration parameter '{$nameOrConfig}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $this->config[$nameOrConfig] = $value; + } + + return $this; + } + + /** + * Returns the value(s) of the configuration parameter(s) + * + * @param string $name parameter name + * + * @return mixed value of $name parameter, array of all configuration + * parameters if $name is not given + * @throws HTTP_Request2_LogicException If the parameter is unknown + */ + public function getConfig($name = null) + { + if (null === $name) { + return $this->config; + } elseif (!array_key_exists($name, $this->config)) { + throw new HTTP_Request2_LogicException( + "Unknown configuration parameter '{$name}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + return $this->config[$name]; + } + + /** + * Sets the autentification data + * + * @param string $user user name + * @param string $password password + * @param string $scheme authentication scheme + * + * @return HTTP_Request2 + */ + public function setAuth($user, $password = '', $scheme = self::AUTH_BASIC) + { + if (empty($user)) { + $this->auth = null; + } else { + $this->auth = array( + 'user' => (string)$user, + 'password' => (string)$password, + 'scheme' => $scheme + ); + } + + return $this; + } + + /** + * Returns the authentication data + * + * The array has the keys 'user', 'password' and 'scheme', where 'scheme' + * is one of the HTTP_Request2::AUTH_* constants. + * + * @return array + */ + public function getAuth() + { + return $this->auth; + } + + /** + * Sets request header(s) + * + * The first parameter may be either a full header string 'header: value' or + * header name. In the former case $value parameter is ignored, in the latter + * the header's value will either be set to $value or the header will be + * removed if $value is null. The first parameter can also be an array of + * headers, in that case method will be called recursively. + * + * Note that headers are treated case insensitively as per RFC 2616. + * + * + * $req->setHeader('Foo: Bar'); // sets the value of 'Foo' header to 'Bar' + * $req->setHeader('FoO', 'Baz'); // sets the value of 'Foo' header to 'Baz' + * $req->setHeader(array('foo' => 'Quux')); // sets the value of 'Foo' header to 'Quux' + * $req->setHeader('FOO'); // removes 'Foo' header from request + * + * + * @param string|array $name header name, header string ('Header: value') + * or an array of headers + * @param string|array|null $value header value if $name is not an array, + * header will be removed if value is null + * @param bool $replace whether to replace previous header with the + * same name or append to its value + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setHeader($name, $value = null, $replace = true) + { + if (is_array($name)) { + foreach ($name as $k => $v) { + if (is_string($k)) { + $this->setHeader($k, $v, $replace); + } else { + $this->setHeader($v, null, $replace); + } + } + } else { + if (null === $value && strpos($name, ':')) { + list($name, $value) = array_map('trim', explode(':', $name, 2)); + } + // Header name should be a token: http://tools.ietf.org/html/rfc2616#section-4.2 + if (preg_match(self::REGEXP_INVALID_TOKEN, $name)) { + throw new HTTP_Request2_LogicException( + "Invalid header name '{$name}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + // Header names are case insensitive anyway + $name = strtolower($name); + if (null === $value) { + unset($this->headers[$name]); + + } else { + if (is_array($value)) { + $value = implode(', ', array_map('trim', $value)); + } elseif (is_string($value)) { + $value = trim($value); + } + if (!isset($this->headers[$name]) || $replace) { + $this->headers[$name] = $value; + } else { + $this->headers[$name] .= ', ' . $value; + } + } + } + + return $this; + } + + /** + * Returns the request headers + * + * The array is of the form ('header name' => 'header value'), header names + * are lowercased + * + * @return array + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Adds a cookie to the request + * + * If the request does not have a CookieJar object set, this method simply + * appends a cookie to "Cookie:" header. + * + * If a CookieJar object is available, the cookie is stored in that object. + * Data from request URL will be used for setting its 'domain' and 'path' + * parameters, 'expires' and 'secure' will be set to null and false, + * respectively. If you need further control, use CookieJar's methods. + * + * @param string $name cookie name + * @param string $value cookie value + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + * @see setCookieJar() + */ + public function addCookie($name, $value) + { + if (!empty($this->cookieJar)) { + $this->cookieJar->store( + array('name' => $name, 'value' => $value), $this->url + ); + + } else { + $cookie = $name . '=' . $value; + if (preg_match(self::REGEXP_INVALID_COOKIE, $cookie)) { + throw new HTTP_Request2_LogicException( + "Invalid cookie: '{$cookie}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $cookies = empty($this->headers['cookie'])? '': $this->headers['cookie'] . '; '; + $this->setHeader('cookie', $cookies . $cookie); + } + + return $this; + } + + /** + * Sets the request body + * + * If you provide file pointer rather than file name, it should support + * fstat() and rewind() operations. + * + * @param string|resource|HTTP_Request2_MultipartBody $body Either a + * string with the body or filename containing body or + * pointer to an open file or object with multipart body data + * @param bool $isFilename Whether + * first parameter is a filename + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setBody($body, $isFilename = false) + { + if (!$isFilename && !is_resource($body)) { + if (!$body instanceof HTTP_Request2_MultipartBody) { + $this->body = (string)$body; + } else { + $this->body = $body; + } + } else { + $fileData = $this->fopenWrapper($body, empty($this->headers['content-type'])); + $this->body = $fileData['fp']; + if (empty($this->headers['content-type'])) { + $this->setHeader('content-type', $fileData['type']); + } + } + $this->postParams = $this->uploads = array(); + + return $this; + } + + /** + * Returns the request body + * + * @return string|resource|HTTP_Request2_MultipartBody + */ + public function getBody() + { + if (self::METHOD_POST == $this->method + && (!empty($this->postParams) || !empty($this->uploads)) + ) { + if (0 === strpos($this->headers['content-type'], 'application/x-www-form-urlencoded')) { + $body = http_build_query($this->postParams, '', '&'); + if (!$this->getConfig('use_brackets')) { + $body = preg_replace('/%5B\d+%5D=/', '=', $body); + } + // support RFC 3986 by not encoding '~' symbol (request #15368) + return str_replace('%7E', '~', $body); + + } elseif (0 === strpos($this->headers['content-type'], 'multipart/form-data')) { + require_once 'HTTP/Request2/MultipartBody.php'; + return new HTTP_Request2_MultipartBody( + $this->postParams, $this->uploads, $this->getConfig('use_brackets') + ); + } + } + return $this->body; + } + + /** + * Adds a file to form-based file upload + * + * Used to emulate file upload via a HTML form. The method also sets + * Content-Type of HTTP request to 'multipart/form-data'. + * + * If you just want to send the contents of a file as the body of HTTP + * request you should use setBody() method. + * + * If you provide file pointers rather than file names, they should support + * fstat() and rewind() operations. + * + * @param string $fieldName name of file-upload field + * @param string|resource|array $filename full name of local file, + * pointer to open file or an array of files + * @param string $sendFilename filename to send in the request + * @param string $contentType content-type of file being uploaded + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function addUpload( + $fieldName, $filename, $sendFilename = null, $contentType = null + ) { + if (!is_array($filename)) { + $fileData = $this->fopenWrapper($filename, empty($contentType)); + $this->uploads[$fieldName] = array( + 'fp' => $fileData['fp'], + 'filename' => !empty($sendFilename)? $sendFilename + :(is_string($filename)? basename($filename): 'anonymous.blob') , + 'size' => $fileData['size'], + 'type' => empty($contentType)? $fileData['type']: $contentType + ); + } else { + $fps = $names = $sizes = $types = array(); + foreach ($filename as $f) { + if (!is_array($f)) { + $f = array($f); + } + $fileData = $this->fopenWrapper($f[0], empty($f[2])); + $fps[] = $fileData['fp']; + $names[] = !empty($f[1])? $f[1] + :(is_string($f[0])? basename($f[0]): 'anonymous.blob'); + $sizes[] = $fileData['size']; + $types[] = empty($f[2])? $fileData['type']: $f[2]; + } + $this->uploads[$fieldName] = array( + 'fp' => $fps, 'filename' => $names, 'size' => $sizes, 'type' => $types + ); + } + if (empty($this->headers['content-type']) + || 'application/x-www-form-urlencoded' == $this->headers['content-type'] + ) { + $this->setHeader('content-type', 'multipart/form-data'); + } + + return $this; + } + + /** + * Adds POST parameter(s) to the request. + * + * @param string|array $name parameter name or array ('name' => 'value') + * @param mixed $value parameter value (can be an array) + * + * @return HTTP_Request2 + */ + public function addPostParameter($name, $value = null) + { + if (!is_array($name)) { + $this->postParams[$name] = $value; + } else { + foreach ($name as $k => $v) { + $this->addPostParameter($k, $v); + } + } + if (empty($this->headers['content-type'])) { + $this->setHeader('content-type', 'application/x-www-form-urlencoded'); + } + + return $this; + } + + /** + * Attaches a new observer + * + * @param SplObserver $observer any object implementing SplObserver + */ + public function attach(SplObserver $observer) + { + foreach ($this->observers as $attached) { + if ($attached === $observer) { + return; + } + } + $this->observers[] = $observer; + } + + /** + * Detaches an existing observer + * + * @param SplObserver $observer any object implementing SplObserver + */ + public function detach(SplObserver $observer) + { + foreach ($this->observers as $key => $attached) { + if ($attached === $observer) { + unset($this->observers[$key]); + return; + } + } + } + + /** + * Notifies all observers + */ + public function notify() + { + foreach ($this->observers as $observer) { + $observer->update($this); + } + } + + /** + * Sets the last event + * + * Adapters should use this method to set the current state of the request + * and notify the observers. + * + * @param string $name event name + * @param mixed $data event data + */ + public function setLastEvent($name, $data = null) + { + $this->lastEvent = array( + 'name' => $name, + 'data' => $data + ); + $this->notify(); + } + + /** + * Returns the last event + * + * Observers should use this method to access the last change in request. + * The following event names are possible: + *
    + *
  • 'connect' - after connection to remote server, + * data is the destination (string)
  • + *
  • 'disconnect' - after disconnection from server
  • + *
  • 'sentHeaders' - after sending the request headers, + * data is the headers sent (string)
  • + *
  • 'sentBodyPart' - after sending a part of the request body, + * data is the length of that part (int)
  • + *
  • 'sentBody' - after sending the whole request body, + * data is request body length (int)
  • + *
  • 'receivedHeaders' - after receiving the response headers, + * data is HTTP_Request2_Response object
  • + *
  • 'receivedBodyPart' - after receiving a part of the response + * body, data is that part (string)
  • + *
  • 'receivedEncodedBodyPart' - as 'receivedBodyPart', but data is still + * encoded by Content-Encoding
  • + *
  • 'receivedBody' - after receiving the complete response + * body, data is HTTP_Request2_Response object
  • + *
  • 'warning' - a problem arose during the request + * that is not severe enough to throw + * an Exception, data is the warning + * message (string). Currently dispatched if + * response body was received incompletely.
  • + *
+ * Different adapters may not send all the event types. Mock adapter does + * not send any events to the observers. + * + * @return array The array has two keys: 'name' and 'data' + */ + public function getLastEvent() + { + return $this->lastEvent; + } + + /** + * Sets the adapter used to actually perform the request + * + * You can pass either an instance of a class implementing HTTP_Request2_Adapter + * or a class name. The method will only try to include a file if the class + * name starts with HTTP_Request2_Adapter_, it will also try to prepend this + * prefix to the class name if it doesn't contain any underscores, so that + * + * $request->setAdapter('curl'); + * + * will work. + * + * @param string|HTTP_Request2_Adapter $adapter Adapter to use + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setAdapter($adapter) + { + if (is_string($adapter)) { + if (!class_exists($adapter, false)) { + if (false === strpos($adapter, '_')) { + $adapter = 'HTTP_Request2_Adapter_' . ucfirst($adapter); + } + if (!class_exists($adapter, false) + && preg_match('/^HTTP_Request2_Adapter_([a-zA-Z0-9]+)$/', $adapter) + ) { + include_once str_replace('_', DIRECTORY_SEPARATOR, $adapter) . '.php'; + } + if (!class_exists($adapter, false)) { + throw new HTTP_Request2_LogicException( + "Class {$adapter} not found", + HTTP_Request2_Exception::MISSING_VALUE + ); + } + } + $adapter = new $adapter; + } + if (!$adapter instanceof HTTP_Request2_Adapter) { + throw new HTTP_Request2_LogicException( + 'Parameter is not a HTTP request adapter', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $this->adapter = $adapter; + + return $this; + } + + /** + * Sets the cookie jar + * + * A cookie jar is used to maintain cookies across HTTP requests and + * responses. Cookies from jar will be automatically added to the request + * headers based on request URL. + * + * @param HTTP_Request2_CookieJar|bool $jar Existing CookieJar object, true to + * create a new one, false to remove + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setCookieJar($jar = true) + { + if (!class_exists('HTTP_Request2_CookieJar', false)) { + require_once 'HTTP/Request2/CookieJar.php'; + } + + if ($jar instanceof HTTP_Request2_CookieJar) { + $this->cookieJar = $jar; + } elseif (true === $jar) { + $this->cookieJar = new HTTP_Request2_CookieJar(); + } elseif (!$jar) { + $this->cookieJar = null; + } else { + throw new HTTP_Request2_LogicException( + 'Invalid parameter passed to setCookieJar()', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + + return $this; + } + + /** + * Returns current CookieJar object or null if none + * + * @return HTTP_Request2_CookieJar|null + */ + public function getCookieJar() + { + return $this->cookieJar; + } + + /** + * Sends the request and returns the response + * + * @throws HTTP_Request2_Exception + * @return HTTP_Request2_Response + */ + public function send() + { + // Sanity check for URL + if (!$this->url instanceof Net_URL2 + || !$this->url->isAbsolute() + || !in_array(strtolower($this->url->getScheme()), array('https', 'http')) + ) { + throw new HTTP_Request2_LogicException( + 'HTTP_Request2 needs an absolute HTTP(S) request URL, ' + . ($this->url instanceof Net_URL2 + ? "'" . $this->url->__toString() . "'" : 'none') + . ' given', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + if (empty($this->adapter)) { + $this->setAdapter($this->getConfig('adapter')); + } + // magic_quotes_runtime may break file uploads and chunked response + // processing; see bug #4543. Don't use ini_get() here; see bug #16440. + if ($magicQuotes = get_magic_quotes_runtime()) { + set_magic_quotes_runtime(false); + } + // force using single byte encoding if mbstring extension overloads + // strlen() and substr(); see bug #1781, bug #10605 + if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { + $oldEncoding = mb_internal_encoding(); + mb_internal_encoding('8bit'); + } + + try { + $response = $this->adapter->sendRequest($this); + } catch (Exception $e) { + } + // cleanup in either case (poor man's "finally" clause) + if ($magicQuotes) { + set_magic_quotes_runtime(true); + } + if (!empty($oldEncoding)) { + mb_internal_encoding($oldEncoding); + } + // rethrow the exception + if (!empty($e)) { + throw $e; + } + return $response; + } + + /** + * Wrapper around fopen()/fstat() used by setBody() and addUpload() + * + * @param string|resource $file file name or pointer to open file + * @param bool $detectType whether to try autodetecting MIME + * type of file, will only work if $file is a + * filename, not pointer + * + * @return array array('fp' => file pointer, 'size' => file size, 'type' => MIME type) + * @throws HTTP_Request2_LogicException + */ + protected function fopenWrapper($file, $detectType = false) + { + if (!is_string($file) && !is_resource($file)) { + throw new HTTP_Request2_LogicException( + "Filename or file pointer resource expected", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $fileData = array( + 'fp' => is_string($file)? null: $file, + 'type' => 'application/octet-stream', + 'size' => 0 + ); + if (is_string($file)) { + if (!($fileData['fp'] = @fopen($file, 'rb'))) { + $error = error_get_last(); + throw new HTTP_Request2_LogicException( + $error['message'], HTTP_Request2_Exception::READ_ERROR + ); + } + if ($detectType) { + $fileData['type'] = self::detectMimeType($file); + } + } + if (!($stat = fstat($fileData['fp']))) { + throw new HTTP_Request2_LogicException( + "fstat() call failed", HTTP_Request2_Exception::READ_ERROR + ); + } + $fileData['size'] = $stat['size']; + + return $fileData; + } + + /** + * Tries to detect MIME type of a file + * + * The method will try to use fileinfo extension if it is available, + * deprecated mime_content_type() function in the other case. If neither + * works, default 'application/octet-stream' MIME type is returned + * + * @param string $filename file name + * + * @return string file MIME type + */ + protected static function detectMimeType($filename) + { + // finfo extension from PECL available + if (function_exists('finfo_open')) { + if (!isset(self::$_fileinfoDb)) { + self::$_fileinfoDb = @finfo_open(FILEINFO_MIME); + } + if (self::$_fileinfoDb) { + $info = finfo_file(self::$_fileinfoDb, $filename); + } + } + // (deprecated) mime_content_type function available + if (empty($info) && function_exists('mime_content_type')) { + $info = mime_content_type($filename); + } + return empty($info)? 'application/octet-stream': $info; + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Adapter.php b/bundled-libs/HTTP/Request2/Adapter.php index 2b29fcef..03563279 100644 --- a/bundled-libs/HTTP/Request2/Adapter.php +++ b/bundled-libs/HTTP/Request2/Adapter.php @@ -1,137 +1,137 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Class representing a HTTP response - */ -require_once 'HTTP/Request2/Response.php'; - -/** - * Base class for HTTP_Request2 adapters - * - * HTTP_Request2 class itself only defines methods for aggregating the request - * data, all actual work of sending the request to the remote server and - * receiving its response is performed by adapters. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -abstract class HTTP_Request2_Adapter -{ - /** - * A list of methods that MUST NOT have a request body, per RFC 2616 - * @var array - */ - protected static $bodyDisallowed = array('TRACE'); - - /** - * Methods having defined semantics for request body - * - * Content-Length header (indicating that the body follows, section 4.3 of - * RFC 2616) will be sent for these methods even if no body was added - * - * @var array - * @link http://pear.php.net/bugs/bug.php?id=12900 - * @link http://pear.php.net/bugs/bug.php?id=14740 - */ - protected static $bodyRequired = array('POST', 'PUT'); - - /** - * Request being sent - * @var HTTP_Request2 - */ - protected $request; - - /** - * Request body - * @var string|resource|HTTP_Request2_MultipartBody - * @see HTTP_Request2::getBody() - */ - protected $requestBody; - - /** - * Length of the request body - * @var integer - */ - protected $contentLength; - - /** - * Sends request to the remote server and returns its response - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - abstract public function sendRequest(HTTP_Request2 $request); - - /** - * Calculates length of the request body, adds proper headers - * - * @param array &$headers associative array of request headers, this method - * will add proper 'Content-Length' and 'Content-Type' - * headers to this array (or remove them if not needed) - */ - protected function calculateRequestLength(&$headers) - { - $this->requestBody = $this->request->getBody(); - - if (is_string($this->requestBody)) { - $this->contentLength = strlen($this->requestBody); - } elseif (is_resource($this->requestBody)) { - $stat = fstat($this->requestBody); - $this->contentLength = $stat['size']; - rewind($this->requestBody); - } else { - $this->contentLength = $this->requestBody->getLength(); - $headers['content-type'] = 'multipart/form-data; boundary=' . - $this->requestBody->getBoundary(); - $this->requestBody->rewind(); - } - - if (in_array($this->request->getMethod(), self::$bodyDisallowed) - || 0 == $this->contentLength - ) { - // No body: send a Content-Length header nonetheless (request #12900), - // but do that only for methods that require a body (bug #14740) - if (in_array($this->request->getMethod(), self::$bodyRequired)) { - $headers['content-length'] = 0; - } else { - unset($headers['content-length']); - // if the method doesn't require a body and doesn't have a - // body, don't send a Content-Type header. (request #16799) - unset($headers['content-type']); - } - } else { - if (empty($headers['content-type'])) { - $headers['content-type'] = 'application/x-www-form-urlencoded'; - } - // Content-Length should not be sent for chunked Transfer-Encoding (bug #20125) - if (!isset($headers['transfer-encoding'])) { - $headers['content-length'] = $this->contentLength; - } - } - } -} -?> + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Class representing a HTTP response + */ +require_once 'HTTP/Request2/Response.php'; + +/** + * Base class for HTTP_Request2 adapters + * + * HTTP_Request2 class itself only defines methods for aggregating the request + * data, all actual work of sending the request to the remote server and + * receiving its response is performed by adapters. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +abstract class HTTP_Request2_Adapter +{ + /** + * A list of methods that MUST NOT have a request body, per RFC 2616 + * @var array + */ + protected static $bodyDisallowed = array('TRACE'); + + /** + * Methods having defined semantics for request body + * + * Content-Length header (indicating that the body follows, section 4.3 of + * RFC 2616) will be sent for these methods even if no body was added + * + * @var array + * @link http://pear.php.net/bugs/bug.php?id=12900 + * @link http://pear.php.net/bugs/bug.php?id=14740 + */ + protected static $bodyRequired = array('POST', 'PUT'); + + /** + * Request being sent + * @var HTTP_Request2 + */ + protected $request; + + /** + * Request body + * @var string|resource|HTTP_Request2_MultipartBody + * @see HTTP_Request2::getBody() + */ + protected $requestBody; + + /** + * Length of the request body + * @var integer + */ + protected $contentLength; + + /** + * Sends request to the remote server and returns its response + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + abstract public function sendRequest(HTTP_Request2 $request); + + /** + * Calculates length of the request body, adds proper headers + * + * @param array &$headers associative array of request headers, this method + * will add proper 'Content-Length' and 'Content-Type' + * headers to this array (or remove them if not needed) + */ + protected function calculateRequestLength(&$headers) + { + $this->requestBody = $this->request->getBody(); + + if (is_string($this->requestBody)) { + $this->contentLength = strlen($this->requestBody); + } elseif (is_resource($this->requestBody)) { + $stat = fstat($this->requestBody); + $this->contentLength = $stat['size']; + rewind($this->requestBody); + } else { + $this->contentLength = $this->requestBody->getLength(); + $headers['content-type'] = 'multipart/form-data; boundary=' . + $this->requestBody->getBoundary(); + $this->requestBody->rewind(); + } + + if (in_array($this->request->getMethod(), self::$bodyDisallowed) + || 0 == $this->contentLength + ) { + // No body: send a Content-Length header nonetheless (request #12900), + // but do that only for methods that require a body (bug #14740) + if (in_array($this->request->getMethod(), self::$bodyRequired)) { + $headers['content-length'] = 0; + } else { + unset($headers['content-length']); + // if the method doesn't require a body and doesn't have a + // body, don't send a Content-Type header. (request #16799) + unset($headers['content-type']); + } + } else { + if (empty($headers['content-type'])) { + $headers['content-type'] = 'application/x-www-form-urlencoded'; + } + // Content-Length should not be sent for chunked Transfer-Encoding (bug #20125) + if (!isset($headers['transfer-encoding'])) { + $headers['content-length'] = $this->contentLength; + } + } + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Adapter/Curl.php b/bundled-libs/HTTP/Request2/Adapter/Curl.php index 4fb8eb54..13d4a299 100644 --- a/bundled-libs/HTTP/Request2/Adapter/Curl.php +++ b/bundled-libs/HTTP/Request2/Adapter/Curl.php @@ -1,567 +1,577 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Base class for HTTP_Request2 adapters - */ -require_once 'HTTP/Request2/Adapter.php'; - -/** - * Adapter for HTTP_Request2 wrapping around cURL extension - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Adapter_Curl extends HTTP_Request2_Adapter -{ - /** - * Mapping of header names to cURL options - * @var array - */ - protected static $headerMap = array( - 'accept-encoding' => CURLOPT_ENCODING, - 'cookie' => CURLOPT_COOKIE, - 'referer' => CURLOPT_REFERER, - 'user-agent' => CURLOPT_USERAGENT - ); - - /** - * Mapping of SSL context options to cURL options - * @var array - */ - protected static $sslContextMap = array( - 'ssl_verify_peer' => CURLOPT_SSL_VERIFYPEER, - 'ssl_cafile' => CURLOPT_CAINFO, - 'ssl_capath' => CURLOPT_CAPATH, - 'ssl_local_cert' => CURLOPT_SSLCERT, - 'ssl_passphrase' => CURLOPT_SSLCERTPASSWD - ); - - /** - * Mapping of CURLE_* constants to Exception subclasses and error codes - * @var array - */ - protected static $errorMap = array( - CURLE_UNSUPPORTED_PROTOCOL => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::NON_HTTP_REDIRECT), - CURLE_COULDNT_RESOLVE_PROXY => array('HTTP_Request2_ConnectionException'), - CURLE_COULDNT_RESOLVE_HOST => array('HTTP_Request2_ConnectionException'), - CURLE_COULDNT_CONNECT => array('HTTP_Request2_ConnectionException'), - // error returned from write callback - CURLE_WRITE_ERROR => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::NON_HTTP_REDIRECT), - CURLE_OPERATION_TIMEOUTED => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::TIMEOUT), - CURLE_HTTP_RANGE_ERROR => array('HTTP_Request2_MessageException'), - CURLE_SSL_CONNECT_ERROR => array('HTTP_Request2_ConnectionException'), - CURLE_LIBRARY_NOT_FOUND => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_FUNCTION_NOT_FOUND => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_ABORTED_BY_CALLBACK => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::NON_HTTP_REDIRECT), - CURLE_TOO_MANY_REDIRECTS => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::TOO_MANY_REDIRECTS), - CURLE_SSL_PEER_CERTIFICATE => array('HTTP_Request2_ConnectionException'), - CURLE_GOT_NOTHING => array('HTTP_Request2_MessageException'), - CURLE_SSL_ENGINE_NOTFOUND => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_SSL_ENGINE_SETFAILED => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_SEND_ERROR => array('HTTP_Request2_MessageException'), - CURLE_RECV_ERROR => array('HTTP_Request2_MessageException'), - CURLE_SSL_CERTPROBLEM => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::INVALID_ARGUMENT), - CURLE_SSL_CIPHER => array('HTTP_Request2_ConnectionException'), - CURLE_SSL_CACERT => array('HTTP_Request2_ConnectionException'), - CURLE_BAD_CONTENT_ENCODING => array('HTTP_Request2_MessageException'), - ); - - /** - * Response being received - * @var HTTP_Request2_Response - */ - protected $response; - - /** - * Whether 'sentHeaders' event was sent to observers - * @var boolean - */ - protected $eventSentHeaders = false; - - /** - * Whether 'receivedHeaders' event was sent to observers - * @var boolean - */ - protected $eventReceivedHeaders = false; - - /** - * Position within request body - * @var integer - * @see callbackReadBody() - */ - protected $position = 0; - - /** - * Information about last transfer, as returned by curl_getinfo() - * @var array - */ - protected $lastInfo; - - /** - * Creates a subclass of HTTP_Request2_Exception from curl error data - * - * @param resource $ch curl handle - * - * @return HTTP_Request2_Exception - */ - protected static function wrapCurlError($ch) - { - $nativeCode = curl_errno($ch); - $message = 'Curl error: ' . curl_error($ch); - if (!isset(self::$errorMap[$nativeCode])) { - return new HTTP_Request2_Exception($message, 0, $nativeCode); - } else { - $class = self::$errorMap[$nativeCode][0]; - $code = empty(self::$errorMap[$nativeCode][1]) - ? 0 : self::$errorMap[$nativeCode][1]; - return new $class($message, $code, $nativeCode); - } - } - - /** - * Sends request to the remote server and returns its response - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public function sendRequest(HTTP_Request2 $request) - { - if (!extension_loaded('curl')) { - throw new HTTP_Request2_LogicException( - 'cURL extension not available', HTTP_Request2_Exception::MISCONFIGURATION - ); - } - - $this->request = $request; - $this->response = null; - $this->position = 0; - $this->eventSentHeaders = false; - $this->eventReceivedHeaders = false; - - try { - if (false === curl_exec($ch = $this->createCurlHandle())) { - $e = self::wrapCurlError($ch); - } - } catch (Exception $e) { - } - if (isset($ch)) { - $this->lastInfo = curl_getinfo($ch); - curl_close($ch); - } - - $response = $this->response; - unset($this->request, $this->requestBody, $this->response); - - if (!empty($e)) { - throw $e; - } - - if ($jar = $request->getCookieJar()) { - $jar->addCookiesFromResponse($response, $request->getUrl()); - } - - if (0 < $this->lastInfo['size_download']) { - $request->setLastEvent('receivedBody', $response); - } - return $response; - } - - /** - * Returns information about last transfer - * - * @return array associative array as returned by curl_getinfo() - */ - public function getInfo() - { - return $this->lastInfo; - } - - /** - * Creates a new cURL handle and populates it with data from the request - * - * @return resource a cURL handle, as created by curl_init() - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_NotImplementedException - */ - protected function createCurlHandle() - { - $ch = curl_init(); - - curl_setopt_array($ch, array( - // setup write callbacks - CURLOPT_HEADERFUNCTION => array($this, 'callbackWriteHeader'), - CURLOPT_WRITEFUNCTION => array($this, 'callbackWriteBody'), - // buffer size - CURLOPT_BUFFERSIZE => $this->request->getConfig('buffer_size'), - // connection timeout - CURLOPT_CONNECTTIMEOUT => $this->request->getConfig('connect_timeout'), - // save full outgoing headers, in case someone is interested - CURLINFO_HEADER_OUT => true, - // request url - CURLOPT_URL => $this->request->getUrl()->getUrl() - )); - - // set up redirects - if (!$this->request->getConfig('follow_redirects')) { - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); - } else { - if (!@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true)) { - throw new HTTP_Request2_LogicException( - 'Redirect support in curl is unavailable due to open_basedir or safe_mode setting', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - curl_setopt($ch, CURLOPT_MAXREDIRS, $this->request->getConfig('max_redirects')); - // limit redirects to http(s), works in 5.2.10+ - if (defined('CURLOPT_REDIR_PROTOCOLS')) { - curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); - } - // works in 5.3.2+, http://bugs.php.net/bug.php?id=49571 - if ($this->request->getConfig('strict_redirects') && defined('CURLOPT_POSTREDIR')) { - curl_setopt($ch, CURLOPT_POSTREDIR, 3); - } - } - - // set local IP via CURLOPT_INTERFACE (request #19515) - if ($ip = $this->request->getConfig('local_ip')) { - curl_setopt($ch, CURLOPT_INTERFACE, $ip); - } - - // request timeout - if ($timeout = $this->request->getConfig('timeout')) { - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); - } - - // set HTTP version - switch ($this->request->getConfig('protocol_version')) { - case '1.0': - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - break; - case '1.1': - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); - } - - // set request method - switch ($this->request->getMethod()) { - case HTTP_Request2::METHOD_GET: - curl_setopt($ch, CURLOPT_HTTPGET, true); - break; - case HTTP_Request2::METHOD_POST: - curl_setopt($ch, CURLOPT_POST, true); - break; - case HTTP_Request2::METHOD_HEAD: - curl_setopt($ch, CURLOPT_NOBODY, true); - break; - case HTTP_Request2::METHOD_PUT: - curl_setopt($ch, CURLOPT_UPLOAD, true); - break; - default: - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->request->getMethod()); - } - - // set proxy, if needed - if ($host = $this->request->getConfig('proxy_host')) { - if (!($port = $this->request->getConfig('proxy_port'))) { - throw new HTTP_Request2_LogicException( - 'Proxy port not provided', HTTP_Request2_Exception::MISSING_VALUE - ); - } - curl_setopt($ch, CURLOPT_PROXY, $host . ':' . $port); - if ($user = $this->request->getConfig('proxy_user')) { - curl_setopt( - $ch, CURLOPT_PROXYUSERPWD, - $user . ':' . $this->request->getConfig('proxy_password') - ); - switch ($this->request->getConfig('proxy_auth_scheme')) { - case HTTP_Request2::AUTH_BASIC: - curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); - break; - case HTTP_Request2::AUTH_DIGEST: - curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST); - } - } - if ($type = $this->request->getConfig('proxy_type')) { - switch ($type) { - case 'http': - curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); - break; - case 'socks5': - curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); - break; - default: - throw new HTTP_Request2_NotImplementedException( - "Proxy type '{$type}' is not supported" - ); - } - } - } - - // set authentication data - if ($auth = $this->request->getAuth()) { - curl_setopt($ch, CURLOPT_USERPWD, $auth['user'] . ':' . $auth['password']); - switch ($auth['scheme']) { - case HTTP_Request2::AUTH_BASIC: - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); - break; - case HTTP_Request2::AUTH_DIGEST: - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); - } - } - - // set SSL options - foreach ($this->request->getConfig() as $name => $value) { - if ('ssl_verify_host' == $name && null !== $value) { - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $value? 2: 0); - } elseif (isset(self::$sslContextMap[$name]) && null !== $value) { - curl_setopt($ch, self::$sslContextMap[$name], $value); - } - } - - $headers = $this->request->getHeaders(); - // make cURL automagically send proper header - if (!isset($headers['accept-encoding'])) { - $headers['accept-encoding'] = ''; - } - - if (($jar = $this->request->getCookieJar()) - && ($cookies = $jar->getMatching($this->request->getUrl(), true)) - ) { - $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; - } - - // set headers having special cURL keys - foreach (self::$headerMap as $name => $option) { - if (isset($headers[$name])) { - curl_setopt($ch, $option, $headers[$name]); - unset($headers[$name]); - } - } - - $this->calculateRequestLength($headers); - if (isset($headers['content-length']) || isset($headers['transfer-encoding'])) { - $this->workaroundPhpBug47204($ch, $headers); - } - - // set headers not having special keys - $headersFmt = array(); - foreach ($headers as $name => $value) { - $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); - $headersFmt[] = $canonicalName . ': ' . $value; - } - curl_setopt($ch, CURLOPT_HTTPHEADER, $headersFmt); - - return $ch; - } - - /** - * Workaround for PHP bug #47204 that prevents rewinding request body - * - * The workaround consists of reading the entire request body into memory - * and setting it as CURLOPT_POSTFIELDS, so it isn't recommended for large - * file uploads, use Socket adapter instead. - * - * @param resource $ch cURL handle - * @param array &$headers Request headers - */ - protected function workaroundPhpBug47204($ch, &$headers) - { - // no redirects, no digest auth -> probably no rewind needed - if (!$this->request->getConfig('follow_redirects') - && (!($auth = $this->request->getAuth()) - || HTTP_Request2::AUTH_DIGEST != $auth['scheme']) - ) { - curl_setopt($ch, CURLOPT_READFUNCTION, array($this, 'callbackReadBody')); - - } else { - // rewind may be needed, read the whole body into memory - if ($this->requestBody instanceof HTTP_Request2_MultipartBody) { - $this->requestBody = $this->requestBody->__toString(); - - } elseif (is_resource($this->requestBody)) { - $fp = $this->requestBody; - $this->requestBody = ''; - while (!feof($fp)) { - $this->requestBody .= fread($fp, 16384); - } - } - // curl hangs up if content-length is present - unset($headers['content-length']); - curl_setopt($ch, CURLOPT_POSTFIELDS, $this->requestBody); - } - } - - /** - * Callback function called by cURL for reading the request body - * - * @param resource $ch cURL handle - * @param resource $fd file descriptor (not used) - * @param integer $length maximum length of data to return - * - * @return string part of the request body, up to $length bytes - */ - protected function callbackReadBody($ch, $fd, $length) - { - if (!$this->eventSentHeaders) { - $this->request->setLastEvent( - 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) - ); - $this->eventSentHeaders = true; - } - if (in_array($this->request->getMethod(), self::$bodyDisallowed) - || 0 == $this->contentLength || $this->position >= $this->contentLength - ) { - return ''; - } - if (is_string($this->requestBody)) { - $string = substr($this->requestBody, $this->position, $length); - } elseif (is_resource($this->requestBody)) { - $string = fread($this->requestBody, $length); - } else { - $string = $this->requestBody->read($length); - } - $this->request->setLastEvent('sentBodyPart', strlen($string)); - $this->position += strlen($string); - return $string; - } - - /** - * Callback function called by cURL for saving the response headers - * - * @param resource $ch cURL handle - * @param string $string response header (with trailing CRLF) - * - * @return integer number of bytes saved - * @see HTTP_Request2_Response::parseHeaderLine() - */ - protected function callbackWriteHeader($ch, $string) - { - // we may receive a second set of headers if doing e.g. digest auth - if ($this->eventReceivedHeaders || !$this->eventSentHeaders) { - // don't bother with 100-Continue responses (bug #15785) - if (!$this->eventSentHeaders - || $this->response->getStatus() >= 200 - ) { - $this->request->setLastEvent( - 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) - ); - } - $upload = curl_getinfo($ch, CURLINFO_SIZE_UPLOAD); - // if body wasn't read by a callback, send event with total body size - if ($upload > $this->position) { - $this->request->setLastEvent( - 'sentBodyPart', $upload - $this->position - ); - $this->position = $upload; - } - if ($upload && (!$this->eventSentHeaders - || $this->response->getStatus() >= 200) - ) { - $this->request->setLastEvent('sentBody', $upload); - } - $this->eventSentHeaders = true; - // we'll need a new response object - if ($this->eventReceivedHeaders) { - $this->eventReceivedHeaders = false; - $this->response = null; - } - } - if (empty($this->response)) { - $this->response = new HTTP_Request2_Response( - $string, false, curl_getinfo($ch, CURLINFO_EFFECTIVE_URL) - ); - } else { - $this->response->parseHeaderLine($string); - if ('' == trim($string)) { - // don't bother with 100-Continue responses (bug #15785) - if (200 <= $this->response->getStatus()) { - $this->request->setLastEvent('receivedHeaders', $this->response); - } - - if ($this->request->getConfig('follow_redirects') && $this->response->isRedirect()) { - $redirectUrl = new Net_URL2($this->response->getHeader('location')); - - // for versions lower than 5.2.10, check the redirection URL protocol - if (!defined('CURLOPT_REDIR_PROTOCOLS') && $redirectUrl->isAbsolute() - && !in_array($redirectUrl->getScheme(), array('http', 'https')) - ) { - return -1; - } - - if ($jar = $this->request->getCookieJar()) { - $jar->addCookiesFromResponse($this->response, $this->request->getUrl()); - if (!$redirectUrl->isAbsolute()) { - $redirectUrl = $this->request->getUrl()->resolve($redirectUrl); - } - if ($cookies = $jar->getMatching($redirectUrl, true)) { - curl_setopt($ch, CURLOPT_COOKIE, $cookies); - } - } - } - $this->eventReceivedHeaders = true; - } - } - return strlen($string); - } - - /** - * Callback function called by cURL for saving the response body - * - * @param resource $ch cURL handle (not used) - * @param string $string part of the response body - * - * @return integer number of bytes saved - * @throws HTTP_Request2_MessageException - * @see HTTP_Request2_Response::appendBody() - */ - protected function callbackWriteBody($ch, $string) - { - // cURL calls WRITEFUNCTION callback without calling HEADERFUNCTION if - // response doesn't start with proper HTTP status line (see bug #15716) - if (empty($this->response)) { - throw new HTTP_Request2_MessageException( - "Malformed response: {$string}", - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } - if ($this->request->getConfig('store_body')) { - $this->response->appendBody($string); - } - $this->request->setLastEvent('receivedBodyPart', $string); - return strlen($string); - } -} -?> + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Base class for HTTP_Request2 adapters + */ +require_once 'HTTP/Request2/Adapter.php'; + +/** + * Adapter for HTTP_Request2 wrapping around cURL extension + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Adapter_Curl extends HTTP_Request2_Adapter +{ + /** + * Mapping of header names to cURL options + * @var array + */ + protected static $headerMap = array( + 'accept-encoding' => CURLOPT_ENCODING, + 'cookie' => CURLOPT_COOKIE, + 'referer' => CURLOPT_REFERER, + 'user-agent' => CURLOPT_USERAGENT + ); + + /** + * Mapping of SSL context options to cURL options + * @var array + */ + protected static $sslContextMap = array( + 'ssl_verify_peer' => CURLOPT_SSL_VERIFYPEER, + 'ssl_cafile' => CURLOPT_CAINFO, + 'ssl_capath' => CURLOPT_CAPATH, + 'ssl_local_cert' => CURLOPT_SSLCERT, + 'ssl_passphrase' => CURLOPT_SSLCERTPASSWD + ); + + /** + * Mapping of CURLE_* constants to Exception subclasses and error codes + * @var array + */ + protected static $errorMap = array( + CURLE_UNSUPPORTED_PROTOCOL => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::NON_HTTP_REDIRECT), + CURLE_COULDNT_RESOLVE_PROXY => array('HTTP_Request2_ConnectionException'), + CURLE_COULDNT_RESOLVE_HOST => array('HTTP_Request2_ConnectionException'), + CURLE_COULDNT_CONNECT => array('HTTP_Request2_ConnectionException'), + // error returned from write callback + CURLE_WRITE_ERROR => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::NON_HTTP_REDIRECT), + CURLE_OPERATION_TIMEOUTED => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::TIMEOUT), + CURLE_HTTP_RANGE_ERROR => array('HTTP_Request2_MessageException'), + CURLE_SSL_CONNECT_ERROR => array('HTTP_Request2_ConnectionException'), + CURLE_LIBRARY_NOT_FOUND => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_FUNCTION_NOT_FOUND => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_ABORTED_BY_CALLBACK => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::NON_HTTP_REDIRECT), + CURLE_TOO_MANY_REDIRECTS => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::TOO_MANY_REDIRECTS), + CURLE_SSL_PEER_CERTIFICATE => array('HTTP_Request2_ConnectionException'), + CURLE_GOT_NOTHING => array('HTTP_Request2_MessageException'), + CURLE_SSL_ENGINE_NOTFOUND => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_SSL_ENGINE_SETFAILED => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_SEND_ERROR => array('HTTP_Request2_MessageException'), + CURLE_RECV_ERROR => array('HTTP_Request2_MessageException'), + CURLE_SSL_CERTPROBLEM => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::INVALID_ARGUMENT), + CURLE_SSL_CIPHER => array('HTTP_Request2_ConnectionException'), + CURLE_SSL_CACERT => array('HTTP_Request2_ConnectionException'), + CURLE_BAD_CONTENT_ENCODING => array('HTTP_Request2_MessageException'), + ); + + /** + * Response being received + * @var HTTP_Request2_Response + */ + protected $response; + + /** + * Whether 'sentHeaders' event was sent to observers + * @var boolean + */ + protected $eventSentHeaders = false; + + /** + * Whether 'receivedHeaders' event was sent to observers + * @var boolean + */ + protected $eventReceivedHeaders = false; + + /** + * Whether 'sentBoody' event was sent to observers + * @var boolean + */ + protected $eventSentBody = false; + + /** + * Position within request body + * @var integer + * @see callbackReadBody() + */ + protected $position = 0; + + /** + * Information about last transfer, as returned by curl_getinfo() + * @var array + */ + protected $lastInfo; + + /** + * Creates a subclass of HTTP_Request2_Exception from curl error data + * + * @param resource $ch curl handle + * + * @return HTTP_Request2_Exception + */ + protected static function wrapCurlError($ch) + { + $nativeCode = curl_errno($ch); + $message = 'Curl error: ' . curl_error($ch); + if (!isset(self::$errorMap[$nativeCode])) { + return new HTTP_Request2_Exception($message, 0, $nativeCode); + } else { + $class = self::$errorMap[$nativeCode][0]; + $code = empty(self::$errorMap[$nativeCode][1]) + ? 0 : self::$errorMap[$nativeCode][1]; + return new $class($message, $code, $nativeCode); + } + } + + /** + * Sends request to the remote server and returns its response + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public function sendRequest(HTTP_Request2 $request) + { + if (!extension_loaded('curl')) { + throw new HTTP_Request2_LogicException( + 'cURL extension not available', HTTP_Request2_Exception::MISCONFIGURATION + ); + } + + $this->request = $request; + $this->response = null; + $this->position = 0; + $this->eventSentHeaders = false; + $this->eventReceivedHeaders = false; + $this->eventSentBody = false; + + try { + if (false === curl_exec($ch = $this->createCurlHandle())) { + $e = self::wrapCurlError($ch); + } + } catch (Exception $e) { + } + if (isset($ch)) { + $this->lastInfo = curl_getinfo($ch); + if (CURLE_OK !== curl_errno($ch)) { + $this->request->setLastEvent('warning', curl_error($ch)); + } + curl_close($ch); + } + + $response = $this->response; + unset($this->request, $this->requestBody, $this->response); + + if (!empty($e)) { + throw $e; + } + + if ($jar = $request->getCookieJar()) { + $jar->addCookiesFromResponse($response); + } + + if (0 < $this->lastInfo['size_download']) { + $request->setLastEvent('receivedBody', $response); + } + return $response; + } + + /** + * Returns information about last transfer + * + * @return array associative array as returned by curl_getinfo() + */ + public function getInfo() + { + return $this->lastInfo; + } + + /** + * Creates a new cURL handle and populates it with data from the request + * + * @return resource a cURL handle, as created by curl_init() + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_NotImplementedException + */ + protected function createCurlHandle() + { + $ch = curl_init(); + + curl_setopt_array($ch, array( + // setup write callbacks + CURLOPT_HEADERFUNCTION => array($this, 'callbackWriteHeader'), + CURLOPT_WRITEFUNCTION => array($this, 'callbackWriteBody'), + // buffer size + CURLOPT_BUFFERSIZE => $this->request->getConfig('buffer_size'), + // connection timeout + CURLOPT_CONNECTTIMEOUT => $this->request->getConfig('connect_timeout'), + // save full outgoing headers, in case someone is interested + CURLINFO_HEADER_OUT => true, + // request url + CURLOPT_URL => $this->request->getUrl()->getUrl() + )); + + // set up redirects + if (!$this->request->getConfig('follow_redirects')) { + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); + } else { + if (!@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true)) { + throw new HTTP_Request2_LogicException( + 'Redirect support in curl is unavailable due to open_basedir or safe_mode setting', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + curl_setopt($ch, CURLOPT_MAXREDIRS, $this->request->getConfig('max_redirects')); + // limit redirects to http(s), works in 5.2.10+ + if (defined('CURLOPT_REDIR_PROTOCOLS')) { + curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + } + // works in 5.3.2+, http://bugs.php.net/bug.php?id=49571 + if ($this->request->getConfig('strict_redirects') && defined('CURLOPT_POSTREDIR')) { + curl_setopt($ch, CURLOPT_POSTREDIR, 3); + } + } + + // set local IP via CURLOPT_INTERFACE (request #19515) + if ($ip = $this->request->getConfig('local_ip')) { + curl_setopt($ch, CURLOPT_INTERFACE, $ip); + } + + // request timeout + if ($timeout = $this->request->getConfig('timeout')) { + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); + } + + // set HTTP version + switch ($this->request->getConfig('protocol_version')) { + case '1.0': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); + break; + case '1.1': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + } + + // set request method + switch ($this->request->getMethod()) { + case HTTP_Request2::METHOD_GET: + curl_setopt($ch, CURLOPT_HTTPGET, true); + break; + case HTTP_Request2::METHOD_POST: + curl_setopt($ch, CURLOPT_POST, true); + break; + case HTTP_Request2::METHOD_HEAD: + curl_setopt($ch, CURLOPT_NOBODY, true); + break; + case HTTP_Request2::METHOD_PUT: + curl_setopt($ch, CURLOPT_UPLOAD, true); + break; + default: + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->request->getMethod()); + } + + // set proxy, if needed + if ($host = $this->request->getConfig('proxy_host')) { + if (!($port = $this->request->getConfig('proxy_port'))) { + throw new HTTP_Request2_LogicException( + 'Proxy port not provided', HTTP_Request2_Exception::MISSING_VALUE + ); + } + curl_setopt($ch, CURLOPT_PROXY, $host . ':' . $port); + if ($user = $this->request->getConfig('proxy_user')) { + curl_setopt( + $ch, CURLOPT_PROXYUSERPWD, + $user . ':' . $this->request->getConfig('proxy_password') + ); + switch ($this->request->getConfig('proxy_auth_scheme')) { + case HTTP_Request2::AUTH_BASIC: + curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); + break; + case HTTP_Request2::AUTH_DIGEST: + curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST); + } + } + if ($type = $this->request->getConfig('proxy_type')) { + switch ($type) { + case 'http': + curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + break; + case 'socks5': + curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + break; + default: + throw new HTTP_Request2_NotImplementedException( + "Proxy type '{$type}' is not supported" + ); + } + } + } + + // set authentication data + if ($auth = $this->request->getAuth()) { + curl_setopt($ch, CURLOPT_USERPWD, $auth['user'] . ':' . $auth['password']); + switch ($auth['scheme']) { + case HTTP_Request2::AUTH_BASIC: + curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); + break; + case HTTP_Request2::AUTH_DIGEST: + curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); + } + } + + // set SSL options + foreach ($this->request->getConfig() as $name => $value) { + if ('ssl_verify_host' == $name && null !== $value) { + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $value? 2: 0); + } elseif (isset(self::$sslContextMap[$name]) && null !== $value) { + curl_setopt($ch, self::$sslContextMap[$name], $value); + } + } + + $headers = $this->request->getHeaders(); + // make cURL automagically send proper header + if (!isset($headers['accept-encoding'])) { + $headers['accept-encoding'] = ''; + } + + if (($jar = $this->request->getCookieJar()) + && ($cookies = $jar->getMatching($this->request->getUrl(), true)) + ) { + $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; + } + + // set headers having special cURL keys + foreach (self::$headerMap as $name => $option) { + if (isset($headers[$name])) { + curl_setopt($ch, $option, $headers[$name]); + unset($headers[$name]); + } + } + + $this->calculateRequestLength($headers); + if (isset($headers['content-length']) || isset($headers['transfer-encoding'])) { + $this->workaroundPhpBug47204($ch, $headers); + } + + // set headers not having special keys + $headersFmt = array(); + foreach ($headers as $name => $value) { + $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); + $headersFmt[] = $canonicalName . ': ' . $value; + } + curl_setopt($ch, CURLOPT_HTTPHEADER, $headersFmt); + + return $ch; + } + + /** + * Workaround for PHP bug #47204 that prevents rewinding request body + * + * The workaround consists of reading the entire request body into memory + * and setting it as CURLOPT_POSTFIELDS, so it isn't recommended for large + * file uploads, use Socket adapter instead. + * + * @param resource $ch cURL handle + * @param array &$headers Request headers + */ + protected function workaroundPhpBug47204($ch, &$headers) + { + // no redirects, no digest auth -> probably no rewind needed + // also apply workaround only for POSTs, othrerwise we get + // https://pear.php.net/bugs/bug.php?id=20440 for PUTs + if (!$this->request->getConfig('follow_redirects') + && (!($auth = $this->request->getAuth()) + || HTTP_Request2::AUTH_DIGEST != $auth['scheme']) + || HTTP_Request2::METHOD_POST !== $this->request->getMethod() + ) { + curl_setopt($ch, CURLOPT_READFUNCTION, array($this, 'callbackReadBody')); + + } else { + // rewind may be needed, read the whole body into memory + if ($this->requestBody instanceof HTTP_Request2_MultipartBody) { + $this->requestBody = $this->requestBody->__toString(); + + } elseif (is_resource($this->requestBody)) { + $fp = $this->requestBody; + $this->requestBody = ''; + while (!feof($fp)) { + $this->requestBody .= fread($fp, 16384); + } + } + // curl hangs up if content-length is present + unset($headers['content-length']); + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->requestBody); + } + } + + /** + * Callback function called by cURL for reading the request body + * + * @param resource $ch cURL handle + * @param resource $fd file descriptor (not used) + * @param integer $length maximum length of data to return + * + * @return string part of the request body, up to $length bytes + */ + protected function callbackReadBody($ch, $fd, $length) + { + if (!$this->eventSentHeaders) { + $this->request->setLastEvent( + 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) + ); + $this->eventSentHeaders = true; + } + if (in_array($this->request->getMethod(), self::$bodyDisallowed) + || 0 == $this->contentLength || $this->position >= $this->contentLength + ) { + return ''; + } + if (is_string($this->requestBody)) { + $string = substr($this->requestBody, $this->position, $length); + } elseif (is_resource($this->requestBody)) { + $string = fread($this->requestBody, $length); + } else { + $string = $this->requestBody->read($length); + } + $this->request->setLastEvent('sentBodyPart', strlen($string)); + $this->position += strlen($string); + return $string; + } + + /** + * Callback function called by cURL for saving the response headers + * + * @param resource $ch cURL handle + * @param string $string response header (with trailing CRLF) + * + * @return integer number of bytes saved + * @see HTTP_Request2_Response::parseHeaderLine() + */ + protected function callbackWriteHeader($ch, $string) + { + if (!$this->eventSentHeaders + // we may receive a second set of headers if doing e.g. digest auth + // but don't bother with 100-Continue responses (bug #15785) + || $this->eventReceivedHeaders && $this->response->getStatus() >= 200 + ) { + $this->request->setLastEvent( + 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) + ); + } + if (!$this->eventSentBody) { + $upload = curl_getinfo($ch, CURLINFO_SIZE_UPLOAD); + // if body wasn't read by the callback, send event with total body size + if ($upload > $this->position) { + $this->request->setLastEvent( + 'sentBodyPart', $upload - $this->position + ); + } + if ($upload > 0) { + $this->request->setLastEvent('sentBody', $upload); + } + } + $this->eventSentHeaders = true; + $this->eventSentBody = true; + + if ($this->eventReceivedHeaders || empty($this->response)) { + $this->eventReceivedHeaders = false; + $this->response = new HTTP_Request2_Response( + $string, false, curl_getinfo($ch, CURLINFO_EFFECTIVE_URL) + ); + + } else { + $this->response->parseHeaderLine($string); + if ('' == trim($string)) { + // don't bother with 100-Continue responses (bug #15785) + if (200 <= $this->response->getStatus()) { + $this->request->setLastEvent('receivedHeaders', $this->response); + } + + if ($this->request->getConfig('follow_redirects') && $this->response->isRedirect()) { + $redirectUrl = new Net_URL2($this->response->getHeader('location')); + + // for versions lower than 5.2.10, check the redirection URL protocol + if (!defined('CURLOPT_REDIR_PROTOCOLS') && $redirectUrl->isAbsolute() + && !in_array($redirectUrl->getScheme(), array('http', 'https')) + ) { + return -1; + } + + if ($jar = $this->request->getCookieJar()) { + $jar->addCookiesFromResponse($this->response); + if (!$redirectUrl->isAbsolute()) { + $redirectUrl = $this->request->getUrl()->resolve($redirectUrl); + } + if ($cookies = $jar->getMatching($redirectUrl, true)) { + curl_setopt($ch, CURLOPT_COOKIE, $cookies); + } + } + } + $this->eventReceivedHeaders = true; + $this->eventSentBody = false; + } + } + return strlen($string); + } + + /** + * Callback function called by cURL for saving the response body + * + * @param resource $ch cURL handle (not used) + * @param string $string part of the response body + * + * @return integer number of bytes saved + * @throws HTTP_Request2_MessageException + * @see HTTP_Request2_Response::appendBody() + */ + protected function callbackWriteBody($ch, $string) + { + // cURL calls WRITEFUNCTION callback without calling HEADERFUNCTION if + // response doesn't start with proper HTTP status line (see bug #15716) + if (empty($this->response)) { + throw new HTTP_Request2_MessageException( + "Malformed response: {$string}", + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } + if ($this->request->getConfig('store_body')) { + $this->response->appendBody($string); + } + $this->request->setLastEvent('receivedBodyPart', $string); + return strlen($string); + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Adapter/Mock.php b/bundled-libs/HTTP/Request2/Adapter/Mock.php index 9659e621..22b42824 100644 --- a/bundled-libs/HTTP/Request2/Adapter/Mock.php +++ b/bundled-libs/HTTP/Request2/Adapter/Mock.php @@ -1,166 +1,166 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Base class for HTTP_Request2 adapters - */ -require_once 'HTTP/Request2/Adapter.php'; - -/** - * Mock adapter intended for testing - * - * Can be used to test applications depending on HTTP_Request2 package without - * actually performing any HTTP requests. This adapter will return responses - * previously added via addResponse() - * - * $mock = new HTTP_Request2_Adapter_Mock(); - * $mock->addResponse("HTTP/1.1 ... "); - * - * $request = new HTTP_Request2(); - * $request->setAdapter($mock); - * - * // This will return the response set above - * $response = $req->send(); - * - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Adapter_Mock extends HTTP_Request2_Adapter -{ - /** - * A queue of responses to be returned by sendRequest() - * @var array - */ - protected $responses = array(); - - /** - * Returns the next response from the queue built by addResponse() - * - * Only responses without explicit URLs or with URLs equal to request URL - * will be considered. If matching response is not found or the queue is - * empty then default empty response with status 400 will be returned, - * if an Exception object was added to the queue it will be thrown. - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws Exception - */ - public function sendRequest(HTTP_Request2 $request) - { - $requestUrl = (string)$request->getUrl(); - $response = null; - foreach ($this->responses as $k => $v) { - if (!$v[1] || $requestUrl == $v[1]) { - $response = $v[0]; - array_splice($this->responses, $k, 1); - break; - } - } - if (!$response) { - return self::createResponseFromString("HTTP/1.1 400 Bad Request\r\n\r\n"); - - } elseif ($response instanceof HTTP_Request2_Response) { - return $response; - - } else { - // rethrow the exception - $class = get_class($response); - $message = $response->getMessage(); - $code = $response->getCode(); - throw new $class($message, $code); - } - } - - /** - * Adds response to the queue - * - * @param mixed $response either a string, a pointer to an open file, - * an instance of HTTP_Request2_Response or Exception - * @param string $url A request URL this response should be valid for - * (see {@link http://pear.php.net/bugs/bug.php?id=19276}) - * - * @throws HTTP_Request2_Exception - */ - public function addResponse($response, $url = null) - { - if (is_string($response)) { - $response = self::createResponseFromString($response); - } elseif (is_resource($response)) { - $response = self::createResponseFromFile($response); - } elseif (!$response instanceof HTTP_Request2_Response && - !$response instanceof Exception - ) { - throw new HTTP_Request2_Exception('Parameter is not a valid response'); - } - $this->responses[] = array($response, $url); - } - - /** - * Creates a new HTTP_Request2_Response object from a string - * - * @param string $str string containing HTTP response message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public static function createResponseFromString($str) - { - $parts = preg_split('!(\r?\n){2}!m', $str, 2); - $headerLines = explode("\n", $parts[0]); - $response = new HTTP_Request2_Response(array_shift($headerLines)); - foreach ($headerLines as $headerLine) { - $response->parseHeaderLine($headerLine); - } - $response->parseHeaderLine(''); - if (isset($parts[1])) { - $response->appendBody($parts[1]); - } - return $response; - } - - /** - * Creates a new HTTP_Request2_Response object from a file - * - * @param resource $fp file pointer returned by fopen() - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public static function createResponseFromFile($fp) - { - $response = new HTTP_Request2_Response(fgets($fp)); - do { - $headerLine = fgets($fp); - $response->parseHeaderLine($headerLine); - } while ('' != trim($headerLine)); - - while (!feof($fp)) { - $response->appendBody(fread($fp, 8192)); - } - return $response; - } -} + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Base class for HTTP_Request2 adapters + */ +require_once 'HTTP/Request2/Adapter.php'; + +/** + * Mock adapter intended for testing + * + * Can be used to test applications depending on HTTP_Request2 package without + * actually performing any HTTP requests. This adapter will return responses + * previously added via addResponse() + * + * $mock = new HTTP_Request2_Adapter_Mock(); + * $mock->addResponse("HTTP/1.1 ... "); + * + * $request = new HTTP_Request2(); + * $request->setAdapter($mock); + * + * // This will return the response set above + * $response = $req->send(); + * + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Adapter_Mock extends HTTP_Request2_Adapter +{ + /** + * A queue of responses to be returned by sendRequest() + * @var array + */ + protected $responses = array(); + + /** + * Returns the next response from the queue built by addResponse() + * + * Only responses without explicit URLs or with URLs equal to request URL + * will be considered. If matching response is not found or the queue is + * empty then default empty response with status 400 will be returned, + * if an Exception object was added to the queue it will be thrown. + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws Exception + */ + public function sendRequest(HTTP_Request2 $request) + { + $requestUrl = (string)$request->getUrl(); + $response = null; + foreach ($this->responses as $k => $v) { + if (!$v[1] || $requestUrl == $v[1]) { + $response = $v[0]; + array_splice($this->responses, $k, 1); + break; + } + } + if (!$response) { + return self::createResponseFromString("HTTP/1.1 400 Bad Request\r\n\r\n"); + + } elseif ($response instanceof HTTP_Request2_Response) { + return $response; + + } else { + // rethrow the exception + $class = get_class($response); + $message = $response->getMessage(); + $code = $response->getCode(); + throw new $class($message, $code); + } + } + + /** + * Adds response to the queue + * + * @param mixed $response either a string, a pointer to an open file, + * an instance of HTTP_Request2_Response or Exception + * @param string $url A request URL this response should be valid for + * (see {@link http://pear.php.net/bugs/bug.php?id=19276}) + * + * @throws HTTP_Request2_Exception + */ + public function addResponse($response, $url = null) + { + if (is_string($response)) { + $response = self::createResponseFromString($response); + } elseif (is_resource($response)) { + $response = self::createResponseFromFile($response); + } elseif (!$response instanceof HTTP_Request2_Response && + !$response instanceof Exception + ) { + throw new HTTP_Request2_Exception('Parameter is not a valid response'); + } + $this->responses[] = array($response, $url); + } + + /** + * Creates a new HTTP_Request2_Response object from a string + * + * @param string $str string containing HTTP response message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public static function createResponseFromString($str) + { + $parts = preg_split('!(\r?\n){2}!m', $str, 2); + $headerLines = explode("\n", $parts[0]); + $response = new HTTP_Request2_Response(array_shift($headerLines)); + foreach ($headerLines as $headerLine) { + $response->parseHeaderLine($headerLine); + } + $response->parseHeaderLine(''); + if (isset($parts[1])) { + $response->appendBody($parts[1]); + } + return $response; + } + + /** + * Creates a new HTTP_Request2_Response object from a file + * + * @param resource $fp file pointer returned by fopen() + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public static function createResponseFromFile($fp) + { + $response = new HTTP_Request2_Response(fgets($fp)); + do { + $headerLine = fgets($fp); + $response->parseHeaderLine($headerLine); + } while ('' != trim($headerLine)); + + while (!feof($fp)) { + $response->appendBody(fread($fp, 8192)); + } + return $response; + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/Adapter/Socket.php b/bundled-libs/HTTP/Request2/Adapter/Socket.php index 62507fd7..3a1d1860 100644 --- a/bundled-libs/HTTP/Request2/Adapter/Socket.php +++ b/bundled-libs/HTTP/Request2/Adapter/Socket.php @@ -1,1121 +1,1138 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Base class for HTTP_Request2 adapters */ -require_once 'HTTP/Request2/Adapter.php'; - -/** Socket wrapper class */ -require_once 'HTTP/Request2/SocketWrapper.php'; - -/** - * Socket-based adapter for HTTP_Request2 - * - * This adapter uses only PHP sockets and will work on almost any PHP - * environment. Code is based on original HTTP_Request PEAR package. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Adapter_Socket extends HTTP_Request2_Adapter -{ - /** - * Regular expression for 'token' rule from RFC 2616 - */ - const REGEXP_TOKEN = '[^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+'; - - /** - * Regular expression for 'quoted-string' rule from RFC 2616 - */ - const REGEXP_QUOTED_STRING = '"(?>[^"\\\\]+|\\\\.)*"'; - - /** - * Connected sockets, needed for Keep-Alive support - * @var array - * @see connect() - */ - protected static $sockets = array(); - - /** - * Data for digest authentication scheme - * - * The keys for the array are URL prefixes. - * - * The values are associative arrays with data (realm, nonce, nonce-count, - * opaque...) needed for digest authentication. Stored here to prevent making - * duplicate requests to digest-protected resources after we have already - * received the challenge. - * - * @var array - */ - protected static $challenges = array(); - - /** - * Connected socket - * @var HTTP_Request2_SocketWrapper - * @see connect() - */ - protected $socket; - - /** - * Challenge used for server digest authentication - * @var array - */ - protected $serverChallenge; - - /** - * Challenge used for proxy digest authentication - * @var array - */ - protected $proxyChallenge; - - /** - * Remaining length of the current chunk, when reading chunked response - * @var integer - * @see readChunked() - */ - protected $chunkLength = 0; - - /** - * Remaining amount of redirections to follow - * - * Starts at 'max_redirects' configuration parameter and is reduced on each - * subsequent redirect. An Exception will be thrown once it reaches zero. - * - * @var integer - */ - protected $redirectCountdown = null; - - /** - * Whether to wait for "100 Continue" response before sending request body - * @var bool - */ - protected $expect100Continue = false; - - /** - * Sends request to the remote server and returns its response - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public function sendRequest(HTTP_Request2 $request) - { - $this->request = $request; - - try { - $keepAlive = $this->connect(); - $headers = $this->prepareHeaders(); - $this->socket->write($headers); - // provide request headers to the observer, see request #7633 - $this->request->setLastEvent('sentHeaders', $headers); - - if (!$this->expect100Continue) { - $this->writeBody(); - $response = $this->readResponse(); - - } else { - $response = $this->readResponse(); - if (!$response || 100 == $response->getStatus()) { - $this->expect100Continue = false; - // either got "100 Continue" or timed out -> send body - $this->writeBody(); - $response = $this->readResponse(); - } - } - - - if ($jar = $request->getCookieJar()) { - $jar->addCookiesFromResponse($response, $request->getUrl()); - } - - if (!$this->canKeepAlive($keepAlive, $response)) { - $this->disconnect(); - } - - if ($this->shouldUseProxyDigestAuth($response)) { - return $this->sendRequest($request); - } - if ($this->shouldUseServerDigestAuth($response)) { - return $this->sendRequest($request); - } - if ($authInfo = $response->getHeader('authentication-info')) { - $this->updateChallenge($this->serverChallenge, $authInfo); - } - if ($proxyInfo = $response->getHeader('proxy-authentication-info')) { - $this->updateChallenge($this->proxyChallenge, $proxyInfo); - } - - } catch (Exception $e) { - $this->disconnect(); - } - - unset($this->request, $this->requestBody); - - if (!empty($e)) { - $this->redirectCountdown = null; - throw $e; - } - - if (!$request->getConfig('follow_redirects') || !$response->isRedirect()) { - $this->redirectCountdown = null; - return $response; - } else { - return $this->handleRedirect($request, $response); - } - } - - /** - * Connects to the remote server - * - * @return bool whether the connection can be persistent - * @throws HTTP_Request2_Exception - */ - protected function connect() - { - $secure = 0 == strcasecmp($this->request->getUrl()->getScheme(), 'https'); - $tunnel = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); - $headers = $this->request->getHeaders(); - $reqHost = $this->request->getUrl()->getHost(); - if (!($reqPort = $this->request->getUrl()->getPort())) { - $reqPort = $secure? 443: 80; - } - - $httpProxy = $socksProxy = false; - if (!($host = $this->request->getConfig('proxy_host'))) { - $host = $reqHost; - $port = $reqPort; - } else { - if (!($port = $this->request->getConfig('proxy_port'))) { - throw new HTTP_Request2_LogicException( - 'Proxy port not provided', - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if ('http' == ($type = $this->request->getConfig('proxy_type'))) { - $httpProxy = true; - } elseif ('socks5' == $type) { - $socksProxy = true; - } else { - throw new HTTP_Request2_NotImplementedException( - "Proxy type '{$type}' is not supported" - ); - } - } - - if ($tunnel && !$httpProxy) { - throw new HTTP_Request2_LogicException( - "Trying to perform CONNECT request without proxy", - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if ($secure && !in_array('ssl', stream_get_transports())) { - throw new HTTP_Request2_LogicException( - 'Need OpenSSL support for https:// requests', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - - // RFC 2068, section 19.7.1: A client MUST NOT send the Keep-Alive - // connection token to a proxy server... - if ($httpProxy && !$secure && !empty($headers['connection']) - && 'Keep-Alive' == $headers['connection'] - ) { - $this->request->setHeader('connection'); - } - - $keepAlive = ('1.1' == $this->request->getConfig('protocol_version') && - empty($headers['connection'])) || - (!empty($headers['connection']) && - 'Keep-Alive' == $headers['connection']); - - $options = array(); - if ($ip = $this->request->getConfig('local_ip')) { - $options['socket'] = array( - 'bindto' => (false === strpos($ip, ':') ? $ip : '[' . $ip . ']') . ':0' - ); - } - if ($secure || $tunnel) { - $options['ssl'] = array(); - foreach ($this->request->getConfig() as $name => $value) { - if ('ssl_' == substr($name, 0, 4) && null !== $value) { - if ('ssl_verify_host' == $name) { - if ($value) { - $options['ssl']['CN_match'] = $reqHost; - } - } else { - $options['ssl'][substr($name, 4)] = $value; - } - } - } - ksort($options['ssl']); - } - - // Use global request timeout if given, see feature requests #5735, #8964 - if ($timeout = $this->request->getConfig('timeout')) { - $deadline = time() + $timeout; - } else { - $deadline = null; - } - - // Changing SSL context options after connection is established does *not* - // work, we need a new connection if options change - $remote = ((!$secure || $httpProxy || $socksProxy)? 'tcp://': 'ssl://') - . $host . ':' . $port; - $socketKey = $remote . ( - ($secure && $httpProxy || $socksProxy) - ? "->{$reqHost}:{$reqPort}" : '' - ) . (empty($options)? '': ':' . serialize($options)); - unset($this->socket); - - // We use persistent connections and have a connected socket? - // Ensure that the socket is still connected, see bug #16149 - if ($keepAlive && !empty(self::$sockets[$socketKey]) - && !self::$sockets[$socketKey]->eof() - ) { - $this->socket =& self::$sockets[$socketKey]; - - } else { - if ($socksProxy) { - require_once 'HTTP/Request2/SOCKS5.php'; - - $this->socket = new HTTP_Request2_SOCKS5( - $remote, $this->request->getConfig('connect_timeout'), - $options, $this->request->getConfig('proxy_user'), - $this->request->getConfig('proxy_password') - ); - // handle request timeouts ASAP - $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); - $this->socket->connect($reqHost, $reqPort); - if (!$secure) { - $conninfo = "tcp://{$reqHost}:{$reqPort} via {$remote}"; - } else { - $this->socket->enableCrypto(); - $conninfo = "ssl://{$reqHost}:{$reqPort} via {$remote}"; - } - - } elseif ($secure && $httpProxy && !$tunnel) { - $this->establishTunnel(); - $conninfo = "ssl://{$reqHost}:{$reqPort} via {$remote}"; - - } else { - $this->socket = new HTTP_Request2_SocketWrapper( - $remote, $this->request->getConfig('connect_timeout'), $options - ); - } - $this->request->setLastEvent('connect', empty($conninfo)? $remote: $conninfo); - self::$sockets[$socketKey] =& $this->socket; - } - $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); - return $keepAlive; - } - - /** - * Establishes a tunnel to a secure remote server via HTTP CONNECT request - * - * This method will fail if 'ssl_verify_peer' is enabled. Probably because PHP - * sees that we are connected to a proxy server (duh!) rather than the server - * that presents its certificate. - * - * @link http://tools.ietf.org/html/rfc2817#section-5.2 - * @throws HTTP_Request2_Exception - */ - protected function establishTunnel() - { - $donor = new self; - $connect = new HTTP_Request2( - $this->request->getUrl(), HTTP_Request2::METHOD_CONNECT, - array_merge($this->request->getConfig(), array('adapter' => $donor)) - ); - $response = $connect->send(); - // Need any successful (2XX) response - if (200 > $response->getStatus() || 300 <= $response->getStatus()) { - throw new HTTP_Request2_ConnectionException( - 'Failed to connect via HTTPS proxy. Proxy response: ' . - $response->getStatus() . ' ' . $response->getReasonPhrase() - ); - } - $this->socket = $donor->socket; - $this->socket->enableCrypto(); - } - - /** - * Checks whether current connection may be reused or should be closed - * - * @param boolean $requestKeepAlive whether connection could - * be persistent in the first place - * @param HTTP_Request2_Response $response response object to check - * - * @return boolean - */ - protected function canKeepAlive($requestKeepAlive, HTTP_Request2_Response $response) - { - // Do not close socket on successful CONNECT request - if (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() - && 200 <= $response->getStatus() && 300 > $response->getStatus() - ) { - return true; - } - - $lengthKnown = 'chunked' == strtolower($response->getHeader('transfer-encoding')) - || null !== $response->getHeader('content-length') - // no body possible for such responses, see also request #17031 - || HTTP_Request2::METHOD_HEAD == $this->request->getMethod() - || in_array($response->getStatus(), array(204, 304)); - $persistent = 'keep-alive' == strtolower($response->getHeader('connection')) || - (null === $response->getHeader('connection') && - '1.1' == $response->getVersion()); - return $requestKeepAlive && $lengthKnown && $persistent; - } - - /** - * Disconnects from the remote server - */ - protected function disconnect() - { - if (!empty($this->socket)) { - $this->socket = null; - $this->request->setLastEvent('disconnect'); - } - } - - /** - * Handles HTTP redirection - * - * This method will throw an Exception if redirect to a non-HTTP(S) location - * is attempted, also if number of redirects performed already is equal to - * 'max_redirects' configuration parameter. - * - * @param HTTP_Request2 $request Original request - * @param HTTP_Request2_Response $response Response containing redirect - * - * @return HTTP_Request2_Response Response from a new location - * @throws HTTP_Request2_Exception - */ - protected function handleRedirect( - HTTP_Request2 $request, HTTP_Request2_Response $response - ) { - if (is_null($this->redirectCountdown)) { - $this->redirectCountdown = $request->getConfig('max_redirects'); - } - if (0 == $this->redirectCountdown) { - $this->redirectCountdown = null; - // Copying cURL behaviour - throw new HTTP_Request2_MessageException( - 'Maximum (' . $request->getConfig('max_redirects') . ') redirects followed', - HTTP_Request2_Exception::TOO_MANY_REDIRECTS - ); - } - $redirectUrl = new Net_URL2( - $response->getHeader('location'), - array(Net_URL2::OPTION_USE_BRACKETS => $request->getConfig('use_brackets')) - ); - // refuse non-HTTP redirect - if ($redirectUrl->isAbsolute() - && !in_array($redirectUrl->getScheme(), array('http', 'https')) - ) { - $this->redirectCountdown = null; - throw new HTTP_Request2_MessageException( - 'Refusing to redirect to a non-HTTP URL ' . $redirectUrl->__toString(), - HTTP_Request2_Exception::NON_HTTP_REDIRECT - ); - } - // Theoretically URL should be absolute (see http://tools.ietf.org/html/rfc2616#section-14.30), - // but in practice it is often not - if (!$redirectUrl->isAbsolute()) { - $redirectUrl = $request->getUrl()->resolve($redirectUrl); - } - $redirect = clone $request; - $redirect->setUrl($redirectUrl); - if (303 == $response->getStatus() - || (!$request->getConfig('strict_redirects') - && in_array($response->getStatus(), array(301, 302))) - ) { - $redirect->setMethod(HTTP_Request2::METHOD_GET); - $redirect->setBody(''); - } - - if (0 < $this->redirectCountdown) { - $this->redirectCountdown--; - } - return $this->sendRequest($redirect); - } - - /** - * Checks whether another request should be performed with server digest auth - * - * Several conditions should be satisfied for it to return true: - * - response status should be 401 - * - auth credentials should be set in the request object - * - response should contain WWW-Authenticate header with digest challenge - * - there is either no challenge stored for this URL or new challenge - * contains stale=true parameter (in other case we probably just failed - * due to invalid username / password) - * - * The method stores challenge values in $challenges static property - * - * @param HTTP_Request2_Response $response response to check - * - * @return boolean whether another request should be performed - * @throws HTTP_Request2_Exception in case of unsupported challenge parameters - */ - protected function shouldUseServerDigestAuth(HTTP_Request2_Response $response) - { - // no sense repeating a request if we don't have credentials - if (401 != $response->getStatus() || !$this->request->getAuth()) { - return false; - } - if (!$challenge = $this->parseDigestChallenge($response->getHeader('www-authenticate'))) { - return false; - } - - $url = $this->request->getUrl(); - $scheme = $url->getScheme(); - $host = $scheme . '://' . $url->getHost(); - if ($port = $url->getPort()) { - if ((0 == strcasecmp($scheme, 'http') && 80 != $port) - || (0 == strcasecmp($scheme, 'https') && 443 != $port) - ) { - $host .= ':' . $port; - } - } - - if (!empty($challenge['domain'])) { - $prefixes = array(); - foreach (preg_split('/\\s+/', $challenge['domain']) as $prefix) { - // don't bother with different servers - if ('/' == substr($prefix, 0, 1)) { - $prefixes[] = $host . $prefix; - } - } - } - if (empty($prefixes)) { - $prefixes = array($host . '/'); - } - - $ret = true; - foreach ($prefixes as $prefix) { - if (!empty(self::$challenges[$prefix]) - && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) - ) { - // probably credentials are invalid - $ret = false; - } - self::$challenges[$prefix] =& $challenge; - } - return $ret; - } - - /** - * Checks whether another request should be performed with proxy digest auth - * - * Several conditions should be satisfied for it to return true: - * - response status should be 407 - * - proxy auth credentials should be set in the request object - * - response should contain Proxy-Authenticate header with digest challenge - * - there is either no challenge stored for this proxy or new challenge - * contains stale=true parameter (in other case we probably just failed - * due to invalid username / password) - * - * The method stores challenge values in $challenges static property - * - * @param HTTP_Request2_Response $response response to check - * - * @return boolean whether another request should be performed - * @throws HTTP_Request2_Exception in case of unsupported challenge parameters - */ - protected function shouldUseProxyDigestAuth(HTTP_Request2_Response $response) - { - if (407 != $response->getStatus() || !$this->request->getConfig('proxy_user')) { - return false; - } - if (!($challenge = $this->parseDigestChallenge($response->getHeader('proxy-authenticate')))) { - return false; - } - - $key = 'proxy://' . $this->request->getConfig('proxy_host') . - ':' . $this->request->getConfig('proxy_port'); - - if (!empty(self::$challenges[$key]) - && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) - ) { - $ret = false; - } else { - $ret = true; - } - self::$challenges[$key] = $challenge; - return $ret; - } - - /** - * Extracts digest method challenge from (WWW|Proxy)-Authenticate header value - * - * There is a problem with implementation of RFC 2617: several of the parameters - * are defined as quoted-string there and thus may contain backslash escaped - * double quotes (RFC 2616, section 2.2). However, RFC 2617 defines unq(X) as - * just value of quoted-string X without surrounding quotes, it doesn't speak - * about removing backslash escaping. - * - * Now realm parameter is user-defined and human-readable, strange things - * happen when it contains quotes: - * - Apache allows quotes in realm, but apparently uses realm value without - * backslashes for digest computation - * - Squid allows (manually escaped) quotes there, but it is impossible to - * authorize with either escaped or unescaped quotes used in digest, - * probably it can't parse the response (?) - * - Both IE and Firefox display realm value with backslashes in - * the password popup and apparently use the same value for digest - * - * HTTP_Request2 follows IE and Firefox (and hopefully RFC 2617) in - * quoted-string handling, unfortunately that means failure to authorize - * sometimes - * - * @param string $headerValue value of WWW-Authenticate or Proxy-Authenticate header - * - * @return mixed associative array with challenge parameters, false if - * no challenge is present in header value - * @throws HTTP_Request2_NotImplementedException in case of unsupported challenge parameters - */ - protected function parseDigestChallenge($headerValue) - { - $authParam = '(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . - self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')'; - $challenge = "!(?<=^|\\s|,)Digest ({$authParam}\\s*(,\\s*|$))+!"; - if (!preg_match($challenge, $headerValue, $matches)) { - return false; - } - - preg_match_all('!' . $authParam . '!', $matches[0], $params); - $paramsAry = array(); - $knownParams = array('realm', 'domain', 'nonce', 'opaque', 'stale', - 'algorithm', 'qop'); - for ($i = 0; $i < count($params[0]); $i++) { - // section 3.2.1: Any unrecognized directive MUST be ignored. - if (in_array($params[1][$i], $knownParams)) { - if ('"' == substr($params[2][$i], 0, 1)) { - $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); - } else { - $paramsAry[$params[1][$i]] = $params[2][$i]; - } - } - } - // we only support qop=auth - if (!empty($paramsAry['qop']) - && !in_array('auth', array_map('trim', explode(',', $paramsAry['qop']))) - ) { - throw new HTTP_Request2_NotImplementedException( - "Only 'auth' qop is currently supported in digest authentication, " . - "server requested '{$paramsAry['qop']}'" - ); - } - // we only support algorithm=MD5 - if (!empty($paramsAry['algorithm']) && 'MD5' != $paramsAry['algorithm']) { - throw new HTTP_Request2_NotImplementedException( - "Only 'MD5' algorithm is currently supported in digest authentication, " . - "server requested '{$paramsAry['algorithm']}'" - ); - } - - return $paramsAry; - } - - /** - * Parses [Proxy-]Authentication-Info header value and updates challenge - * - * @param array &$challenge challenge to update - * @param string $headerValue value of [Proxy-]Authentication-Info header - * - * @todo validate server rspauth response - */ - protected function updateChallenge(&$challenge, $headerValue) - { - $authParam = '!(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . - self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')!'; - $paramsAry = array(); - - preg_match_all($authParam, $headerValue, $params); - for ($i = 0; $i < count($params[0]); $i++) { - if ('"' == substr($params[2][$i], 0, 1)) { - $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); - } else { - $paramsAry[$params[1][$i]] = $params[2][$i]; - } - } - // for now, just update the nonce value - if (!empty($paramsAry['nextnonce'])) { - $challenge['nonce'] = $paramsAry['nextnonce']; - $challenge['nc'] = 1; - } - } - - /** - * Creates a value for [Proxy-]Authorization header when using digest authentication - * - * @param string $user user name - * @param string $password password - * @param string $url request URL - * @param array &$challenge digest challenge parameters - * - * @return string value of [Proxy-]Authorization request header - * @link http://tools.ietf.org/html/rfc2617#section-3.2.2 - */ - protected function createDigestResponse($user, $password, $url, &$challenge) - { - if (false !== ($q = strpos($url, '?')) - && $this->request->getConfig('digest_compat_ie') - ) { - $url = substr($url, 0, $q); - } - - $a1 = md5($user . ':' . $challenge['realm'] . ':' . $password); - $a2 = md5($this->request->getMethod() . ':' . $url); - - if (empty($challenge['qop'])) { - $digest = md5($a1 . ':' . $challenge['nonce'] . ':' . $a2); - } else { - $challenge['cnonce'] = 'Req2.' . rand(); - if (empty($challenge['nc'])) { - $challenge['nc'] = 1; - } - $nc = sprintf('%08x', $challenge['nc']++); - $digest = md5( - $a1 . ':' . $challenge['nonce'] . ':' . $nc . ':' . - $challenge['cnonce'] . ':auth:' . $a2 - ); - } - return 'Digest username="' . str_replace(array('\\', '"'), array('\\\\', '\\"'), $user) . '", ' . - 'realm="' . $challenge['realm'] . '", ' . - 'nonce="' . $challenge['nonce'] . '", ' . - 'uri="' . $url . '", ' . - 'response="' . $digest . '"' . - (!empty($challenge['opaque'])? - ', opaque="' . $challenge['opaque'] . '"': - '') . - (!empty($challenge['qop'])? - ', qop="auth", nc=' . $nc . ', cnonce="' . $challenge['cnonce'] . '"': - ''); - } - - /** - * Adds 'Authorization' header (if needed) to request headers array - * - * @param array &$headers request headers - * @param string $requestHost request host (needed for digest authentication) - * @param string $requestUrl request URL (needed for digest authentication) - * - * @throws HTTP_Request2_NotImplementedException - */ - protected function addAuthorizationHeader(&$headers, $requestHost, $requestUrl) - { - if (!($auth = $this->request->getAuth())) { - return; - } - switch ($auth['scheme']) { - case HTTP_Request2::AUTH_BASIC: - $headers['authorization'] = 'Basic ' . base64_encode( - $auth['user'] . ':' . $auth['password'] - ); - break; - - case HTTP_Request2::AUTH_DIGEST: - unset($this->serverChallenge); - $fullUrl = ('/' == $requestUrl[0])? - $this->request->getUrl()->getScheme() . '://' . - $requestHost . $requestUrl: - $requestUrl; - foreach (array_keys(self::$challenges) as $key) { - if ($key == substr($fullUrl, 0, strlen($key))) { - $headers['authorization'] = $this->createDigestResponse( - $auth['user'], $auth['password'], - $requestUrl, self::$challenges[$key] - ); - $this->serverChallenge =& self::$challenges[$key]; - break; - } - } - break; - - default: - throw new HTTP_Request2_NotImplementedException( - "Unknown HTTP authentication scheme '{$auth['scheme']}'" - ); - } - } - - /** - * Adds 'Proxy-Authorization' header (if needed) to request headers array - * - * @param array &$headers request headers - * @param string $requestUrl request URL (needed for digest authentication) - * - * @throws HTTP_Request2_NotImplementedException - */ - protected function addProxyAuthorizationHeader(&$headers, $requestUrl) - { - if (!$this->request->getConfig('proxy_host') - || !($user = $this->request->getConfig('proxy_user')) - || (0 == strcasecmp('https', $this->request->getUrl()->getScheme()) - && HTTP_Request2::METHOD_CONNECT != $this->request->getMethod()) - ) { - return; - } - - $password = $this->request->getConfig('proxy_password'); - switch ($this->request->getConfig('proxy_auth_scheme')) { - case HTTP_Request2::AUTH_BASIC: - $headers['proxy-authorization'] = 'Basic ' . base64_encode( - $user . ':' . $password - ); - break; - - case HTTP_Request2::AUTH_DIGEST: - unset($this->proxyChallenge); - $proxyUrl = 'proxy://' . $this->request->getConfig('proxy_host') . - ':' . $this->request->getConfig('proxy_port'); - if (!empty(self::$challenges[$proxyUrl])) { - $headers['proxy-authorization'] = $this->createDigestResponse( - $user, $password, - $requestUrl, self::$challenges[$proxyUrl] - ); - $this->proxyChallenge =& self::$challenges[$proxyUrl]; - } - break; - - default: - throw new HTTP_Request2_NotImplementedException( - "Unknown HTTP authentication scheme '" . - $this->request->getConfig('proxy_auth_scheme') . "'" - ); - } - } - - - /** - * Creates the string with the Request-Line and request headers - * - * @return string - * @throws HTTP_Request2_Exception - */ - protected function prepareHeaders() - { - $headers = $this->request->getHeaders(); - $url = $this->request->getUrl(); - $connect = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); - $host = $url->getHost(); - - $defaultPort = 0 == strcasecmp($url->getScheme(), 'https')? 443: 80; - if (($port = $url->getPort()) && $port != $defaultPort || $connect) { - $host .= ':' . (empty($port)? $defaultPort: $port); - } - // Do not overwrite explicitly set 'Host' header, see bug #16146 - if (!isset($headers['host'])) { - $headers['host'] = $host; - } - - if ($connect) { - $requestUrl = $host; - - } else { - if (!$this->request->getConfig('proxy_host') - || 'http' != $this->request->getConfig('proxy_type') - || 0 == strcasecmp($url->getScheme(), 'https') - ) { - $requestUrl = ''; - } else { - $requestUrl = $url->getScheme() . '://' . $host; - } - $path = $url->getPath(); - $query = $url->getQuery(); - $requestUrl .= (empty($path)? '/': $path) . (empty($query)? '': '?' . $query); - } - - if ('1.1' == $this->request->getConfig('protocol_version') - && extension_loaded('zlib') && !isset($headers['accept-encoding']) - ) { - $headers['accept-encoding'] = 'gzip, deflate'; - } - if (($jar = $this->request->getCookieJar()) - && ($cookies = $jar->getMatching($this->request->getUrl(), true)) - ) { - $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; - } - - $this->addAuthorizationHeader($headers, $host, $requestUrl); - $this->addProxyAuthorizationHeader($headers, $requestUrl); - $this->calculateRequestLength($headers); - if ('1.1' == $this->request->getConfig('protocol_version')) { - $this->updateExpectHeader($headers); - } else { - $this->expect100Continue = false; - } - - $headersStr = $this->request->getMethod() . ' ' . $requestUrl . ' HTTP/' . - $this->request->getConfig('protocol_version') . "\r\n"; - foreach ($headers as $name => $value) { - $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); - $headersStr .= $canonicalName . ': ' . $value . "\r\n"; - } - return $headersStr . "\r\n"; - } - - /** - * Adds or removes 'Expect: 100-continue' header from request headers - * - * Also sets the $expect100Continue property. Parsing of existing header - * is somewhat needed due to its complex structure and due to the - * requirement in section 8.2.3 of RFC 2616: - * > A client MUST NOT send an Expect request-header field (section - * > 14.20) with the "100-continue" expectation if it does not intend - * > to send a request body. - * - * @param array &$headers Array of headers prepared for the request - * - * @throws HTTP_Request2_LogicException - * @link http://pear.php.net/bugs/bug.php?id=19233 - * @link http://tools.ietf.org/html/rfc2616#section-8.2.3 - */ - protected function updateExpectHeader(&$headers) - { - $this->expect100Continue = false; - $expectations = array(); - if (isset($headers['expect'])) { - if ('' === $headers['expect']) { - // empty 'Expect' header is technically invalid, so just get rid of it - unset($headers['expect']); - return; - } - // build regexp to parse the value of existing Expect header - $expectParam = ';\s*' . self::REGEXP_TOKEN . '(?:\s*=\s*(?:' - . self::REGEXP_TOKEN . '|' - . self::REGEXP_QUOTED_STRING . '))?\s*'; - $expectExtension = self::REGEXP_TOKEN . '(?:\s*=\s*(?:' - . self::REGEXP_TOKEN . '|' - . self::REGEXP_QUOTED_STRING . ')\s*(?:' - . $expectParam . ')*)?'; - $expectItem = '!(100-continue|' . $expectExtension . ')!A'; - - $pos = 0; - $length = strlen($headers['expect']); - - while ($pos < $length) { - $pos += strspn($headers['expect'], " \t", $pos); - if (',' === substr($headers['expect'], $pos, 1)) { - $pos++; - continue; - - } elseif (!preg_match($expectItem, $headers['expect'], $m, 0, $pos)) { - throw new HTTP_Request2_LogicException( - "Cannot parse value '{$headers['expect']}' of Expect header", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - - } else { - $pos += strlen($m[0]); - if (strcasecmp('100-continue', $m[0])) { - $expectations[] = $m[0]; - } - } - } - } - - if (1024 < $this->contentLength) { - $expectations[] = '100-continue'; - $this->expect100Continue = true; - } - - if (empty($expectations)) { - unset($headers['expect']); - } else { - $headers['expect'] = implode(',', $expectations); - } - } - - /** - * Sends the request body - * - * @throws HTTP_Request2_MessageException - */ - protected function writeBody() - { - if (in_array($this->request->getMethod(), self::$bodyDisallowed) - || 0 == $this->contentLength - ) { - return; - } - - $position = 0; - $bufferSize = $this->request->getConfig('buffer_size'); - $headers = $this->request->getHeaders(); - $chunked = isset($headers['transfer-encoding']); - while ($position < $this->contentLength) { - if (is_string($this->requestBody)) { - $str = substr($this->requestBody, $position, $bufferSize); - } elseif (is_resource($this->requestBody)) { - $str = fread($this->requestBody, $bufferSize); - } else { - $str = $this->requestBody->read($bufferSize); - } - if (!$chunked) { - $this->socket->write($str); - } else { - $this->socket->write(dechex(strlen($str)) . "\r\n{$str}\r\n"); - } - // Provide the length of written string to the observer, request #7630 - $this->request->setLastEvent('sentBodyPart', strlen($str)); - $position += strlen($str); - } - - // write zero-length chunk - if ($chunked) { - $this->socket->write("0\r\n\r\n"); - } - $this->request->setLastEvent('sentBody', $this->contentLength); - } - - /** - * Reads the remote server's response - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - protected function readResponse() - { - $bufferSize = $this->request->getConfig('buffer_size'); - // http://tools.ietf.org/html/rfc2616#section-8.2.3 - // ...the client SHOULD NOT wait for an indefinite period before sending the request body - $timeout = $this->expect100Continue ? 1 : null; - - do { - try { - $response = new HTTP_Request2_Response( - $this->socket->readLine($bufferSize, $timeout), true, $this->request->getUrl() - ); - do { - $headerLine = $this->socket->readLine($bufferSize); - $response->parseHeaderLine($headerLine); - } while ('' != $headerLine); - - } catch (HTTP_Request2_MessageException $e) { - if (HTTP_Request2_Exception::TIMEOUT === $e->getCode() - && $this->expect100Continue - ) { - return null; - } - throw $e; - } - if ($this->expect100Continue && 100 == $response->getStatus()) { - return $response; - } - } while (in_array($response->getStatus(), array(100, 101))); - - $this->request->setLastEvent('receivedHeaders', $response); - - // No body possible in such responses - if (HTTP_Request2::METHOD_HEAD == $this->request->getMethod() - || (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() - && 200 <= $response->getStatus() && 300 > $response->getStatus()) - || in_array($response->getStatus(), array(204, 304)) - ) { - return $response; - } - - $chunked = 'chunked' == $response->getHeader('transfer-encoding'); - $length = $response->getHeader('content-length'); - $hasBody = false; - if ($chunked || null === $length || 0 < intval($length)) { - // RFC 2616, section 4.4: - // 3. ... If a message is received with both a - // Transfer-Encoding header field and a Content-Length header field, - // the latter MUST be ignored. - $toRead = ($chunked || null === $length)? null: $length; - $this->chunkLength = 0; - - while (!$this->socket->eof() && (is_null($toRead) || 0 < $toRead)) { - if ($chunked) { - $data = $this->readChunked($bufferSize); - } elseif (is_null($toRead)) { - $data = $this->socket->read($bufferSize); - } else { - $data = $this->socket->read(min($toRead, $bufferSize)); - $toRead -= strlen($data); - } - if ('' == $data && (!$this->chunkLength || $this->socket->eof())) { - break; - } - - $hasBody = true; - if ($this->request->getConfig('store_body')) { - $response->appendBody($data); - } - if (!in_array($response->getHeader('content-encoding'), array('identity', null))) { - $this->request->setLastEvent('receivedEncodedBodyPart', $data); - } else { - $this->request->setLastEvent('receivedBodyPart', $data); - } - } - } - - if ($hasBody) { - $this->request->setLastEvent('receivedBody', $response); - } - return $response; - } - - /** - * Reads a part of response body encoded with chunked Transfer-Encoding - * - * @param int $bufferSize buffer size to use for reading - * - * @return string - * @throws HTTP_Request2_MessageException - */ - protected function readChunked($bufferSize) - { - // at start of the next chunk? - if (0 == $this->chunkLength) { - $line = $this->socket->readLine($bufferSize); - if (!preg_match('/^([0-9a-f]+)/i', $line, $matches)) { - throw new HTTP_Request2_MessageException( - "Cannot decode chunked response, invalid chunk length '{$line}'", - HTTP_Request2_Exception::DECODE_ERROR - ); - } else { - $this->chunkLength = hexdec($matches[1]); - // Chunk with zero length indicates the end - if (0 == $this->chunkLength) { - $this->socket->readLine($bufferSize); - return ''; - } - } - } - $data = $this->socket->read(min($this->chunkLength, $bufferSize)); - $this->chunkLength -= strlen($data); - if (0 == $this->chunkLength) { - $this->socket->readLine($bufferSize); // Trailing CRLF - } - return $data; - } -} - + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Base class for HTTP_Request2 adapters */ +require_once 'HTTP/Request2/Adapter.php'; + +/** Socket wrapper class */ +require_once 'HTTP/Request2/SocketWrapper.php'; + +/** + * Socket-based adapter for HTTP_Request2 + * + * This adapter uses only PHP sockets and will work on almost any PHP + * environment. Code is based on original HTTP_Request PEAR package. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Adapter_Socket extends HTTP_Request2_Adapter +{ + /** + * Regular expression for 'token' rule from RFC 2616 + */ + const REGEXP_TOKEN = '[^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+'; + + /** + * Regular expression for 'quoted-string' rule from RFC 2616 + */ + const REGEXP_QUOTED_STRING = '"(?>[^"\\\\]+|\\\\.)*"'; + + /** + * Connected sockets, needed for Keep-Alive support + * @var array + * @see connect() + */ + protected static $sockets = array(); + + /** + * Data for digest authentication scheme + * + * The keys for the array are URL prefixes. + * + * The values are associative arrays with data (realm, nonce, nonce-count, + * opaque...) needed for digest authentication. Stored here to prevent making + * duplicate requests to digest-protected resources after we have already + * received the challenge. + * + * @var array + */ + protected static $challenges = array(); + + /** + * Connected socket + * @var HTTP_Request2_SocketWrapper + * @see connect() + */ + protected $socket; + + /** + * Challenge used for server digest authentication + * @var array + */ + protected $serverChallenge; + + /** + * Challenge used for proxy digest authentication + * @var array + */ + protected $proxyChallenge; + + /** + * Remaining length of the current chunk, when reading chunked response + * @var integer + * @see readChunked() + */ + protected $chunkLength = 0; + + /** + * Remaining amount of redirections to follow + * + * Starts at 'max_redirects' configuration parameter and is reduced on each + * subsequent redirect. An Exception will be thrown once it reaches zero. + * + * @var integer + */ + protected $redirectCountdown = null; + + /** + * Whether to wait for "100 Continue" response before sending request body + * @var bool + */ + protected $expect100Continue = false; + + /** + * Sends request to the remote server and returns its response + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public function sendRequest(HTTP_Request2 $request) + { + $this->request = $request; + + try { + $keepAlive = $this->connect(); + $headers = $this->prepareHeaders(); + $this->socket->write($headers); + // provide request headers to the observer, see request #7633 + $this->request->setLastEvent('sentHeaders', $headers); + + if (!$this->expect100Continue) { + $this->writeBody(); + $response = $this->readResponse(); + + } else { + $response = $this->readResponse(); + if (!$response || 100 == $response->getStatus()) { + $this->expect100Continue = false; + // either got "100 Continue" or timed out -> send body + $this->writeBody(); + $response = $this->readResponse(); + } + } + + + if ($jar = $request->getCookieJar()) { + $jar->addCookiesFromResponse($response); + } + + if (!$this->canKeepAlive($keepAlive, $response)) { + $this->disconnect(); + } + + if ($this->shouldUseProxyDigestAuth($response)) { + return $this->sendRequest($request); + } + if ($this->shouldUseServerDigestAuth($response)) { + return $this->sendRequest($request); + } + if ($authInfo = $response->getHeader('authentication-info')) { + $this->updateChallenge($this->serverChallenge, $authInfo); + } + if ($proxyInfo = $response->getHeader('proxy-authentication-info')) { + $this->updateChallenge($this->proxyChallenge, $proxyInfo); + } + + } catch (Exception $e) { + $this->disconnect(); + } + + unset($this->request, $this->requestBody); + + if (!empty($e)) { + $this->redirectCountdown = null; + throw $e; + } + + if (!$request->getConfig('follow_redirects') || !$response->isRedirect()) { + $this->redirectCountdown = null; + return $response; + } else { + return $this->handleRedirect($request, $response); + } + } + + /** + * Connects to the remote server + * + * @return bool whether the connection can be persistent + * @throws HTTP_Request2_Exception + */ + protected function connect() + { + $secure = 0 == strcasecmp($this->request->getUrl()->getScheme(), 'https'); + $tunnel = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); + $headers = $this->request->getHeaders(); + $reqHost = $this->request->getUrl()->getHost(); + if (!($reqPort = $this->request->getUrl()->getPort())) { + $reqPort = $secure? 443: 80; + } + + $httpProxy = $socksProxy = false; + if (!($host = $this->request->getConfig('proxy_host'))) { + $host = $reqHost; + $port = $reqPort; + } else { + if (!($port = $this->request->getConfig('proxy_port'))) { + throw new HTTP_Request2_LogicException( + 'Proxy port not provided', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if ('http' == ($type = $this->request->getConfig('proxy_type'))) { + $httpProxy = true; + } elseif ('socks5' == $type) { + $socksProxy = true; + } else { + throw new HTTP_Request2_NotImplementedException( + "Proxy type '{$type}' is not supported" + ); + } + } + + if ($tunnel && !$httpProxy) { + throw new HTTP_Request2_LogicException( + "Trying to perform CONNECT request without proxy", + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if ($secure && !in_array('ssl', stream_get_transports())) { + throw new HTTP_Request2_LogicException( + 'Need OpenSSL support for https:// requests', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + + // RFC 2068, section 19.7.1: A client MUST NOT send the Keep-Alive + // connection token to a proxy server... + if ($httpProxy && !$secure && !empty($headers['connection']) + && 'Keep-Alive' == $headers['connection'] + ) { + $this->request->setHeader('connection'); + } + + $keepAlive = ('1.1' == $this->request->getConfig('protocol_version') && + empty($headers['connection'])) || + (!empty($headers['connection']) && + 'Keep-Alive' == $headers['connection']); + + $options = array(); + if ($ip = $this->request->getConfig('local_ip')) { + $options['socket'] = array( + 'bindto' => (false === strpos($ip, ':') ? $ip : '[' . $ip . ']') . ':0' + ); + } + if ($secure || $tunnel) { + $options['ssl'] = array(); + foreach ($this->request->getConfig() as $name => $value) { + if ('ssl_' == substr($name, 0, 4) && null !== $value) { + if ('ssl_verify_host' == $name) { + if (version_compare(phpversion(), '5.6', '<')) { + if ($value) { + $options['ssl']['CN_match'] = $reqHost; + } + + } else { + $options['ssl']['verify_peer_name'] = $value; + $options['ssl']['peer_name'] = $reqHost; + } + + } else { + $options['ssl'][substr($name, 4)] = $value; + } + } + } + ksort($options['ssl']); + } + + // Use global request timeout if given, see feature requests #5735, #8964 + if ($timeout = $this->request->getConfig('timeout')) { + $deadline = time() + $timeout; + } else { + $deadline = null; + } + + // Changing SSL context options after connection is established does *not* + // work, we need a new connection if options change + $remote = ((!$secure || $httpProxy || $socksProxy)? 'tcp://': 'tls://') + . $host . ':' . $port; + $socketKey = $remote . ( + ($secure && $httpProxy || $socksProxy) + ? "->{$reqHost}:{$reqPort}" : '' + ) . (empty($options)? '': ':' . serialize($options)); + unset($this->socket); + + // We use persistent connections and have a connected socket? + // Ensure that the socket is still connected, see bug #16149 + if ($keepAlive && !empty(self::$sockets[$socketKey]) + && !self::$sockets[$socketKey]->eof() + ) { + $this->socket =& self::$sockets[$socketKey]; + + } else { + if ($socksProxy) { + require_once 'HTTP/Request2/SOCKS5.php'; + + $this->socket = new HTTP_Request2_SOCKS5( + $remote, $this->request->getConfig('connect_timeout'), + $options, $this->request->getConfig('proxy_user'), + $this->request->getConfig('proxy_password') + ); + // handle request timeouts ASAP + $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); + $this->socket->connect($reqHost, $reqPort); + if (!$secure) { + $conninfo = "tcp://{$reqHost}:{$reqPort} via {$remote}"; + } else { + $this->socket->enableCrypto(); + $conninfo = "tls://{$reqHost}:{$reqPort} via {$remote}"; + } + + } elseif ($secure && $httpProxy && !$tunnel) { + $this->establishTunnel(); + $conninfo = "tls://{$reqHost}:{$reqPort} via {$remote}"; + + } else { + $this->socket = new HTTP_Request2_SocketWrapper( + $remote, $this->request->getConfig('connect_timeout'), $options + ); + } + $this->request->setLastEvent('connect', empty($conninfo)? $remote: $conninfo); + self::$sockets[$socketKey] =& $this->socket; + } + $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); + return $keepAlive; + } + + /** + * Establishes a tunnel to a secure remote server via HTTP CONNECT request + * + * This method will fail if 'ssl_verify_peer' is enabled. Probably because PHP + * sees that we are connected to a proxy server (duh!) rather than the server + * that presents its certificate. + * + * @link http://tools.ietf.org/html/rfc2817#section-5.2 + * @throws HTTP_Request2_Exception + */ + protected function establishTunnel() + { + $donor = new self; + $connect = new HTTP_Request2( + $this->request->getUrl(), HTTP_Request2::METHOD_CONNECT, + array_merge($this->request->getConfig(), array('adapter' => $donor)) + ); + $response = $connect->send(); + // Need any successful (2XX) response + if (200 > $response->getStatus() || 300 <= $response->getStatus()) { + throw new HTTP_Request2_ConnectionException( + 'Failed to connect via HTTPS proxy. Proxy response: ' . + $response->getStatus() . ' ' . $response->getReasonPhrase() + ); + } + $this->socket = $donor->socket; + $this->socket->enableCrypto(); + } + + /** + * Checks whether current connection may be reused or should be closed + * + * @param boolean $requestKeepAlive whether connection could + * be persistent in the first place + * @param HTTP_Request2_Response $response response object to check + * + * @return boolean + */ + protected function canKeepAlive($requestKeepAlive, HTTP_Request2_Response $response) + { + // Do not close socket on successful CONNECT request + if (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() + && 200 <= $response->getStatus() && 300 > $response->getStatus() + ) { + return true; + } + + $lengthKnown = 'chunked' == strtolower($response->getHeader('transfer-encoding')) + || null !== $response->getHeader('content-length') + // no body possible for such responses, see also request #17031 + || HTTP_Request2::METHOD_HEAD == $this->request->getMethod() + || in_array($response->getStatus(), array(204, 304)); + $persistent = 'keep-alive' == strtolower($response->getHeader('connection')) || + (null === $response->getHeader('connection') && + '1.1' == $response->getVersion()); + return $requestKeepAlive && $lengthKnown && $persistent; + } + + /** + * Disconnects from the remote server + */ + protected function disconnect() + { + if (!empty($this->socket)) { + $this->socket = null; + $this->request->setLastEvent('disconnect'); + } + } + + /** + * Handles HTTP redirection + * + * This method will throw an Exception if redirect to a non-HTTP(S) location + * is attempted, also if number of redirects performed already is equal to + * 'max_redirects' configuration parameter. + * + * @param HTTP_Request2 $request Original request + * @param HTTP_Request2_Response $response Response containing redirect + * + * @return HTTP_Request2_Response Response from a new location + * @throws HTTP_Request2_Exception + */ + protected function handleRedirect( + HTTP_Request2 $request, HTTP_Request2_Response $response + ) { + if (is_null($this->redirectCountdown)) { + $this->redirectCountdown = $request->getConfig('max_redirects'); + } + if (0 == $this->redirectCountdown) { + $this->redirectCountdown = null; + // Copying cURL behaviour + throw new HTTP_Request2_MessageException( + 'Maximum (' . $request->getConfig('max_redirects') . ') redirects followed', + HTTP_Request2_Exception::TOO_MANY_REDIRECTS + ); + } + $redirectUrl = new Net_URL2( + $response->getHeader('location'), + array(Net_URL2::OPTION_USE_BRACKETS => $request->getConfig('use_brackets')) + ); + // refuse non-HTTP redirect + if ($redirectUrl->isAbsolute() + && !in_array($redirectUrl->getScheme(), array('http', 'https')) + ) { + $this->redirectCountdown = null; + throw new HTTP_Request2_MessageException( + 'Refusing to redirect to a non-HTTP URL ' . $redirectUrl->__toString(), + HTTP_Request2_Exception::NON_HTTP_REDIRECT + ); + } + // Theoretically URL should be absolute (see http://tools.ietf.org/html/rfc2616#section-14.30), + // but in practice it is often not + if (!$redirectUrl->isAbsolute()) { + $redirectUrl = $request->getUrl()->resolve($redirectUrl); + } + $redirect = clone $request; + $redirect->setUrl($redirectUrl); + if (303 == $response->getStatus() + || (!$request->getConfig('strict_redirects') + && in_array($response->getStatus(), array(301, 302))) + ) { + $redirect->setMethod(HTTP_Request2::METHOD_GET); + $redirect->setBody(''); + } + + if (0 < $this->redirectCountdown) { + $this->redirectCountdown--; + } + return $this->sendRequest($redirect); + } + + /** + * Checks whether another request should be performed with server digest auth + * + * Several conditions should be satisfied for it to return true: + * - response status should be 401 + * - auth credentials should be set in the request object + * - response should contain WWW-Authenticate header with digest challenge + * - there is either no challenge stored for this URL or new challenge + * contains stale=true parameter (in other case we probably just failed + * due to invalid username / password) + * + * The method stores challenge values in $challenges static property + * + * @param HTTP_Request2_Response $response response to check + * + * @return boolean whether another request should be performed + * @throws HTTP_Request2_Exception in case of unsupported challenge parameters + */ + protected function shouldUseServerDigestAuth(HTTP_Request2_Response $response) + { + // no sense repeating a request if we don't have credentials + if (401 != $response->getStatus() || !$this->request->getAuth()) { + return false; + } + if (!$challenge = $this->parseDigestChallenge($response->getHeader('www-authenticate'))) { + return false; + } + + $url = $this->request->getUrl(); + $scheme = $url->getScheme(); + $host = $scheme . '://' . $url->getHost(); + if ($port = $url->getPort()) { + if ((0 == strcasecmp($scheme, 'http') && 80 != $port) + || (0 == strcasecmp($scheme, 'https') && 443 != $port) + ) { + $host .= ':' . $port; + } + } + + if (!empty($challenge['domain'])) { + $prefixes = array(); + foreach (preg_split('/\\s+/', $challenge['domain']) as $prefix) { + // don't bother with different servers + if ('/' == substr($prefix, 0, 1)) { + $prefixes[] = $host . $prefix; + } + } + } + if (empty($prefixes)) { + $prefixes = array($host . '/'); + } + + $ret = true; + foreach ($prefixes as $prefix) { + if (!empty(self::$challenges[$prefix]) + && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) + ) { + // probably credentials are invalid + $ret = false; + } + self::$challenges[$prefix] =& $challenge; + } + return $ret; + } + + /** + * Checks whether another request should be performed with proxy digest auth + * + * Several conditions should be satisfied for it to return true: + * - response status should be 407 + * - proxy auth credentials should be set in the request object + * - response should contain Proxy-Authenticate header with digest challenge + * - there is either no challenge stored for this proxy or new challenge + * contains stale=true parameter (in other case we probably just failed + * due to invalid username / password) + * + * The method stores challenge values in $challenges static property + * + * @param HTTP_Request2_Response $response response to check + * + * @return boolean whether another request should be performed + * @throws HTTP_Request2_Exception in case of unsupported challenge parameters + */ + protected function shouldUseProxyDigestAuth(HTTP_Request2_Response $response) + { + if (407 != $response->getStatus() || !$this->request->getConfig('proxy_user')) { + return false; + } + if (!($challenge = $this->parseDigestChallenge($response->getHeader('proxy-authenticate')))) { + return false; + } + + $key = 'proxy://' . $this->request->getConfig('proxy_host') . + ':' . $this->request->getConfig('proxy_port'); + + if (!empty(self::$challenges[$key]) + && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) + ) { + $ret = false; + } else { + $ret = true; + } + self::$challenges[$key] = $challenge; + return $ret; + } + + /** + * Extracts digest method challenge from (WWW|Proxy)-Authenticate header value + * + * There is a problem with implementation of RFC 2617: several of the parameters + * are defined as quoted-string there and thus may contain backslash escaped + * double quotes (RFC 2616, section 2.2). However, RFC 2617 defines unq(X) as + * just value of quoted-string X without surrounding quotes, it doesn't speak + * about removing backslash escaping. + * + * Now realm parameter is user-defined and human-readable, strange things + * happen when it contains quotes: + * - Apache allows quotes in realm, but apparently uses realm value without + * backslashes for digest computation + * - Squid allows (manually escaped) quotes there, but it is impossible to + * authorize with either escaped or unescaped quotes used in digest, + * probably it can't parse the response (?) + * - Both IE and Firefox display realm value with backslashes in + * the password popup and apparently use the same value for digest + * + * HTTP_Request2 follows IE and Firefox (and hopefully RFC 2617) in + * quoted-string handling, unfortunately that means failure to authorize + * sometimes + * + * @param string $headerValue value of WWW-Authenticate or Proxy-Authenticate header + * + * @return mixed associative array with challenge parameters, false if + * no challenge is present in header value + * @throws HTTP_Request2_NotImplementedException in case of unsupported challenge parameters + */ + protected function parseDigestChallenge($headerValue) + { + $authParam = '(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . + self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')'; + $challenge = "!(?<=^|\\s|,)Digest ({$authParam}\\s*(,\\s*|$))+!"; + if (!preg_match($challenge, $headerValue, $matches)) { + return false; + } + + preg_match_all('!' . $authParam . '!', $matches[0], $params); + $paramsAry = array(); + $knownParams = array('realm', 'domain', 'nonce', 'opaque', 'stale', + 'algorithm', 'qop'); + for ($i = 0; $i < count($params[0]); $i++) { + // section 3.2.1: Any unrecognized directive MUST be ignored. + if (in_array($params[1][$i], $knownParams)) { + if ('"' == substr($params[2][$i], 0, 1)) { + $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); + } else { + $paramsAry[$params[1][$i]] = $params[2][$i]; + } + } + } + // we only support qop=auth + if (!empty($paramsAry['qop']) + && !in_array('auth', array_map('trim', explode(',', $paramsAry['qop']))) + ) { + throw new HTTP_Request2_NotImplementedException( + "Only 'auth' qop is currently supported in digest authentication, " . + "server requested '{$paramsAry['qop']}'" + ); + } + // we only support algorithm=MD5 + if (!empty($paramsAry['algorithm']) && 'MD5' != $paramsAry['algorithm']) { + throw new HTTP_Request2_NotImplementedException( + "Only 'MD5' algorithm is currently supported in digest authentication, " . + "server requested '{$paramsAry['algorithm']}'" + ); + } + + return $paramsAry; + } + + /** + * Parses [Proxy-]Authentication-Info header value and updates challenge + * + * @param array &$challenge challenge to update + * @param string $headerValue value of [Proxy-]Authentication-Info header + * + * @todo validate server rspauth response + */ + protected function updateChallenge(&$challenge, $headerValue) + { + $authParam = '!(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . + self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')!'; + $paramsAry = array(); + + preg_match_all($authParam, $headerValue, $params); + for ($i = 0; $i < count($params[0]); $i++) { + if ('"' == substr($params[2][$i], 0, 1)) { + $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); + } else { + $paramsAry[$params[1][$i]] = $params[2][$i]; + } + } + // for now, just update the nonce value + if (!empty($paramsAry['nextnonce'])) { + $challenge['nonce'] = $paramsAry['nextnonce']; + $challenge['nc'] = 1; + } + } + + /** + * Creates a value for [Proxy-]Authorization header when using digest authentication + * + * @param string $user user name + * @param string $password password + * @param string $url request URL + * @param array &$challenge digest challenge parameters + * + * @return string value of [Proxy-]Authorization request header + * @link http://tools.ietf.org/html/rfc2617#section-3.2.2 + */ + protected function createDigestResponse($user, $password, $url, &$challenge) + { + if (false !== ($q = strpos($url, '?')) + && $this->request->getConfig('digest_compat_ie') + ) { + $url = substr($url, 0, $q); + } + + $a1 = md5($user . ':' . $challenge['realm'] . ':' . $password); + $a2 = md5($this->request->getMethod() . ':' . $url); + + if (empty($challenge['qop'])) { + $digest = md5($a1 . ':' . $challenge['nonce'] . ':' . $a2); + } else { + $challenge['cnonce'] = 'Req2.' . rand(); + if (empty($challenge['nc'])) { + $challenge['nc'] = 1; + } + $nc = sprintf('%08x', $challenge['nc']++); + $digest = md5( + $a1 . ':' . $challenge['nonce'] . ':' . $nc . ':' . + $challenge['cnonce'] . ':auth:' . $a2 + ); + } + return 'Digest username="' . str_replace(array('\\', '"'), array('\\\\', '\\"'), $user) . '", ' . + 'realm="' . $challenge['realm'] . '", ' . + 'nonce="' . $challenge['nonce'] . '", ' . + 'uri="' . $url . '", ' . + 'response="' . $digest . '"' . + (!empty($challenge['opaque'])? + ', opaque="' . $challenge['opaque'] . '"': + '') . + (!empty($challenge['qop'])? + ', qop="auth", nc=' . $nc . ', cnonce="' . $challenge['cnonce'] . '"': + ''); + } + + /** + * Adds 'Authorization' header (if needed) to request headers array + * + * @param array &$headers request headers + * @param string $requestHost request host (needed for digest authentication) + * @param string $requestUrl request URL (needed for digest authentication) + * + * @throws HTTP_Request2_NotImplementedException + */ + protected function addAuthorizationHeader(&$headers, $requestHost, $requestUrl) + { + if (!($auth = $this->request->getAuth())) { + return; + } + switch ($auth['scheme']) { + case HTTP_Request2::AUTH_BASIC: + $headers['authorization'] = 'Basic ' . base64_encode( + $auth['user'] . ':' . $auth['password'] + ); + break; + + case HTTP_Request2::AUTH_DIGEST: + unset($this->serverChallenge); + $fullUrl = ('/' == $requestUrl[0])? + $this->request->getUrl()->getScheme() . '://' . + $requestHost . $requestUrl: + $requestUrl; + foreach (array_keys(self::$challenges) as $key) { + if ($key == substr($fullUrl, 0, strlen($key))) { + $headers['authorization'] = $this->createDigestResponse( + $auth['user'], $auth['password'], + $requestUrl, self::$challenges[$key] + ); + $this->serverChallenge =& self::$challenges[$key]; + break; + } + } + break; + + default: + throw new HTTP_Request2_NotImplementedException( + "Unknown HTTP authentication scheme '{$auth['scheme']}'" + ); + } + } + + /** + * Adds 'Proxy-Authorization' header (if needed) to request headers array + * + * @param array &$headers request headers + * @param string $requestUrl request URL (needed for digest authentication) + * + * @throws HTTP_Request2_NotImplementedException + */ + protected function addProxyAuthorizationHeader(&$headers, $requestUrl) + { + if (!$this->request->getConfig('proxy_host') + || !($user = $this->request->getConfig('proxy_user')) + || (0 == strcasecmp('https', $this->request->getUrl()->getScheme()) + && HTTP_Request2::METHOD_CONNECT != $this->request->getMethod()) + ) { + return; + } + + $password = $this->request->getConfig('proxy_password'); + switch ($this->request->getConfig('proxy_auth_scheme')) { + case HTTP_Request2::AUTH_BASIC: + $headers['proxy-authorization'] = 'Basic ' . base64_encode( + $user . ':' . $password + ); + break; + + case HTTP_Request2::AUTH_DIGEST: + unset($this->proxyChallenge); + $proxyUrl = 'proxy://' . $this->request->getConfig('proxy_host') . + ':' . $this->request->getConfig('proxy_port'); + if (!empty(self::$challenges[$proxyUrl])) { + $headers['proxy-authorization'] = $this->createDigestResponse( + $user, $password, + $requestUrl, self::$challenges[$proxyUrl] + ); + $this->proxyChallenge =& self::$challenges[$proxyUrl]; + } + break; + + default: + throw new HTTP_Request2_NotImplementedException( + "Unknown HTTP authentication scheme '" . + $this->request->getConfig('proxy_auth_scheme') . "'" + ); + } + } + + + /** + * Creates the string with the Request-Line and request headers + * + * @return string + * @throws HTTP_Request2_Exception + */ + protected function prepareHeaders() + { + $headers = $this->request->getHeaders(); + $url = $this->request->getUrl(); + $connect = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); + $host = $url->getHost(); + + $defaultPort = 0 == strcasecmp($url->getScheme(), 'https')? 443: 80; + if (($port = $url->getPort()) && $port != $defaultPort || $connect) { + $host .= ':' . (empty($port)? $defaultPort: $port); + } + // Do not overwrite explicitly set 'Host' header, see bug #16146 + if (!isset($headers['host'])) { + $headers['host'] = $host; + } + + if ($connect) { + $requestUrl = $host; + + } else { + if (!$this->request->getConfig('proxy_host') + || 'http' != $this->request->getConfig('proxy_type') + || 0 == strcasecmp($url->getScheme(), 'https') + ) { + $requestUrl = ''; + } else { + $requestUrl = $url->getScheme() . '://' . $host; + } + $path = $url->getPath(); + $query = $url->getQuery(); + $requestUrl .= (empty($path)? '/': $path) . (empty($query)? '': '?' . $query); + } + + if ('1.1' == $this->request->getConfig('protocol_version') + && extension_loaded('zlib') && !isset($headers['accept-encoding']) + ) { + $headers['accept-encoding'] = 'gzip, deflate'; + } + if (($jar = $this->request->getCookieJar()) + && ($cookies = $jar->getMatching($this->request->getUrl(), true)) + ) { + $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; + } + + $this->addAuthorizationHeader($headers, $host, $requestUrl); + $this->addProxyAuthorizationHeader($headers, $requestUrl); + $this->calculateRequestLength($headers); + if ('1.1' == $this->request->getConfig('protocol_version')) { + $this->updateExpectHeader($headers); + } else { + $this->expect100Continue = false; + } + + $headersStr = $this->request->getMethod() . ' ' . $requestUrl . ' HTTP/' . + $this->request->getConfig('protocol_version') . "\r\n"; + foreach ($headers as $name => $value) { + $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); + $headersStr .= $canonicalName . ': ' . $value . "\r\n"; + } + return $headersStr . "\r\n"; + } + + /** + * Adds or removes 'Expect: 100-continue' header from request headers + * + * Also sets the $expect100Continue property. Parsing of existing header + * is somewhat needed due to its complex structure and due to the + * requirement in section 8.2.3 of RFC 2616: + * > A client MUST NOT send an Expect request-header field (section + * > 14.20) with the "100-continue" expectation if it does not intend + * > to send a request body. + * + * @param array &$headers Array of headers prepared for the request + * + * @throws HTTP_Request2_LogicException + * @link http://pear.php.net/bugs/bug.php?id=19233 + * @link http://tools.ietf.org/html/rfc2616#section-8.2.3 + */ + protected function updateExpectHeader(&$headers) + { + $this->expect100Continue = false; + $expectations = array(); + if (isset($headers['expect'])) { + if ('' === $headers['expect']) { + // empty 'Expect' header is technically invalid, so just get rid of it + unset($headers['expect']); + return; + } + // build regexp to parse the value of existing Expect header + $expectParam = ';\s*' . self::REGEXP_TOKEN . '(?:\s*=\s*(?:' + . self::REGEXP_TOKEN . '|' + . self::REGEXP_QUOTED_STRING . '))?\s*'; + $expectExtension = self::REGEXP_TOKEN . '(?:\s*=\s*(?:' + . self::REGEXP_TOKEN . '|' + . self::REGEXP_QUOTED_STRING . ')\s*(?:' + . $expectParam . ')*)?'; + $expectItem = '!(100-continue|' . $expectExtension . ')!A'; + + $pos = 0; + $length = strlen($headers['expect']); + + while ($pos < $length) { + $pos += strspn($headers['expect'], " \t", $pos); + if (',' === substr($headers['expect'], $pos, 1)) { + $pos++; + continue; + + } elseif (!preg_match($expectItem, $headers['expect'], $m, 0, $pos)) { + throw new HTTP_Request2_LogicException( + "Cannot parse value '{$headers['expect']}' of Expect header", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + + } else { + $pos += strlen($m[0]); + if (strcasecmp('100-continue', $m[0])) { + $expectations[] = $m[0]; + } + } + } + } + + if (1024 < $this->contentLength) { + $expectations[] = '100-continue'; + $this->expect100Continue = true; + } + + if (empty($expectations)) { + unset($headers['expect']); + } else { + $headers['expect'] = implode(',', $expectations); + } + } + + /** + * Sends the request body + * + * @throws HTTP_Request2_MessageException + */ + protected function writeBody() + { + if (in_array($this->request->getMethod(), self::$bodyDisallowed) + || 0 == $this->contentLength + ) { + return; + } + + $position = 0; + $bufferSize = $this->request->getConfig('buffer_size'); + $headers = $this->request->getHeaders(); + $chunked = isset($headers['transfer-encoding']); + while ($position < $this->contentLength) { + if (is_string($this->requestBody)) { + $str = substr($this->requestBody, $position, $bufferSize); + } elseif (is_resource($this->requestBody)) { + $str = fread($this->requestBody, $bufferSize); + } else { + $str = $this->requestBody->read($bufferSize); + } + if (!$chunked) { + $this->socket->write($str); + } else { + $this->socket->write(dechex(strlen($str)) . "\r\n{$str}\r\n"); + } + // Provide the length of written string to the observer, request #7630 + $this->request->setLastEvent('sentBodyPart', strlen($str)); + $position += strlen($str); + } + + // write zero-length chunk + if ($chunked) { + $this->socket->write("0\r\n\r\n"); + } + $this->request->setLastEvent('sentBody', $this->contentLength); + } + + /** + * Reads the remote server's response + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + protected function readResponse() + { + $bufferSize = $this->request->getConfig('buffer_size'); + // http://tools.ietf.org/html/rfc2616#section-8.2.3 + // ...the client SHOULD NOT wait for an indefinite period before sending the request body + $timeout = $this->expect100Continue ? 1 : null; + + do { + try { + $response = new HTTP_Request2_Response( + $this->socket->readLine($bufferSize, $timeout), true, $this->request->getUrl() + ); + do { + $headerLine = $this->socket->readLine($bufferSize); + $response->parseHeaderLine($headerLine); + } while ('' != $headerLine); + + } catch (HTTP_Request2_MessageException $e) { + if (HTTP_Request2_Exception::TIMEOUT === $e->getCode() + && $this->expect100Continue + ) { + return null; + } + throw $e; + } + if ($this->expect100Continue && 100 == $response->getStatus()) { + return $response; + } + } while (in_array($response->getStatus(), array(100, 101))); + + $this->request->setLastEvent('receivedHeaders', $response); + + // No body possible in such responses + if (HTTP_Request2::METHOD_HEAD == $this->request->getMethod() + || (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() + && 200 <= $response->getStatus() && 300 > $response->getStatus()) + || in_array($response->getStatus(), array(204, 304)) + ) { + return $response; + } + + $chunked = 'chunked' == $response->getHeader('transfer-encoding'); + $length = $response->getHeader('content-length'); + $hasBody = false; + // RFC 2616, section 4.4: + // 3. ... If a message is received with both a + // Transfer-Encoding header field and a Content-Length header field, + // the latter MUST be ignored. + $toRead = ($chunked || null === $length)? null: $length; + $this->chunkLength = 0; + + if ($chunked || null === $length || 0 < intval($length)) { + while (!$this->socket->eof() && (is_null($toRead) || 0 < $toRead)) { + if ($chunked) { + $data = $this->readChunked($bufferSize); + } elseif (is_null($toRead)) { + $data = $this->socket->read($bufferSize); + } else { + $data = $this->socket->read(min($toRead, $bufferSize)); + $toRead -= strlen($data); + } + if ('' == $data && (!$this->chunkLength || $this->socket->eof())) { + break; + } + + $hasBody = true; + if ($this->request->getConfig('store_body')) { + $response->appendBody($data); + } + if (!in_array($response->getHeader('content-encoding'), array('identity', null))) { + $this->request->setLastEvent('receivedEncodedBodyPart', $data); + } else { + $this->request->setLastEvent('receivedBodyPart', $data); + } + } + } + if (0 !== $this->chunkLength || null !== $toRead && $toRead > 0) { + $this->request->setLastEvent( + 'warning', 'transfer closed with outstanding read data remaining' + ); + } + + if ($hasBody) { + $this->request->setLastEvent('receivedBody', $response); + } + return $response; + } + + /** + * Reads a part of response body encoded with chunked Transfer-Encoding + * + * @param int $bufferSize buffer size to use for reading + * + * @return string + * @throws HTTP_Request2_MessageException + */ + protected function readChunked($bufferSize) + { + // at start of the next chunk? + if (0 == $this->chunkLength) { + $line = $this->socket->readLine($bufferSize); + if ('' === $line && $this->socket->eof()) { + $this->chunkLength = -1; // indicate missing chunk + return ''; + + } elseif (!preg_match('/^([0-9a-f]+)/i', $line, $matches)) { + throw new HTTP_Request2_MessageException( + "Cannot decode chunked response, invalid chunk length '{$line}'", + HTTP_Request2_Exception::DECODE_ERROR + ); + + } else { + $this->chunkLength = hexdec($matches[1]); + // Chunk with zero length indicates the end + if (0 == $this->chunkLength) { + $this->socket->readLine($bufferSize); + return ''; + } + } + } + $data = $this->socket->read(min($this->chunkLength, $bufferSize)); + $this->chunkLength -= strlen($data); + if (0 == $this->chunkLength) { + $this->socket->readLine($bufferSize); // Trailing CRLF + } + return $data; + } +} + ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/CookieJar.php b/bundled-libs/HTTP/Request2/CookieJar.php index ed6352eb..f191e255 100644 --- a/bundled-libs/HTTP/Request2/CookieJar.php +++ b/bundled-libs/HTTP/Request2/CookieJar.php @@ -1,494 +1,547 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Class representing a HTTP request message */ -require_once 'HTTP/Request2.php'; - -/** - * Stores cookies and passes them between HTTP requests - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: @package_version@ - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_CookieJar implements Serializable -{ - /** - * Array of stored cookies - * - * The array is indexed by domain, path and cookie name - * .example.com - * / - * some_cookie => cookie data - * /subdir - * other_cookie => cookie data - * .example.org - * ... - * - * @var array - */ - protected $cookies = array(); - - /** - * Whether session cookies should be serialized when serializing the jar - * @var bool - */ - protected $serializeSession = false; - - /** - * Whether Public Suffix List should be used for domain matching - * @var bool - */ - protected $useList = true; - - /** - * Array with Public Suffix List data - * @var array - * @link http://publicsuffix.org/ - */ - protected static $psl = array(); - - /** - * Class constructor, sets various options - * - * @param bool $serializeSessionCookies Controls serializing session cookies, - * see {@link serializeSessionCookies()} - * @param bool $usePublicSuffixList Controls using Public Suffix List, - * see {@link usePublicSuffixList()} - */ - public function __construct( - $serializeSessionCookies = false, $usePublicSuffixList = true - ) { - $this->serializeSessionCookies($serializeSessionCookies); - $this->usePublicSuffixList($usePublicSuffixList); - } - - /** - * Returns current time formatted in ISO-8601 at UTC timezone - * - * @return string - */ - protected function now() - { - $dt = new DateTime(); - $dt->setTimezone(new DateTimeZone('UTC')); - return $dt->format(DateTime::ISO8601); - } - - /** - * Checks cookie array for correctness, possibly updating its 'domain', 'path' and 'expires' fields - * - * The checks are as follows: - * - cookie array should contain 'name' and 'value' fields; - * - name and value should not contain disallowed symbols; - * - 'expires' should be either empty parseable by DateTime; - * - 'domain' and 'path' should be either not empty or an URL where - * cookie was set should be provided. - * - if $setter is provided, then document at that URL should be allowed - * to set a cookie for that 'domain'. If $setter is not provided, - * then no domain checks will be made. - * - * 'expires' field will be converted to ISO8601 format from COOKIE format, - * 'domain' and 'path' will be set from setter URL if empty. - * - * @param array $cookie cookie data, as returned by - * {@link HTTP_Request2_Response::getCookies()} - * @param Net_URL2 $setter URL of the document that sent Set-Cookie header - * - * @return array Updated cookie array - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_MessageException - */ - protected function checkAndUpdateFields(array $cookie, Net_URL2 $setter = null) - { - if ($missing = array_diff(array('name', 'value'), array_keys($cookie))) { - throw new HTTP_Request2_LogicException( - "Cookie array should contain 'name' and 'value' fields", - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['name'])) { - throw new HTTP_Request2_LogicException( - "Invalid cookie name: '{$cookie['name']}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['value'])) { - throw new HTTP_Request2_LogicException( - "Invalid cookie value: '{$cookie['value']}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $cookie += array('domain' => '', 'path' => '', 'expires' => null, 'secure' => false); - - // Need ISO-8601 date @ UTC timezone - if (!empty($cookie['expires']) - && !preg_match('/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+0000$/', $cookie['expires']) - ) { - try { - $dt = new DateTime($cookie['expires']); - $dt->setTimezone(new DateTimeZone('UTC')); - $cookie['expires'] = $dt->format(DateTime::ISO8601); - } catch (Exception $e) { - throw new HTTP_Request2_LogicException($e->getMessage()); - } - } - - if (empty($cookie['domain']) || empty($cookie['path'])) { - if (!$setter) { - throw new HTTP_Request2_LogicException( - 'Cookie misses domain and/or path component, cookie setter URL needed', - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if (empty($cookie['domain'])) { - if ($host = $setter->getHost()) { - $cookie['domain'] = $host; - } else { - throw new HTTP_Request2_LogicException( - 'Setter URL does not contain host part, can\'t set cookie domain', - HTTP_Request2_Exception::MISSING_VALUE - ); - } - } - if (empty($cookie['path'])) { - $path = $setter->getPath(); - $cookie['path'] = empty($path)? '/': substr($path, 0, strrpos($path, '/') + 1); - } - } - - if ($setter && !$this->domainMatch($setter->getHost(), $cookie['domain'])) { - throw new HTTP_Request2_MessageException( - "Domain " . $setter->getHost() . " cannot set cookies for " - . $cookie['domain'] - ); - } - - return $cookie; - } - - /** - * Stores a cookie in the jar - * - * @param array $cookie cookie data, as returned by - * {@link HTTP_Request2_Response::getCookies()} - * @param Net_URL2 $setter URL of the document that sent Set-Cookie header - * - * @throws HTTP_Request2_Exception - */ - public function store(array $cookie, Net_URL2 $setter = null) - { - $cookie = $this->checkAndUpdateFields($cookie, $setter); - - if (strlen($cookie['value']) - && (is_null($cookie['expires']) || $cookie['expires'] > $this->now()) - ) { - if (!isset($this->cookies[$cookie['domain']])) { - $this->cookies[$cookie['domain']] = array(); - } - if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { - $this->cookies[$cookie['domain']][$cookie['path']] = array(); - } - $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; - - } elseif (isset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']])) { - unset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']]); - } - } - - /** - * Adds cookies set in HTTP response to the jar - * - * @param HTTP_Request2_Response $response HTTP response message - * @param Net_URL2 $setter original request URL, needed for - * setting default domain/path - */ - public function addCookiesFromResponse(HTTP_Request2_Response $response, Net_URL2 $setter) - { - foreach ($response->getCookies() as $cookie) { - $this->store($cookie, $setter); - } - } - - /** - * Returns all cookies matching a given request URL - * - * The following checks are made: - * - cookie domain should match request host - * - cookie path should be a prefix for request path - * - 'secure' cookies will only be sent for HTTPS requests - * - * @param Net_URL2 $url Request url - * @param bool $asString Whether to return cookies as string for "Cookie: " header - * - * @return array|string Matching cookies - */ - public function getMatching(Net_URL2 $url, $asString = false) - { - $host = $url->getHost(); - $path = $url->getPath(); - $secure = 0 == strcasecmp($url->getScheme(), 'https'); - - $matched = $ret = array(); - foreach (array_keys($this->cookies) as $domain) { - if ($this->domainMatch($host, $domain)) { - foreach (array_keys($this->cookies[$domain]) as $cPath) { - if (0 === strpos($path, $cPath)) { - foreach ($this->cookies[$domain][$cPath] as $name => $cookie) { - if (!$cookie['secure'] || $secure) { - $matched[$name][strlen($cookie['path'])] = $cookie; - } - } - } - } - } - } - foreach ($matched as $cookies) { - krsort($cookies); - $ret = array_merge($ret, $cookies); - } - if (!$asString) { - return $ret; - } else { - $str = ''; - foreach ($ret as $c) { - $str .= (empty($str)? '': '; ') . $c['name'] . '=' . $c['value']; - } - return $str; - } - } - - /** - * Returns all cookies stored in a jar - * - * @return array - */ - public function getAll() - { - $cookies = array(); - foreach (array_keys($this->cookies) as $domain) { - foreach (array_keys($this->cookies[$domain]) as $path) { - foreach ($this->cookies[$domain][$path] as $name => $cookie) { - $cookies[] = $cookie; - } - } - } - return $cookies; - } - - /** - * Sets whether session cookies should be serialized when serializing the jar - * - * @param boolean $serialize serialize? - */ - public function serializeSessionCookies($serialize) - { - $this->serializeSession = (bool)$serialize; - } - - /** - * Sets whether Public Suffix List should be used for restricting cookie-setting - * - * Without PSL {@link domainMatch()} will only prevent setting cookies for - * top-level domains like '.com' or '.org'. However, it will not prevent - * setting a cookie for '.co.uk' even though only third-level registrations - * are possible in .uk domain. - * - * With the List it is possible to find the highest level at which a domain - * may be registered for a particular top-level domain and consequently - * prevent cookies set for '.co.uk' or '.msk.ru'. The same list is used by - * Firefox, Chrome and Opera browsers to restrict cookie setting. - * - * Note that PSL is licensed differently to HTTP_Request2 package (refer to - * the license information in public-suffix-list.php), so you can disable - * its use if this is an issue for you. - * - * @param boolean $useList use the list? - * - * @link http://publicsuffix.org/learn/ - */ - public function usePublicSuffixList($useList) - { - $this->useList = (bool)$useList; - } - - /** - * Returns string representation of object - * - * @return string - * - * @see Serializable::serialize() - */ - public function serialize() - { - $cookies = $this->getAll(); - if (!$this->serializeSession) { - for ($i = count($cookies) - 1; $i >= 0; $i--) { - if (empty($cookies[$i]['expires'])) { - unset($cookies[$i]); - } - } - } - return serialize(array( - 'cookies' => $cookies, - 'serializeSession' => $this->serializeSession, - 'useList' => $this->useList - )); - } - - /** - * Constructs the object from serialized string - * - * @param string $serialized string representation - * - * @see Serializable::unserialize() - */ - public function unserialize($serialized) - { - $data = unserialize($serialized); - $now = $this->now(); - $this->serializeSessionCookies($data['serializeSession']); - $this->usePublicSuffixList($data['useList']); - foreach ($data['cookies'] as $cookie) { - if (!empty($cookie['expires']) && $cookie['expires'] <= $now) { - continue; - } - if (!isset($this->cookies[$cookie['domain']])) { - $this->cookies[$cookie['domain']] = array(); - } - if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { - $this->cookies[$cookie['domain']][$cookie['path']] = array(); - } - $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; - } - } - - /** - * Checks whether a cookie domain matches a request host. - * - * The method is used by {@link store()} to check for whether a document - * at given URL can set a cookie with a given domain attribute and by - * {@link getMatching()} to find cookies matching the request URL. - * - * @param string $requestHost request host - * @param string $cookieDomain cookie domain - * - * @return bool match success - */ - public function domainMatch($requestHost, $cookieDomain) - { - if ($requestHost == $cookieDomain) { - return true; - } - // IP address, we require exact match - if (preg_match('/^(?:\d{1,3}\.){3}\d{1,3}$/', $requestHost)) { - return false; - } - if ('.' != $cookieDomain[0]) { - $cookieDomain = '.' . $cookieDomain; - } - // prevents setting cookies for '.com' and similar domains - if (!$this->useList && substr_count($cookieDomain, '.') < 2 - || $this->useList && !self::getRegisteredDomain($cookieDomain) - ) { - return false; - } - return substr('.' . $requestHost, -strlen($cookieDomain)) == $cookieDomain; - } - - /** - * Removes subdomains to get the registered domain (the first after top-level) - * - * The method will check Public Suffix List to find out where top-level - * domain ends and registered domain starts. It will remove domain parts - * to the left of registered one. - * - * @param string $domain domain name - * - * @return string|bool registered domain, will return false if $domain is - * either invalid or a TLD itself - */ - public static function getRegisteredDomain($domain) - { - $domainParts = explode('.', ltrim($domain, '.')); - - // load the list if needed - if (empty(self::$psl)) { - $path = '@data_dir@' . DIRECTORY_SEPARATOR . 'HTTP_Request2'; - if (0 === strpos($path, '@' . 'data_dir@')) { - $path = realpath( - dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' - . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data' - ); - } - self::$psl = include_once $path . DIRECTORY_SEPARATOR . 'public-suffix-list.php'; - } - - if (!($result = self::checkDomainsList($domainParts, self::$psl))) { - // known TLD, invalid domain name - return false; - } - - // unknown TLD - if (!strpos($result, '.')) { - // fallback to checking that domain "has at least two dots" - if (2 > ($count = count($domainParts))) { - return false; - } - return $domainParts[$count - 2] . '.' . $domainParts[$count - 1]; - } - return $result; - } - - /** - * Recursive helper method for {@link getRegisteredDomain()} - * - * @param array $domainParts remaining domain parts - * @param mixed $listNode node in {@link HTTP_Request2_CookieJar::$psl} to check - * - * @return string|null concatenated domain parts, null in case of error - */ - protected static function checkDomainsList(array $domainParts, $listNode) - { - $sub = array_pop($domainParts); - $result = null; - - if (!is_array($listNode) || is_null($sub) - || array_key_exists('!' . $sub, $listNode) - ) { - return $sub; - - } elseif (array_key_exists($sub, $listNode)) { - $result = self::checkDomainsList($domainParts, $listNode[$sub]); - - } elseif (array_key_exists('*', $listNode)) { - $result = self::checkDomainsList($domainParts, $listNode['*']); - - } else { - return $sub; - } - - return (strlen($result) > 0) ? ($result . '.' . $sub) : null; - } -} + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Class representing a HTTP request message */ +require_once 'HTTP/Request2.php'; + +/** + * Stores cookies and passes them between HTTP requests + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: @package_version@ + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_CookieJar implements Serializable +{ + /** + * Array of stored cookies + * + * The array is indexed by domain, path and cookie name + * .example.com + * / + * some_cookie => cookie data + * /subdir + * other_cookie => cookie data + * .example.org + * ... + * + * @var array + */ + protected $cookies = array(); + + /** + * Whether session cookies should be serialized when serializing the jar + * @var bool + */ + protected $serializeSession = false; + + /** + * Whether Public Suffix List should be used for domain matching + * @var bool + */ + protected $useList = true; + + /** + * Whether an attempt to store an invalid cookie should be ignored, rather than cause an Exception + * @var bool + */ + protected $ignoreInvalid = false; + + /** + * Array with Public Suffix List data + * @var array + * @link http://publicsuffix.org/ + */ + protected static $psl = array(); + + /** + * Class constructor, sets various options + * + * @param bool $serializeSessionCookies Controls serializing session cookies, + * see {@link serializeSessionCookies()} + * @param bool $usePublicSuffixList Controls using Public Suffix List, + * see {@link usePublicSuffixList()} + * @param bool $ignoreInvalidCookies Whether invalid cookies should be ignored, + * see {@link ignoreInvalidCookies()} + */ + public function __construct( + $serializeSessionCookies = false, $usePublicSuffixList = true, + $ignoreInvalidCookies = false + ) { + $this->serializeSessionCookies($serializeSessionCookies); + $this->usePublicSuffixList($usePublicSuffixList); + $this->ignoreInvalidCookies($ignoreInvalidCookies); + } + + /** + * Returns current time formatted in ISO-8601 at UTC timezone + * + * @return string + */ + protected function now() + { + $dt = new DateTime(); + $dt->setTimezone(new DateTimeZone('UTC')); + return $dt->format(DateTime::ISO8601); + } + + /** + * Checks cookie array for correctness, possibly updating its 'domain', 'path' and 'expires' fields + * + * The checks are as follows: + * - cookie array should contain 'name' and 'value' fields; + * - name and value should not contain disallowed symbols; + * - 'expires' should be either empty parseable by DateTime; + * - 'domain' and 'path' should be either not empty or an URL where + * cookie was set should be provided. + * - if $setter is provided, then document at that URL should be allowed + * to set a cookie for that 'domain'. If $setter is not provided, + * then no domain checks will be made. + * + * 'expires' field will be converted to ISO8601 format from COOKIE format, + * 'domain' and 'path' will be set from setter URL if empty. + * + * @param array $cookie cookie data, as returned by + * {@link HTTP_Request2_Response::getCookies()} + * @param Net_URL2 $setter URL of the document that sent Set-Cookie header + * + * @return array Updated cookie array + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_MessageException + */ + protected function checkAndUpdateFields(array $cookie, Net_URL2 $setter = null) + { + if ($missing = array_diff(array('name', 'value'), array_keys($cookie))) { + throw new HTTP_Request2_LogicException( + "Cookie array should contain 'name' and 'value' fields", + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['name'])) { + throw new HTTP_Request2_LogicException( + "Invalid cookie name: '{$cookie['name']}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['value'])) { + throw new HTTP_Request2_LogicException( + "Invalid cookie value: '{$cookie['value']}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $cookie += array('domain' => '', 'path' => '', 'expires' => null, 'secure' => false); + + // Need ISO-8601 date @ UTC timezone + if (!empty($cookie['expires']) + && !preg_match('/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+0000$/', $cookie['expires']) + ) { + try { + $dt = new DateTime($cookie['expires']); + $dt->setTimezone(new DateTimeZone('UTC')); + $cookie['expires'] = $dt->format(DateTime::ISO8601); + } catch (Exception $e) { + throw new HTTP_Request2_LogicException($e->getMessage()); + } + } + + if (empty($cookie['domain']) || empty($cookie['path'])) { + if (!$setter) { + throw new HTTP_Request2_LogicException( + 'Cookie misses domain and/or path component, cookie setter URL needed', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if (empty($cookie['domain'])) { + if ($host = $setter->getHost()) { + $cookie['domain'] = $host; + } else { + throw new HTTP_Request2_LogicException( + 'Setter URL does not contain host part, can\'t set cookie domain', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + } + if (empty($cookie['path'])) { + $path = $setter->getPath(); + $cookie['path'] = empty($path)? '/': substr($path, 0, strrpos($path, '/') + 1); + } + } + + if ($setter && !$this->domainMatch($setter->getHost(), $cookie['domain'])) { + throw new HTTP_Request2_MessageException( + "Domain " . $setter->getHost() . " cannot set cookies for " + . $cookie['domain'] + ); + } + + return $cookie; + } + + /** + * Stores a cookie in the jar + * + * @param array $cookie cookie data, as returned by + * {@link HTTP_Request2_Response::getCookies()} + * @param Net_URL2 $setter URL of the document that sent Set-Cookie header + * + * @return bool whether the cookie was successfully stored + * @throws HTTP_Request2_Exception + */ + public function store(array $cookie, Net_URL2 $setter = null) + { + try { + $cookie = $this->checkAndUpdateFields($cookie, $setter); + } catch (HTTP_Request2_Exception $e) { + if ($this->ignoreInvalid) { + return false; + } else { + throw $e; + } + } + + if (strlen($cookie['value']) + && (is_null($cookie['expires']) || $cookie['expires'] > $this->now()) + ) { + if (!isset($this->cookies[$cookie['domain']])) { + $this->cookies[$cookie['domain']] = array(); + } + if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { + $this->cookies[$cookie['domain']][$cookie['path']] = array(); + } + $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; + + } elseif (isset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']])) { + unset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']]); + } + + return true; + } + + /** + * Adds cookies set in HTTP response to the jar + * + * @param HTTP_Request2_Response $response HTTP response message + * @param Net_URL2 $setter original request URL, needed for + * setting default domain/path. If not given, + * effective URL from response will be used. + * + * @return bool whether all cookies were successfully stored + * @throws HTTP_Request2_LogicException + */ + public function addCookiesFromResponse(HTTP_Request2_Response $response, Net_URL2 $setter = null) + { + if (null === $setter) { + if (!($effectiveUrl = $response->getEffectiveUrl())) { + throw new HTTP_Request2_LogicException( + 'Response URL required for adding cookies from response', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + $setter = new Net_URL2($effectiveUrl); + } + + $success = true; + foreach ($response->getCookies() as $cookie) { + $success = $this->store($cookie, $setter) && $success; + } + return $success; + } + + /** + * Returns all cookies matching a given request URL + * + * The following checks are made: + * - cookie domain should match request host + * - cookie path should be a prefix for request path + * - 'secure' cookies will only be sent for HTTPS requests + * + * @param Net_URL2 $url Request url + * @param bool $asString Whether to return cookies as string for "Cookie: " header + * + * @return array|string Matching cookies + */ + public function getMatching(Net_URL2 $url, $asString = false) + { + $host = $url->getHost(); + $path = $url->getPath(); + $secure = 0 == strcasecmp($url->getScheme(), 'https'); + + $matched = $ret = array(); + foreach (array_keys($this->cookies) as $domain) { + if ($this->domainMatch($host, $domain)) { + foreach (array_keys($this->cookies[$domain]) as $cPath) { + if (0 === strpos($path, $cPath)) { + foreach ($this->cookies[$domain][$cPath] as $name => $cookie) { + if (!$cookie['secure'] || $secure) { + $matched[$name][strlen($cookie['path'])] = $cookie; + } + } + } + } + } + } + foreach ($matched as $cookies) { + krsort($cookies); + $ret = array_merge($ret, $cookies); + } + if (!$asString) { + return $ret; + } else { + $str = ''; + foreach ($ret as $c) { + $str .= (empty($str)? '': '; ') . $c['name'] . '=' . $c['value']; + } + return $str; + } + } + + /** + * Returns all cookies stored in a jar + * + * @return array + */ + public function getAll() + { + $cookies = array(); + foreach (array_keys($this->cookies) as $domain) { + foreach (array_keys($this->cookies[$domain]) as $path) { + foreach ($this->cookies[$domain][$path] as $name => $cookie) { + $cookies[] = $cookie; + } + } + } + return $cookies; + } + + /** + * Sets whether session cookies should be serialized when serializing the jar + * + * @param boolean $serialize serialize? + */ + public function serializeSessionCookies($serialize) + { + $this->serializeSession = (bool)$serialize; + } + + /** + * Sets whether invalid cookies should be silently ignored or cause an Exception + * + * @param boolean $ignore ignore? + * @link http://pear.php.net/bugs/bug.php?id=19937 + * @link http://pear.php.net/bugs/bug.php?id=20401 + */ + public function ignoreInvalidCookies($ignore) + { + $this->ignoreInvalid = (bool)$ignore; + } + + /** + * Sets whether Public Suffix List should be used for restricting cookie-setting + * + * Without PSL {@link domainMatch()} will only prevent setting cookies for + * top-level domains like '.com' or '.org'. However, it will not prevent + * setting a cookie for '.co.uk' even though only third-level registrations + * are possible in .uk domain. + * + * With the List it is possible to find the highest level at which a domain + * may be registered for a particular top-level domain and consequently + * prevent cookies set for '.co.uk' or '.msk.ru'. The same list is used by + * Firefox, Chrome and Opera browsers to restrict cookie setting. + * + * Note that PSL is licensed differently to HTTP_Request2 package (refer to + * the license information in public-suffix-list.php), so you can disable + * its use if this is an issue for you. + * + * @param boolean $useList use the list? + * + * @link http://publicsuffix.org/learn/ + */ + public function usePublicSuffixList($useList) + { + $this->useList = (bool)$useList; + } + + /** + * Returns string representation of object + * + * @return string + * + * @see Serializable::serialize() + */ + public function serialize() + { + $cookies = $this->getAll(); + if (!$this->serializeSession) { + for ($i = count($cookies) - 1; $i >= 0; $i--) { + if (empty($cookies[$i]['expires'])) { + unset($cookies[$i]); + } + } + } + return serialize(array( + 'cookies' => $cookies, + 'serializeSession' => $this->serializeSession, + 'useList' => $this->useList, + 'ignoreInvalid' => $this->ignoreInvalid + )); + } + + /** + * Constructs the object from serialized string + * + * @param string $serialized string representation + * + * @see Serializable::unserialize() + */ + public function unserialize($serialized) + { + $data = unserialize($serialized); + $now = $this->now(); + $this->serializeSessionCookies($data['serializeSession']); + $this->usePublicSuffixList($data['useList']); + if (array_key_exists('ignoreInvalid', $data)) { + $this->ignoreInvalidCookies($data['ignoreInvalid']); + } + foreach ($data['cookies'] as $cookie) { + if (!empty($cookie['expires']) && $cookie['expires'] <= $now) { + continue; + } + if (!isset($this->cookies[$cookie['domain']])) { + $this->cookies[$cookie['domain']] = array(); + } + if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { + $this->cookies[$cookie['domain']][$cookie['path']] = array(); + } + $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; + } + } + + /** + * Checks whether a cookie domain matches a request host. + * + * The method is used by {@link store()} to check for whether a document + * at given URL can set a cookie with a given domain attribute and by + * {@link getMatching()} to find cookies matching the request URL. + * + * @param string $requestHost request host + * @param string $cookieDomain cookie domain + * + * @return bool match success + */ + public function domainMatch($requestHost, $cookieDomain) + { + if ($requestHost == $cookieDomain) { + return true; + } + // IP address, we require exact match + if (preg_match('/^(?:\d{1,3}\.){3}\d{1,3}$/', $requestHost)) { + return false; + } + if ('.' != $cookieDomain[0]) { + $cookieDomain = '.' . $cookieDomain; + } + // prevents setting cookies for '.com' and similar domains + if (!$this->useList && substr_count($cookieDomain, '.') < 2 + || $this->useList && !self::getRegisteredDomain($cookieDomain) + ) { + return false; + } + return substr('.' . $requestHost, -strlen($cookieDomain)) == $cookieDomain; + } + + /** + * Removes subdomains to get the registered domain (the first after top-level) + * + * The method will check Public Suffix List to find out where top-level + * domain ends and registered domain starts. It will remove domain parts + * to the left of registered one. + * + * @param string $domain domain name + * + * @return string|bool registered domain, will return false if $domain is + * either invalid or a TLD itself + */ + public static function getRegisteredDomain($domain) + { + $domainParts = explode('.', ltrim($domain, '.')); + + // load the list if needed + if (empty(self::$psl)) { + $path = '@data_dir@' . DIRECTORY_SEPARATOR . 'HTTP_Request2'; + if (0 === strpos($path, '@' . 'data_dir@')) { + $path = realpath( + dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' + . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data' + ); + } + self::$psl = include_once $path . DIRECTORY_SEPARATOR . 'public-suffix-list.php'; + } + + if (!($result = self::checkDomainsList($domainParts, self::$psl))) { + // known TLD, invalid domain name + return false; + } + + // unknown TLD + if (!strpos($result, '.')) { + // fallback to checking that domain "has at least two dots" + if (2 > ($count = count($domainParts))) { + return false; + } + return $domainParts[$count - 2] . '.' . $domainParts[$count - 1]; + } + return $result; + } + + /** + * Recursive helper method for {@link getRegisteredDomain()} + * + * @param array $domainParts remaining domain parts + * @param mixed $listNode node in {@link HTTP_Request2_CookieJar::$psl} to check + * + * @return string|null concatenated domain parts, null in case of error + */ + protected static function checkDomainsList(array $domainParts, $listNode) + { + $sub = array_pop($domainParts); + $result = null; + + if (!is_array($listNode) || is_null($sub) + || array_key_exists('!' . $sub, $listNode) + ) { + return $sub; + + } elseif (array_key_exists($sub, $listNode)) { + $result = self::checkDomainsList($domainParts, $listNode[$sub]); + + } elseif (array_key_exists('*', $listNode)) { + $result = self::checkDomainsList($domainParts, $listNode['*']); + + } else { + return $sub; + } + + return (strlen($result) > 0) ? ($result . '.' . $sub) : null; + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/Exception.php b/bundled-libs/HTTP/Request2/Exception.php index 5fcd6917..de9432df 100644 --- a/bundled-libs/HTTP/Request2/Exception.php +++ b/bundled-libs/HTTP/Request2/Exception.php @@ -1,160 +1,160 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Base class for exceptions in PEAR - */ -require_once 'PEAR/Exception.php'; - -/** - * Base exception class for HTTP_Request2 package - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=132 - */ -class HTTP_Request2_Exception extends PEAR_Exception -{ - /** An invalid argument was passed to a method */ - const INVALID_ARGUMENT = 1; - /** Some required value was not available */ - const MISSING_VALUE = 2; - /** Request cannot be processed due to errors in PHP configuration */ - const MISCONFIGURATION = 3; - /** Error reading the local file */ - const READ_ERROR = 4; - - /** Server returned a response that does not conform to HTTP protocol */ - const MALFORMED_RESPONSE = 10; - /** Failure decoding Content-Encoding or Transfer-Encoding of response */ - const DECODE_ERROR = 20; - /** Operation timed out */ - const TIMEOUT = 30; - /** Number of redirects exceeded 'max_redirects' configuration parameter */ - const TOO_MANY_REDIRECTS = 40; - /** Redirect to a protocol other than http(s):// */ - const NON_HTTP_REDIRECT = 50; - - /** - * Native error code - * @var int - */ - private $_nativeCode; - - /** - * Constructor, can set package error code and native error code - * - * @param string $message exception message - * @param int $code package error code, one of class constants - * @param int $nativeCode error code from underlying PHP extension - */ - public function __construct($message = null, $code = null, $nativeCode = null) - { - parent::__construct($message, $code); - $this->_nativeCode = $nativeCode; - } - - /** - * Returns error code produced by underlying PHP extension - * - * For Socket Adapter this may contain error number returned by - * stream_socket_client(), for Curl Adapter this will contain error number - * returned by curl_errno() - * - * @return integer - */ - public function getNativeCode() - { - return $this->_nativeCode; - } -} - -/** - * Exception thrown in case of missing features - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_NotImplementedException extends HTTP_Request2_Exception -{ -} - -/** - * Exception that represents error in the program logic - * - * This exception usually implies a programmer's error, like passing invalid - * data to methods or trying to use PHP extensions that weren't installed or - * enabled. Usually exceptions of this kind will be thrown before request even - * starts. - * - * The exception will usually contain a package error code. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_LogicException extends HTTP_Request2_Exception -{ -} - -/** - * Exception thrown when connection to a web or proxy server fails - * - * The exception will not contain a package error code, but will contain - * native error code, as returned by stream_socket_client() or curl_errno(). - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_ConnectionException extends HTTP_Request2_Exception -{ -} - -/** - * Exception thrown when sending or receiving HTTP message fails - * - * The exception may contain both package error code and native error code. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_MessageException extends HTTP_Request2_Exception -{ -} + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Base class for exceptions in PEAR + */ +require_once 'PEAR/Exception.php'; + +/** + * Base exception class for HTTP_Request2 package + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=132 + */ +class HTTP_Request2_Exception extends PEAR_Exception +{ + /** An invalid argument was passed to a method */ + const INVALID_ARGUMENT = 1; + /** Some required value was not available */ + const MISSING_VALUE = 2; + /** Request cannot be processed due to errors in PHP configuration */ + const MISCONFIGURATION = 3; + /** Error reading the local file */ + const READ_ERROR = 4; + + /** Server returned a response that does not conform to HTTP protocol */ + const MALFORMED_RESPONSE = 10; + /** Failure decoding Content-Encoding or Transfer-Encoding of response */ + const DECODE_ERROR = 20; + /** Operation timed out */ + const TIMEOUT = 30; + /** Number of redirects exceeded 'max_redirects' configuration parameter */ + const TOO_MANY_REDIRECTS = 40; + /** Redirect to a protocol other than http(s):// */ + const NON_HTTP_REDIRECT = 50; + + /** + * Native error code + * @var int + */ + private $_nativeCode; + + /** + * Constructor, can set package error code and native error code + * + * @param string $message exception message + * @param int $code package error code, one of class constants + * @param int $nativeCode error code from underlying PHP extension + */ + public function __construct($message = null, $code = null, $nativeCode = null) + { + parent::__construct($message, $code); + $this->_nativeCode = $nativeCode; + } + + /** + * Returns error code produced by underlying PHP extension + * + * For Socket Adapter this may contain error number returned by + * stream_socket_client(), for Curl Adapter this will contain error number + * returned by curl_errno() + * + * @return integer + */ + public function getNativeCode() + { + return $this->_nativeCode; + } +} + +/** + * Exception thrown in case of missing features + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_NotImplementedException extends HTTP_Request2_Exception +{ +} + +/** + * Exception that represents error in the program logic + * + * This exception usually implies a programmer's error, like passing invalid + * data to methods or trying to use PHP extensions that weren't installed or + * enabled. Usually exceptions of this kind will be thrown before request even + * starts. + * + * The exception will usually contain a package error code. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_LogicException extends HTTP_Request2_Exception +{ +} + +/** + * Exception thrown when connection to a web or proxy server fails + * + * The exception will not contain a package error code, but will contain + * native error code, as returned by stream_socket_client() or curl_errno(). + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_ConnectionException extends HTTP_Request2_Exception +{ +} + +/** + * Exception thrown when sending or receiving HTTP message fails + * + * The exception may contain both package error code and native error code. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_MessageException extends HTTP_Request2_Exception +{ +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/MultipartBody.php b/bundled-libs/HTTP/Request2/MultipartBody.php index 198f563b..e5a38459 100644 --- a/bundled-libs/HTTP/Request2/MultipartBody.php +++ b/bundled-libs/HTTP/Request2/MultipartBody.php @@ -1,268 +1,268 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Exception class for HTTP_Request2 package */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Class for building multipart/form-data request body - * - * The class helps to reduce memory consumption by streaming large file uploads - * from disk, it also allows monitoring of upload progress (see request #7630) - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://tools.ietf.org/html/rfc1867 - */ -class HTTP_Request2_MultipartBody -{ - /** - * MIME boundary - * @var string - */ - private $_boundary; - - /** - * Form parameters added via {@link HTTP_Request2::addPostParameter()} - * @var array - */ - private $_params = array(); - - /** - * File uploads added via {@link HTTP_Request2::addUpload()} - * @var array - */ - private $_uploads = array(); - - /** - * Header for parts with parameters - * @var string - */ - private $_headerParam = "--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n"; - - /** - * Header for parts with uploads - * @var string - */ - private $_headerUpload = "--%s\r\nContent-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\nContent-Type: %s\r\n\r\n"; - - /** - * Current position in parameter and upload arrays - * - * First number is index of "current" part, second number is position within - * "current" part - * - * @var array - */ - private $_pos = array(0, 0); - - - /** - * Constructor. Sets the arrays with POST data. - * - * @param array $params values of form fields set via - * {@link HTTP_Request2::addPostParameter()} - * @param array $uploads file uploads set via - * {@link HTTP_Request2::addUpload()} - * @param bool $useBrackets whether to append brackets to array variable names - */ - public function __construct(array $params, array $uploads, $useBrackets = true) - { - $this->_params = self::_flattenArray('', $params, $useBrackets); - foreach ($uploads as $fieldName => $f) { - if (!is_array($f['fp'])) { - $this->_uploads[] = $f + array('name' => $fieldName); - } else { - for ($i = 0; $i < count($f['fp']); $i++) { - $upload = array( - 'name' => ($useBrackets? $fieldName . '[' . $i . ']': $fieldName) - ); - foreach (array('fp', 'filename', 'size', 'type') as $key) { - $upload[$key] = $f[$key][$i]; - } - $this->_uploads[] = $upload; - } - } - } - } - - /** - * Returns the length of the body to use in Content-Length header - * - * @return integer - */ - public function getLength() - { - $boundaryLength = strlen($this->getBoundary()); - $headerParamLength = strlen($this->_headerParam) - 4 + $boundaryLength; - $headerUploadLength = strlen($this->_headerUpload) - 8 + $boundaryLength; - $length = $boundaryLength + 6; - foreach ($this->_params as $p) { - $length += $headerParamLength + strlen($p[0]) + strlen($p[1]) + 2; - } - foreach ($this->_uploads as $u) { - $length += $headerUploadLength + strlen($u['name']) + strlen($u['type']) + - strlen($u['filename']) + $u['size'] + 2; - } - return $length; - } - - /** - * Returns the boundary to use in Content-Type header - * - * @return string - */ - public function getBoundary() - { - if (empty($this->_boundary)) { - $this->_boundary = '--' . md5('PEAR-HTTP_Request2-' . microtime()); - } - return $this->_boundary; - } - - /** - * Returns next chunk of request body - * - * @param integer $length Number of bytes to read - * - * @return string Up to $length bytes of data, empty string if at end - * @throws HTTP_Request2_LogicException - */ - public function read($length) - { - $ret = ''; - $boundary = $this->getBoundary(); - $paramCount = count($this->_params); - $uploadCount = count($this->_uploads); - while ($length > 0 && $this->_pos[0] <= $paramCount + $uploadCount) { - $oldLength = $length; - if ($this->_pos[0] < $paramCount) { - $param = sprintf( - $this->_headerParam, $boundary, $this->_params[$this->_pos[0]][0] - ) . $this->_params[$this->_pos[0]][1] . "\r\n"; - $ret .= substr($param, $this->_pos[1], $length); - $length -= min(strlen($param) - $this->_pos[1], $length); - - } elseif ($this->_pos[0] < $paramCount + $uploadCount) { - $pos = $this->_pos[0] - $paramCount; - $header = sprintf( - $this->_headerUpload, $boundary, $this->_uploads[$pos]['name'], - $this->_uploads[$pos]['filename'], $this->_uploads[$pos]['type'] - ); - if ($this->_pos[1] < strlen($header)) { - $ret .= substr($header, $this->_pos[1], $length); - $length -= min(strlen($header) - $this->_pos[1], $length); - } - $filePos = max(0, $this->_pos[1] - strlen($header)); - if ($filePos < $this->_uploads[$pos]['size']) { - while ($length > 0 && !feof($this->_uploads[$pos]['fp'])) { - if (false === ($chunk = fread($this->_uploads[$pos]['fp'], $length))) { - throw new HTTP_Request2_LogicException( - 'Failed reading file upload', HTTP_Request2_Exception::READ_ERROR - ); - } - $ret .= $chunk; - $length -= strlen($chunk); - } - } - if ($length > 0) { - $start = $this->_pos[1] + ($oldLength - $length) - - strlen($header) - $this->_uploads[$pos]['size']; - $ret .= substr("\r\n", $start, $length); - $length -= min(2 - $start, $length); - } - - } else { - $closing = '--' . $boundary . "--\r\n"; - $ret .= substr($closing, $this->_pos[1], $length); - $length -= min(strlen($closing) - $this->_pos[1], $length); - } - if ($length > 0) { - $this->_pos = array($this->_pos[0] + 1, 0); - } else { - $this->_pos[1] += $oldLength; - } - } - return $ret; - } - - /** - * Sets the current position to the start of the body - * - * This allows reusing the same body in another request - */ - public function rewind() - { - $this->_pos = array(0, 0); - foreach ($this->_uploads as $u) { - rewind($u['fp']); - } - } - - /** - * Returns the body as string - * - * Note that it reads all file uploads into memory so it is a good idea not - * to use this method with large file uploads and rely on read() instead. - * - * @return string - */ - public function __toString() - { - $this->rewind(); - return $this->read($this->getLength()); - } - - - /** - * Helper function to change the (probably multidimensional) associative array - * into the simple one. - * - * @param string $name name for item - * @param mixed $values item's values - * @param bool $useBrackets whether to append [] to array variables' names - * - * @return array array with the following items: array('item name', 'item value'); - */ - private static function _flattenArray($name, $values, $useBrackets) - { - if (!is_array($values)) { - return array(array($name, $values)); - } else { - $ret = array(); - foreach ($values as $k => $v) { - if (empty($name)) { - $newName = $k; - } elseif ($useBrackets) { - $newName = $name . '[' . $k . ']'; - } else { - $newName = $name; - } - $ret = array_merge($ret, self::_flattenArray($newName, $v, $useBrackets)); - } - return $ret; - } - } -} -?> + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Exception class for HTTP_Request2 package */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Class for building multipart/form-data request body + * + * The class helps to reduce memory consumption by streaming large file uploads + * from disk, it also allows monitoring of upload progress (see request #7630) + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://tools.ietf.org/html/rfc1867 + */ +class HTTP_Request2_MultipartBody +{ + /** + * MIME boundary + * @var string + */ + private $_boundary; + + /** + * Form parameters added via {@link HTTP_Request2::addPostParameter()} + * @var array + */ + private $_params = array(); + + /** + * File uploads added via {@link HTTP_Request2::addUpload()} + * @var array + */ + private $_uploads = array(); + + /** + * Header for parts with parameters + * @var string + */ + private $_headerParam = "--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n"; + + /** + * Header for parts with uploads + * @var string + */ + private $_headerUpload = "--%s\r\nContent-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\nContent-Type: %s\r\n\r\n"; + + /** + * Current position in parameter and upload arrays + * + * First number is index of "current" part, second number is position within + * "current" part + * + * @var array + */ + private $_pos = array(0, 0); + + + /** + * Constructor. Sets the arrays with POST data. + * + * @param array $params values of form fields set via + * {@link HTTP_Request2::addPostParameter()} + * @param array $uploads file uploads set via + * {@link HTTP_Request2::addUpload()} + * @param bool $useBrackets whether to append brackets to array variable names + */ + public function __construct(array $params, array $uploads, $useBrackets = true) + { + $this->_params = self::_flattenArray('', $params, $useBrackets); + foreach ($uploads as $fieldName => $f) { + if (!is_array($f['fp'])) { + $this->_uploads[] = $f + array('name' => $fieldName); + } else { + for ($i = 0; $i < count($f['fp']); $i++) { + $upload = array( + 'name' => ($useBrackets? $fieldName . '[' . $i . ']': $fieldName) + ); + foreach (array('fp', 'filename', 'size', 'type') as $key) { + $upload[$key] = $f[$key][$i]; + } + $this->_uploads[] = $upload; + } + } + } + } + + /** + * Returns the length of the body to use in Content-Length header + * + * @return integer + */ + public function getLength() + { + $boundaryLength = strlen($this->getBoundary()); + $headerParamLength = strlen($this->_headerParam) - 4 + $boundaryLength; + $headerUploadLength = strlen($this->_headerUpload) - 8 + $boundaryLength; + $length = $boundaryLength + 6; + foreach ($this->_params as $p) { + $length += $headerParamLength + strlen($p[0]) + strlen($p[1]) + 2; + } + foreach ($this->_uploads as $u) { + $length += $headerUploadLength + strlen($u['name']) + strlen($u['type']) + + strlen($u['filename']) + $u['size'] + 2; + } + return $length; + } + + /** + * Returns the boundary to use in Content-Type header + * + * @return string + */ + public function getBoundary() + { + if (empty($this->_boundary)) { + $this->_boundary = '--' . md5('PEAR-HTTP_Request2-' . microtime()); + } + return $this->_boundary; + } + + /** + * Returns next chunk of request body + * + * @param integer $length Number of bytes to read + * + * @return string Up to $length bytes of data, empty string if at end + * @throws HTTP_Request2_LogicException + */ + public function read($length) + { + $ret = ''; + $boundary = $this->getBoundary(); + $paramCount = count($this->_params); + $uploadCount = count($this->_uploads); + while ($length > 0 && $this->_pos[0] <= $paramCount + $uploadCount) { + $oldLength = $length; + if ($this->_pos[0] < $paramCount) { + $param = sprintf( + $this->_headerParam, $boundary, $this->_params[$this->_pos[0]][0] + ) . $this->_params[$this->_pos[0]][1] . "\r\n"; + $ret .= substr($param, $this->_pos[1], $length); + $length -= min(strlen($param) - $this->_pos[1], $length); + + } elseif ($this->_pos[0] < $paramCount + $uploadCount) { + $pos = $this->_pos[0] - $paramCount; + $header = sprintf( + $this->_headerUpload, $boundary, $this->_uploads[$pos]['name'], + $this->_uploads[$pos]['filename'], $this->_uploads[$pos]['type'] + ); + if ($this->_pos[1] < strlen($header)) { + $ret .= substr($header, $this->_pos[1], $length); + $length -= min(strlen($header) - $this->_pos[1], $length); + } + $filePos = max(0, $this->_pos[1] - strlen($header)); + if ($filePos < $this->_uploads[$pos]['size']) { + while ($length > 0 && !feof($this->_uploads[$pos]['fp'])) { + if (false === ($chunk = fread($this->_uploads[$pos]['fp'], $length))) { + throw new HTTP_Request2_LogicException( + 'Failed reading file upload', HTTP_Request2_Exception::READ_ERROR + ); + } + $ret .= $chunk; + $length -= strlen($chunk); + } + } + if ($length > 0) { + $start = $this->_pos[1] + ($oldLength - $length) - + strlen($header) - $this->_uploads[$pos]['size']; + $ret .= substr("\r\n", $start, $length); + $length -= min(2 - $start, $length); + } + + } else { + $closing = '--' . $boundary . "--\r\n"; + $ret .= substr($closing, $this->_pos[1], $length); + $length -= min(strlen($closing) - $this->_pos[1], $length); + } + if ($length > 0) { + $this->_pos = array($this->_pos[0] + 1, 0); + } else { + $this->_pos[1] += $oldLength; + } + } + return $ret; + } + + /** + * Sets the current position to the start of the body + * + * This allows reusing the same body in another request + */ + public function rewind() + { + $this->_pos = array(0, 0); + foreach ($this->_uploads as $u) { + rewind($u['fp']); + } + } + + /** + * Returns the body as string + * + * Note that it reads all file uploads into memory so it is a good idea not + * to use this method with large file uploads and rely on read() instead. + * + * @return string + */ + public function __toString() + { + $this->rewind(); + return $this->read($this->getLength()); + } + + + /** + * Helper function to change the (probably multidimensional) associative array + * into the simple one. + * + * @param string $name name for item + * @param mixed $values item's values + * @param bool $useBrackets whether to append [] to array variables' names + * + * @return array array with the following items: array('item name', 'item value'); + */ + private static function _flattenArray($name, $values, $useBrackets) + { + if (!is_array($values)) { + return array(array($name, $values)); + } else { + $ret = array(); + foreach ($values as $k => $v) { + if (empty($name)) { + $newName = $k; + } elseif ($useBrackets) { + $newName = $name . '[' . $k . ']'; + } else { + $newName = $name; + } + $ret = array_merge($ret, self::_flattenArray($newName, $v, $useBrackets)); + } + return $ret; + } + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Observer/Log.php b/bundled-libs/HTTP/Request2/Observer/Log.php index 96733de5..069baf8e 100644 --- a/bundled-libs/HTTP/Request2/Observer/Log.php +++ b/bundled-libs/HTTP/Request2/Observer/Log.php @@ -1,192 +1,192 @@ - - * @author Alexey Borzov - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Exception class for HTTP_Request2 package - */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * A debug observer useful for debugging / testing. - * - * This observer logs to a log target data corresponding to the various request - * and response events, it logs by default to php://output but can be configured - * to log to a file or via the PEAR Log package. - * - * A simple example: - * - * require_once 'HTTP/Request2.php'; - * require_once 'HTTP/Request2/Observer/Log.php'; - * - * $request = new HTTP_Request2('http://www.example.com'); - * $observer = new HTTP_Request2_Observer_Log(); - * $request->attach($observer); - * $request->send(); - * - * - * A more complex example with PEAR Log: - * - * require_once 'HTTP/Request2.php'; - * require_once 'HTTP/Request2/Observer/Log.php'; - * require_once 'Log.php'; - * - * $request = new HTTP_Request2('http://www.example.com'); - * // we want to log with PEAR log - * $observer = new HTTP_Request2_Observer_Log(Log::factory('console')); - * - * // we only want to log received headers - * $observer->events = array('receivedHeaders'); - * - * $request->attach($observer); - * $request->send(); - * - * - * @category HTTP - * @package HTTP_Request2 - * @author David Jean Louis - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Observer_Log implements SplObserver -{ - // properties {{{ - - /** - * The log target, it can be a a resource or a PEAR Log instance. - * - * @var resource|Log $target - */ - protected $target = null; - - /** - * The events to log. - * - * @var array $events - */ - public $events = array( - 'connect', - 'sentHeaders', - 'sentBody', - 'receivedHeaders', - 'receivedBody', - 'disconnect', - ); - - // }}} - // __construct() {{{ - - /** - * Constructor. - * - * @param mixed $target Can be a file path (default: php://output), a resource, - * or an instance of the PEAR Log class. - * @param array $events Array of events to listen to (default: all events) - * - * @return void - */ - public function __construct($target = 'php://output', array $events = array()) - { - if (!empty($events)) { - $this->events = $events; - } - if (is_resource($target) || $target instanceof Log) { - $this->target = $target; - } elseif (false === ($this->target = @fopen($target, 'ab'))) { - throw new HTTP_Request2_Exception("Unable to open '{$target}'"); - } - } - - // }}} - // update() {{{ - - /** - * Called when the request notifies us of an event. - * - * @param HTTP_Request2 $subject The HTTP_Request2 instance - * - * @return void - */ - public function update(SplSubject $subject) - { - $event = $subject->getLastEvent(); - if (!in_array($event['name'], $this->events)) { - return; - } - - switch ($event['name']) { - case 'connect': - $this->log('* Connected to ' . $event['data']); - break; - case 'sentHeaders': - $headers = explode("\r\n", $event['data']); - array_pop($headers); - foreach ($headers as $header) { - $this->log('> ' . $header); - } - break; - case 'sentBody': - $this->log('> ' . $event['data'] . ' byte(s) sent'); - break; - case 'receivedHeaders': - $this->log(sprintf( - '< HTTP/%s %s %s', $event['data']->getVersion(), - $event['data']->getStatus(), $event['data']->getReasonPhrase() - )); - $headers = $event['data']->getHeader(); - foreach ($headers as $key => $val) { - $this->log('< ' . $key . ': ' . $val); - } - $this->log('< '); - break; - case 'receivedBody': - $this->log($event['data']->getBody()); - break; - case 'disconnect': - $this->log('* Disconnected'); - break; - } - } - - // }}} - // log() {{{ - - /** - * Logs the given message to the configured target. - * - * @param string $message Message to display - * - * @return void - */ - protected function log($message) - { - if ($this->target instanceof Log) { - $this->target->debug($message); - } elseif (is_resource($this->target)) { - fwrite($this->target, $message . "\r\n"); - } - } - - // }}} -} - + + * @author Alexey Borzov + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Exception class for HTTP_Request2 package + */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * A debug observer useful for debugging / testing. + * + * This observer logs to a log target data corresponding to the various request + * and response events, it logs by default to php://output but can be configured + * to log to a file or via the PEAR Log package. + * + * A simple example: + * + * require_once 'HTTP/Request2.php'; + * require_once 'HTTP/Request2/Observer/Log.php'; + * + * $request = new HTTP_Request2('http://www.example.com'); + * $observer = new HTTP_Request2_Observer_Log(); + * $request->attach($observer); + * $request->send(); + * + * + * A more complex example with PEAR Log: + * + * require_once 'HTTP/Request2.php'; + * require_once 'HTTP/Request2/Observer/Log.php'; + * require_once 'Log.php'; + * + * $request = new HTTP_Request2('http://www.example.com'); + * // we want to log with PEAR log + * $observer = new HTTP_Request2_Observer_Log(Log::factory('console')); + * + * // we only want to log received headers + * $observer->events = array('receivedHeaders'); + * + * $request->attach($observer); + * $request->send(); + * + * + * @category HTTP + * @package HTTP_Request2 + * @author David Jean Louis + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Observer_Log implements SplObserver +{ + // properties {{{ + + /** + * The log target, it can be a a resource or a PEAR Log instance. + * + * @var resource|Log $target + */ + protected $target = null; + + /** + * The events to log. + * + * @var array $events + */ + public $events = array( + 'connect', + 'sentHeaders', + 'sentBody', + 'receivedHeaders', + 'receivedBody', + 'disconnect', + ); + + // }}} + // __construct() {{{ + + /** + * Constructor. + * + * @param mixed $target Can be a file path (default: php://output), a resource, + * or an instance of the PEAR Log class. + * @param array $events Array of events to listen to (default: all events) + * + * @return void + */ + public function __construct($target = 'php://output', array $events = array()) + { + if (!empty($events)) { + $this->events = $events; + } + if (is_resource($target) || $target instanceof Log) { + $this->target = $target; + } elseif (false === ($this->target = @fopen($target, 'ab'))) { + throw new HTTP_Request2_Exception("Unable to open '{$target}'"); + } + } + + // }}} + // update() {{{ + + /** + * Called when the request notifies us of an event. + * + * @param HTTP_Request2 $subject The HTTP_Request2 instance + * + * @return void + */ + public function update(SplSubject $subject) + { + $event = $subject->getLastEvent(); + if (!in_array($event['name'], $this->events)) { + return; + } + + switch ($event['name']) { + case 'connect': + $this->log('* Connected to ' . $event['data']); + break; + case 'sentHeaders': + $headers = explode("\r\n", $event['data']); + array_pop($headers); + foreach ($headers as $header) { + $this->log('> ' . $header); + } + break; + case 'sentBody': + $this->log('> ' . $event['data'] . ' byte(s) sent'); + break; + case 'receivedHeaders': + $this->log(sprintf( + '< HTTP/%s %s %s', $event['data']->getVersion(), + $event['data']->getStatus(), $event['data']->getReasonPhrase() + )); + $headers = $event['data']->getHeader(); + foreach ($headers as $key => $val) { + $this->log('< ' . $key . ': ' . $val); + } + $this->log('< '); + break; + case 'receivedBody': + $this->log($event['data']->getBody()); + break; + case 'disconnect': + $this->log('* Disconnected'); + break; + } + } + + // }}} + // log() {{{ + + /** + * Logs the given message to the configured target. + * + * @param string $message Message to display + * + * @return void + */ + protected function log($message) + { + if ($this->target instanceof Log) { + $this->target->debug($message); + } elseif (is_resource($this->target)) { + fwrite($this->target, $message . "\r\n"); + } + } + + // }}} +} + ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/Observer/UncompressingDownload.php b/bundled-libs/HTTP/Request2/Observer/UncompressingDownload.php new file mode 100644 index 00000000..8a3430a0 --- /dev/null +++ b/bundled-libs/HTTP/Request2/Observer/UncompressingDownload.php @@ -0,0 +1,265 @@ + + * @author Alexey Borzov + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +require_once 'HTTP/Request2/Response.php'; + +/** + * An observer that saves response body to stream, possibly uncompressing it + * + * This Observer is written in compliment to pear's HTTP_Request2 in order to + * avoid reading the whole response body in memory. Instead it writes the body + * to a stream. If the body is transferred with content-encoding set to + * "deflate" or "gzip" it is decoded on the fly. + * + * The constructor accepts an already opened (for write) stream (file_descriptor). + * If the response is deflate/gzip encoded a "zlib.inflate" filter is applied + * to the stream. When the body has been read from the request and written to + * the stream ("receivedBody" event) the filter is removed from the stream. + * + * The "zlib.inflate" filter works fine with pure "deflate" encoding. It does + * not understand the "deflate+zlib" and "gzip" headers though, so they have to + * be removed prior to being passed to the stream. This is done in the "update" + * method. + * + * It is also possible to limit the size of written extracted bytes by passing + * "max_bytes" to the constructor. This is important because e.g. 1GB of + * zeroes take about a MB when compressed. + * + * Exceptions are being thrown if data could not be written to the stream or + * the written bytes have already exceeded the requested maximum. If the "gzip" + * header is malformed or could not be parsed an exception will be thrown too. + * + * Example usage follows: + * + * + * require_once 'HTTP/Request2.php'; + * require_once 'HTTP/Request2/Observer/UncompressingDownload.php'; + * + * #$inPath = 'http://carsten.codimi.de/gzip.yaws/daniels.html'; + * #$inPath = 'http://carsten.codimi.de/gzip.yaws/daniels.html?deflate=on'; + * $inPath = 'http://carsten.codimi.de/gzip.yaws/daniels.html?deflate=on&zlib=on'; + * #$outPath = "/dev/null"; + * $outPath = "delme"; + * + * $stream = fopen($outPath, 'wb'); + * if (!$stream) { + * throw new Exception('fopen failed'); + * } + * + * $request = new HTTP_Request2( + * $inPath, + * HTTP_Request2::METHOD_GET, + * array( + * 'store_body' => false, + * 'connect_timeout' => 5, + * 'timeout' => 10, + * 'ssl_verify_peer' => true, + * 'ssl_verify_host' => true, + * 'ssl_cafile' => null, + * 'ssl_capath' => '/etc/ssl/certs', + * 'max_redirects' => 10, + * 'follow_redirects' => true, + * 'strict_redirects' => false + * ) + * ); + * + * $observer = new HTTP_Request2_Observer_UncompressingDownload($stream, 9999999); + * $request->attach($observer); + * + * $response = $request->send(); + * + * fclose($stream); + * echo "OK\n"; + * + * + * @category HTTP + * @package HTTP_Request2 + * @author Delian Krustev + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Observer_UncompressingDownload implements SplObserver +{ + /** + * The stream to write response body to + * @var resource + */ + private $_stream; + + /** + * zlib.inflate filter possibly added to stream + * @var resource + */ + private $_streamFilter; + + /** + * The value of response's Content-Encoding header + * @var string + */ + private $_encoding; + + /** + * Whether the observer is still waiting for gzip/deflate header + * @var bool + */ + private $_processingHeader = true; + + /** + * Starting position in the stream observer writes to + * @var int + */ + private $_startPosition = 0; + + /** + * Maximum bytes to write + * @var int|null + */ + private $_maxDownloadSize; + + /** + * Whether response being received is a redirect + * @var bool + */ + private $_redirect = false; + + /** + * Accumulated body chunks that may contain (gzip) header + * @var string + */ + private $_possibleHeader = ''; + + /** + * Class constructor + * + * Note that there might be problems with max_bytes and files bigger + * than 2 GB on 32bit platforms + * + * @param resource $stream a stream (or file descriptor) opened for writing. + * @param int $maxDownloadSize maximum bytes to write + */ + public function __construct($stream, $maxDownloadSize = null) + { + $this->_stream = $stream; + if ($maxDownloadSize) { + $this->_maxDownloadSize = $maxDownloadSize; + $this->_startPosition = ftell($this->_stream); + } + } + + /** + * Called when the request notifies us of an event. + * + * @param SplSubject $request The HTTP_Request2 instance + * + * @return void + * @throws HTTP_Request2_MessageException + */ + public function update(SplSubject $request) + { + /* @var $request HTTP_Request2 */ + $event = $request->getLastEvent(); + $encoded = false; + + /* @var $event['data'] HTTP_Request2_Response */ + switch ($event['name']) { + case 'receivedHeaders': + $this->_processingHeader = true; + $this->_redirect = $event['data']->isRedirect(); + $this->_encoding = strtolower($event['data']->getHeader('content-encoding')); + $this->_possibleHeader = ''; + break; + + case 'receivedEncodedBodyPart': + if (!$this->_streamFilter + && ($this->_encoding === 'deflate' || $this->_encoding === 'gzip') + ) { + $this->_streamFilter = stream_filter_append( + $this->_stream, 'zlib.inflate', STREAM_FILTER_WRITE + ); + } + $encoded = true; + // fall-through is intentional + + case 'receivedBodyPart': + if ($this->_redirect) { + break; + } + + if (!$encoded || !$this->_processingHeader) { + $bytes = fwrite($this->_stream, $event['data']); + + } else { + $offset = 0; + $this->_possibleHeader .= $event['data']; + if ('deflate' === $this->_encoding) { + if (2 > strlen($this->_possibleHeader)) { + break; + } + $header = unpack('n', substr($this->_possibleHeader, 0, 2)); + if (0 == $header[1] % 31) { + $offset = 2; + } + + } elseif ('gzip' === $this->_encoding) { + if (10 > strlen($this->_possibleHeader)) { + break; + } + try { + $offset = HTTP_Request2_Response::parseGzipHeader($this->_possibleHeader, false); + + } catch (HTTP_Request2_MessageException $e) { + // need more data? + if (false !== strpos($e->getMessage(), 'data too short')) { + break; + } + throw $e; + } + } + + $this->_processingHeader = false; + $bytes = fwrite($this->_stream, substr($this->_possibleHeader, $offset)); + } + + if (false === $bytes) { + throw new HTTP_Request2_MessageException('fwrite failed.'); + } + + if ($this->_maxDownloadSize + && ftell($this->_stream) - $this->_startPosition > $this->_maxDownloadSize + ) { + throw new HTTP_Request2_MessageException(sprintf( + 'Body length limit (%d bytes) reached', + $this->_maxDownloadSize + )); + } + break; + + case 'receivedBody': + if ($this->_streamFilter) { + stream_filter_remove($this->_streamFilter); + $this->_streamFilter = null; + } + break; + } + } +} diff --git a/bundled-libs/HTTP/Request2/Response.php b/bundled-libs/HTTP/Request2/Response.php index 7acbeaa3..b144fdae 100644 --- a/bundled-libs/HTTP/Request2/Response.php +++ b/bundled-libs/HTTP/Request2/Response.php @@ -1,631 +1,680 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Exception class for HTTP_Request2 package - */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Class representing a HTTP response - * - * The class is designed to be used in "streaming" scenario, building the - * response as it is being received: - * - * $statusLine = read_status_line(); - * $response = new HTTP_Request2_Response($statusLine); - * do { - * $headerLine = read_header_line(); - * $response->parseHeaderLine($headerLine); - * } while ($headerLine != ''); - * - * while ($chunk = read_body()) { - * $response->appendBody($chunk); - * } - * - * var_dump($response->getHeader(), $response->getCookies(), $response->getBody()); - * - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://tools.ietf.org/html/rfc2616#section-6 - */ -class HTTP_Request2_Response -{ - /** - * HTTP protocol version (e.g. 1.0, 1.1) - * @var string - */ - protected $version; - - /** - * Status code - * @var integer - * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 - */ - protected $code; - - /** - * Reason phrase - * @var string - * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 - */ - protected $reasonPhrase; - - /** - * Effective URL (may be different from original request URL in case of redirects) - * @var string - */ - protected $effectiveUrl; - - /** - * Associative array of response headers - * @var array - */ - protected $headers = array(); - - /** - * Cookies set in the response - * @var array - */ - protected $cookies = array(); - - /** - * Name of last header processed by parseHederLine() - * - * Used to handle the headers that span multiple lines - * - * @var string - */ - protected $lastHeader = null; - - /** - * Response body - * @var string - */ - protected $body = ''; - - /** - * Whether the body is still encoded by Content-Encoding - * - * cURL provides the decoded body to the callback; if we are reading from - * socket the body is still gzipped / deflated - * - * @var bool - */ - protected $bodyEncoded; - - /** - * Associative array of HTTP status code / reason phrase. - * - * @var array - * @link http://tools.ietf.org/html/rfc2616#section-10 - */ - protected static $phrases = array( - - // 1xx: Informational - Request received, continuing process - 100 => 'Continue', - 101 => 'Switching Protocols', - - // 2xx: Success - The action was successfully received, understood and - // accepted - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - - // 3xx: Redirection - Further action must be taken in order to complete - // the request - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', // 1.1 - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - - // 4xx: Client Error - The request contains bad syntax or cannot be - // fulfilled - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - - // 5xx: Server Error - The server failed to fulfill an apparently - // valid request - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 509 => 'Bandwidth Limit Exceeded', - - ); - - /** - * Returns the default reason phrase for the given code or all reason phrases - * - * @param int $code Response code - * - * @return string|array|null Default reason phrase for $code if $code is given - * (null if no phrase is available), array of all - * reason phrases if $code is null - * @link http://pear.php.net/bugs/18716 - */ - public static function getDefaultReasonPhrase($code = null) - { - if (null === $code) { - return self::$phrases; - } else { - return isset(self::$phrases[$code]) ? self::$phrases[$code] : null; - } - } - - /** - * Constructor, parses the response status line - * - * @param string $statusLine Response status line (e.g. "HTTP/1.1 200 OK") - * @param bool $bodyEncoded Whether body is still encoded by Content-Encoding - * @param string $effectiveUrl Effective URL of the response - * - * @throws HTTP_Request2_MessageException if status line is invalid according to spec - */ - public function __construct($statusLine, $bodyEncoded = true, $effectiveUrl = null) - { - if (!preg_match('!^HTTP/(\d\.\d) (\d{3})(?: (.+))?!', $statusLine, $m)) { - throw new HTTP_Request2_MessageException( - "Malformed response: {$statusLine}", - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } - $this->version = $m[1]; - $this->code = intval($m[2]); - $this->reasonPhrase = !empty($m[3]) ? trim($m[3]) : self::getDefaultReasonPhrase($this->code); - $this->bodyEncoded = (bool)$bodyEncoded; - $this->effectiveUrl = (string)$effectiveUrl; - } - - /** - * Parses the line from HTTP response filling $headers array - * - * The method should be called after reading the line from socket or receiving - * it into cURL callback. Passing an empty string here indicates the end of - * response headers and triggers additional processing, so be sure to pass an - * empty string in the end. - * - * @param string $headerLine Line from HTTP response - */ - public function parseHeaderLine($headerLine) - { - $headerLine = trim($headerLine, "\r\n"); - - if ('' == $headerLine) { - // empty string signals the end of headers, process the received ones - if (!empty($this->headers['set-cookie'])) { - $cookies = is_array($this->headers['set-cookie'])? - $this->headers['set-cookie']: - array($this->headers['set-cookie']); - foreach ($cookies as $cookieString) { - $this->parseCookie($cookieString); - } - unset($this->headers['set-cookie']); - } - foreach (array_keys($this->headers) as $k) { - if (is_array($this->headers[$k])) { - $this->headers[$k] = implode(', ', $this->headers[$k]); - } - } - - } elseif (preg_match('!^([^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+):(.+)$!', $headerLine, $m)) { - // string of the form header-name: header value - $name = strtolower($m[1]); - $value = trim($m[2]); - if (empty($this->headers[$name])) { - $this->headers[$name] = $value; - } else { - if (!is_array($this->headers[$name])) { - $this->headers[$name] = array($this->headers[$name]); - } - $this->headers[$name][] = $value; - } - $this->lastHeader = $name; - - } elseif (preg_match('!^\s+(.+)$!', $headerLine, $m) && $this->lastHeader) { - // continuation of a previous header - if (!is_array($this->headers[$this->lastHeader])) { - $this->headers[$this->lastHeader] .= ' ' . trim($m[1]); - } else { - $key = count($this->headers[$this->lastHeader]) - 1; - $this->headers[$this->lastHeader][$key] .= ' ' . trim($m[1]); - } - } - } - - /** - * Parses a Set-Cookie header to fill $cookies array - * - * @param string $cookieString value of Set-Cookie header - * - * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html - */ - protected function parseCookie($cookieString) - { - $cookie = array( - 'expires' => null, - 'domain' => null, - 'path' => null, - 'secure' => false - ); - - if (!strpos($cookieString, ';')) { - // Only a name=value pair - $pos = strpos($cookieString, '='); - $cookie['name'] = trim(substr($cookieString, 0, $pos)); - $cookie['value'] = trim(substr($cookieString, $pos + 1)); - - } else { - // Some optional parameters are supplied - $elements = explode(';', $cookieString); - $pos = strpos($elements[0], '='); - $cookie['name'] = trim(substr($elements[0], 0, $pos)); - $cookie['value'] = trim(substr($elements[0], $pos + 1)); - - for ($i = 1; $i < count($elements); $i++) { - if (false === strpos($elements[$i], '=')) { - $elName = trim($elements[$i]); - $elValue = null; - } else { - list ($elName, $elValue) = array_map('trim', explode('=', $elements[$i])); - } - $elName = strtolower($elName); - if ('secure' == $elName) { - $cookie['secure'] = true; - } elseif ('expires' == $elName) { - $cookie['expires'] = str_replace('"', '', $elValue); - } elseif ('path' == $elName || 'domain' == $elName) { - $cookie[$elName] = urldecode($elValue); - } else { - $cookie[$elName] = $elValue; - } - } - } - $this->cookies[] = $cookie; - } - - /** - * Appends a string to the response body - * - * @param string $bodyChunk part of response body - */ - public function appendBody($bodyChunk) - { - $this->body .= $bodyChunk; - } - - /** - * Returns the effective URL of the response - * - * This may be different from the request URL if redirects were followed. - * - * @return string - * @link http://pear.php.net/bugs/bug.php?id=18412 - */ - public function getEffectiveUrl() - { - return $this->effectiveUrl; - } - - /** - * Returns the status code - * - * @return integer - */ - public function getStatus() - { - return $this->code; - } - - /** - * Returns the reason phrase - * - * @return string - */ - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - /** - * Whether response is a redirect that can be automatically handled by HTTP_Request2 - * - * @return bool - */ - public function isRedirect() - { - return in_array($this->code, array(300, 301, 302, 303, 307)) - && isset($this->headers['location']); - } - - /** - * Returns either the named header or all response headers - * - * @param string $headerName Name of header to return - * - * @return string|array Value of $headerName header (null if header is - * not present), array of all response headers if - * $headerName is null - */ - public function getHeader($headerName = null) - { - if (null === $headerName) { - return $this->headers; - } else { - $headerName = strtolower($headerName); - return isset($this->headers[$headerName])? $this->headers[$headerName]: null; - } - } - - /** - * Returns cookies set in response - * - * @return array - */ - public function getCookies() - { - return $this->cookies; - } - - /** - * Returns the body of the response - * - * @return string - * @throws HTTP_Request2_Exception if body cannot be decoded - */ - public function getBody() - { - if (0 == strlen($this->body) || !$this->bodyEncoded - || !in_array(strtolower($this->getHeader('content-encoding')), array('gzip', 'deflate')) - ) { - return $this->body; - - } else { - if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { - $oldEncoding = mb_internal_encoding(); - mb_internal_encoding('8bit'); - } - - try { - switch (strtolower($this->getHeader('content-encoding'))) { - case 'gzip': - $decoded = self::decodeGzip($this->body); - break; - case 'deflate': - $decoded = self::decodeDeflate($this->body); - } - } catch (Exception $e) { - } - - if (!empty($oldEncoding)) { - mb_internal_encoding($oldEncoding); - } - if (!empty($e)) { - throw $e; - } - return $decoded; - } - } - - /** - * Get the HTTP version of the response - * - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Decodes the message-body encoded by gzip - * - * The real decoding work is done by gzinflate() built-in function, this - * method only parses the header and checks data for compliance with - * RFC 1952 - * - * @param string $data gzip-encoded data - * - * @return string decoded data - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_MessageException - * @link http://tools.ietf.org/html/rfc1952 - */ - public static function decodeGzip($data) - { - $length = strlen($data); - // If it doesn't look like gzip-encoded data, don't bother - if (18 > $length || strcmp(substr($data, 0, 2), "\x1f\x8b")) { - return $data; - } - if (!function_exists('gzinflate')) { - throw new HTTP_Request2_LogicException( - 'Unable to decode body: gzip extension not available', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - $method = ord(substr($data, 2, 1)); - if (8 != $method) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: unknown compression method', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $flags = ord(substr($data, 3, 1)); - if ($flags & 224) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: reserved bits are set', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - - // header is 10 bytes minimum. may be longer, though. - $headerLength = 10; - // extra fields, need to skip 'em - if ($flags & 4) { - if ($length - $headerLength - 2 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $extraLength = unpack('v', substr($data, 10, 2)); - if ($length - $headerLength - 2 - $extraLength[1] < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += $extraLength[1] + 2; - } - // file name, need to skip that - if ($flags & 8) { - if ($length - $headerLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $filenameLength = strpos(substr($data, $headerLength), chr(0)); - if (false === $filenameLength || $length - $headerLength - $filenameLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += $filenameLength + 1; - } - // comment, need to skip that also - if ($flags & 16) { - if ($length - $headerLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $commentLength = strpos(substr($data, $headerLength), chr(0)); - if (false === $commentLength || $length - $headerLength - $commentLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += $commentLength + 1; - } - // have a CRC for header. let's check - if ($flags & 2) { - if ($length - $headerLength - 2 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $crcReal = 0xffff & crc32(substr($data, 0, $headerLength)); - $crcStored = unpack('v', substr($data, $headerLength, 2)); - if ($crcReal != $crcStored[1]) { - throw new HTTP_Request2_MessageException( - 'Header CRC check failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += 2; - } - // unpacked data CRC and size at the end of encoded data - $tmp = unpack('V2', substr($data, -8)); - $dataCrc = $tmp[1]; - $dataSize = $tmp[2]; - - // finally, call the gzinflate() function - // don't pass $dataSize to gzinflate, see bugs #13135, #14370 - $unpacked = gzinflate(substr($data, $headerLength, -8)); - if (false === $unpacked) { - throw new HTTP_Request2_MessageException( - 'gzinflate() call failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } elseif ($dataSize != strlen($unpacked)) { - throw new HTTP_Request2_MessageException( - 'Data size check failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } elseif ((0xffffffff & $dataCrc) != (0xffffffff & crc32($unpacked))) { - throw new HTTP_Request2_Exception( - 'Data CRC check failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - return $unpacked; - } - - /** - * Decodes the message-body encoded by deflate - * - * @param string $data deflate-encoded data - * - * @return string decoded data - * @throws HTTP_Request2_LogicException - */ - public static function decodeDeflate($data) - { - if (!function_exists('gzuncompress')) { - throw new HTTP_Request2_LogicException( - 'Unable to decode body: gzip extension not available', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - // RFC 2616 defines 'deflate' encoding as zlib format from RFC 1950, - // while many applications send raw deflate stream from RFC 1951. - // We should check for presence of zlib header and use gzuncompress() or - // gzinflate() as needed. See bug #15305 - $header = unpack('n', substr($data, 0, 2)); - return (0 == $header[1] % 31)? gzuncompress($data): gzinflate($data); - } -} + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Exception class for HTTP_Request2 package + */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Class representing a HTTP response + * + * The class is designed to be used in "streaming" scenario, building the + * response as it is being received: + * + * $statusLine = read_status_line(); + * $response = new HTTP_Request2_Response($statusLine); + * do { + * $headerLine = read_header_line(); + * $response->parseHeaderLine($headerLine); + * } while ($headerLine != ''); + * + * while ($chunk = read_body()) { + * $response->appendBody($chunk); + * } + * + * var_dump($response->getHeader(), $response->getCookies(), $response->getBody()); + * + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://tools.ietf.org/html/rfc2616#section-6 + */ +class HTTP_Request2_Response +{ + /** + * HTTP protocol version (e.g. 1.0, 1.1) + * @var string + */ + protected $version; + + /** + * Status code + * @var integer + * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 + */ + protected $code; + + /** + * Reason phrase + * @var string + * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 + */ + protected $reasonPhrase; + + /** + * Effective URL (may be different from original request URL in case of redirects) + * @var string + */ + protected $effectiveUrl; + + /** + * Associative array of response headers + * @var array + */ + protected $headers = array(); + + /** + * Cookies set in the response + * @var array + */ + protected $cookies = array(); + + /** + * Name of last header processed by parseHederLine() + * + * Used to handle the headers that span multiple lines + * + * @var string + */ + protected $lastHeader = null; + + /** + * Response body + * @var string + */ + protected $body = ''; + + /** + * Whether the body is still encoded by Content-Encoding + * + * cURL provides the decoded body to the callback; if we are reading from + * socket the body is still gzipped / deflated + * + * @var bool + */ + protected $bodyEncoded; + + /** + * Associative array of HTTP status code / reason phrase. + * + * @var array + * @link http://tools.ietf.org/html/rfc2616#section-10 + */ + protected static $phrases = array( + + // 1xx: Informational - Request received, continuing process + 100 => 'Continue', + 101 => 'Switching Protocols', + + // 2xx: Success - The action was successfully received, understood and + // accepted + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + + // 3xx: Redirection - Further action must be taken in order to complete + // the request + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', // 1.1 + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 307 => 'Temporary Redirect', + + // 4xx: Client Error - The request contains bad syntax or cannot be + // fulfilled + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + + // 5xx: Server Error - The server failed to fulfill an apparently + // valid request + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', + 509 => 'Bandwidth Limit Exceeded', + + ); + + /** + * Returns the default reason phrase for the given code or all reason phrases + * + * @param int $code Response code + * + * @return string|array|null Default reason phrase for $code if $code is given + * (null if no phrase is available), array of all + * reason phrases if $code is null + * @link http://pear.php.net/bugs/18716 + */ + public static function getDefaultReasonPhrase($code = null) + { + if (null === $code) { + return self::$phrases; + } else { + return isset(self::$phrases[$code]) ? self::$phrases[$code] : null; + } + } + + /** + * Constructor, parses the response status line + * + * @param string $statusLine Response status line (e.g. "HTTP/1.1 200 OK") + * @param bool $bodyEncoded Whether body is still encoded by Content-Encoding + * @param string $effectiveUrl Effective URL of the response + * + * @throws HTTP_Request2_MessageException if status line is invalid according to spec + */ + public function __construct($statusLine, $bodyEncoded = true, $effectiveUrl = null) + { + if (!preg_match('!^HTTP/(\d\.\d) (\d{3})(?: (.+))?!', $statusLine, $m)) { + throw new HTTP_Request2_MessageException( + "Malformed response: {$statusLine}", + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } + $this->version = $m[1]; + $this->code = intval($m[2]); + $this->reasonPhrase = !empty($m[3]) ? trim($m[3]) : self::getDefaultReasonPhrase($this->code); + $this->bodyEncoded = (bool)$bodyEncoded; + $this->effectiveUrl = (string)$effectiveUrl; + } + + /** + * Parses the line from HTTP response filling $headers array + * + * The method should be called after reading the line from socket or receiving + * it into cURL callback. Passing an empty string here indicates the end of + * response headers and triggers additional processing, so be sure to pass an + * empty string in the end. + * + * @param string $headerLine Line from HTTP response + */ + public function parseHeaderLine($headerLine) + { + $headerLine = trim($headerLine, "\r\n"); + + if ('' == $headerLine) { + // empty string signals the end of headers, process the received ones + if (!empty($this->headers['set-cookie'])) { + $cookies = is_array($this->headers['set-cookie'])? + $this->headers['set-cookie']: + array($this->headers['set-cookie']); + foreach ($cookies as $cookieString) { + $this->parseCookie($cookieString); + } + unset($this->headers['set-cookie']); + } + foreach (array_keys($this->headers) as $k) { + if (is_array($this->headers[$k])) { + $this->headers[$k] = implode(', ', $this->headers[$k]); + } + } + + } elseif (preg_match('!^([^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+):(.+)$!', $headerLine, $m)) { + // string of the form header-name: header value + $name = strtolower($m[1]); + $value = trim($m[2]); + if (empty($this->headers[$name])) { + $this->headers[$name] = $value; + } else { + if (!is_array($this->headers[$name])) { + $this->headers[$name] = array($this->headers[$name]); + } + $this->headers[$name][] = $value; + } + $this->lastHeader = $name; + + } elseif (preg_match('!^\s+(.+)$!', $headerLine, $m) && $this->lastHeader) { + // continuation of a previous header + if (!is_array($this->headers[$this->lastHeader])) { + $this->headers[$this->lastHeader] .= ' ' . trim($m[1]); + } else { + $key = count($this->headers[$this->lastHeader]) - 1; + $this->headers[$this->lastHeader][$key] .= ' ' . trim($m[1]); + } + } + } + + /** + * Parses a Set-Cookie header to fill $cookies array + * + * @param string $cookieString value of Set-Cookie header + * + * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html + */ + protected function parseCookie($cookieString) + { + $cookie = array( + 'expires' => null, + 'domain' => null, + 'path' => null, + 'secure' => false + ); + + if (!strpos($cookieString, ';')) { + // Only a name=value pair + $pos = strpos($cookieString, '='); + $cookie['name'] = trim(substr($cookieString, 0, $pos)); + $cookie['value'] = trim(substr($cookieString, $pos + 1)); + + } else { + // Some optional parameters are supplied + $elements = explode(';', $cookieString); + $pos = strpos($elements[0], '='); + $cookie['name'] = trim(substr($elements[0], 0, $pos)); + $cookie['value'] = trim(substr($elements[0], $pos + 1)); + + for ($i = 1; $i < count($elements); $i++) { + if (false === strpos($elements[$i], '=')) { + $elName = trim($elements[$i]); + $elValue = null; + } else { + list ($elName, $elValue) = array_map('trim', explode('=', $elements[$i])); + } + $elName = strtolower($elName); + if ('secure' == $elName) { + $cookie['secure'] = true; + } elseif ('expires' == $elName) { + $cookie['expires'] = str_replace('"', '', $elValue); + } elseif ('path' == $elName || 'domain' == $elName) { + $cookie[$elName] = urldecode($elValue); + } else { + $cookie[$elName] = $elValue; + } + } + } + $this->cookies[] = $cookie; + } + + /** + * Appends a string to the response body + * + * @param string $bodyChunk part of response body + */ + public function appendBody($bodyChunk) + { + $this->body .= $bodyChunk; + } + + /** + * Returns the effective URL of the response + * + * This may be different from the request URL if redirects were followed. + * + * @return string + * @link http://pear.php.net/bugs/bug.php?id=18412 + */ + public function getEffectiveUrl() + { + return $this->effectiveUrl; + } + + /** + * Returns the status code + * + * @return integer + */ + public function getStatus() + { + return $this->code; + } + + /** + * Returns the reason phrase + * + * @return string + */ + public function getReasonPhrase() + { + return $this->reasonPhrase; + } + + /** + * Whether response is a redirect that can be automatically handled by HTTP_Request2 + * + * @return bool + */ + public function isRedirect() + { + return in_array($this->code, array(300, 301, 302, 303, 307)) + && isset($this->headers['location']); + } + + /** + * Returns either the named header or all response headers + * + * @param string $headerName Name of header to return + * + * @return string|array Value of $headerName header (null if header is + * not present), array of all response headers if + * $headerName is null + */ + public function getHeader($headerName = null) + { + if (null === $headerName) { + return $this->headers; + } else { + $headerName = strtolower($headerName); + return isset($this->headers[$headerName])? $this->headers[$headerName]: null; + } + } + + /** + * Returns cookies set in response + * + * @return array + */ + public function getCookies() + { + return $this->cookies; + } + + /** + * Returns the body of the response + * + * @return string + * @throws HTTP_Request2_Exception if body cannot be decoded + */ + public function getBody() + { + if (0 == strlen($this->body) || !$this->bodyEncoded + || !in_array(strtolower($this->getHeader('content-encoding')), array('gzip', 'deflate')) + ) { + return $this->body; + + } else { + if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { + $oldEncoding = mb_internal_encoding(); + mb_internal_encoding('8bit'); + } + + try { + switch (strtolower($this->getHeader('content-encoding'))) { + case 'gzip': + $decoded = self::decodeGzip($this->body); + break; + case 'deflate': + $decoded = self::decodeDeflate($this->body); + } + } catch (Exception $e) { + } + + if (!empty($oldEncoding)) { + mb_internal_encoding($oldEncoding); + } + if (!empty($e)) { + throw $e; + } + return $decoded; + } + } + + /** + * Get the HTTP version of the response + * + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Checks whether data starts with GZIP format identification bytes from RFC 1952 + * + * @param string $data gzip-encoded (presumably) data + * + * @return bool + */ + public static function hasGzipIdentification($data) + { + return 0 === strcmp(substr($data, 0, 2), "\x1f\x8b"); + } + + /** + * Tries to parse GZIP format header in the given string + * + * If the header conforms to RFC 1952, its length is returned. If any + * sanity check fails, HTTP_Request2_MessageException is thrown. + * + * Note: This function might be usable outside of HTTP_Request2 so it might + * be good idea to be moved to some common package. (Delian Krustev) + * + * @param string $data Either the complete response body or + * the leading part of it + * @param boolean $dataComplete Whether $data contains complete response body + * + * @return int gzip header length in bytes + * @throws HTTP_Request2_MessageException + * @link http://tools.ietf.org/html/rfc1952 + */ + public static function parseGzipHeader($data, $dataComplete = false) + { + // if data is complete, trailing 8 bytes should be present for size and crc32 + $length = strlen($data) - ($dataComplete ? 8 : 0); + + if ($length < 10 || !self::hasGzipIdentification($data)) { + throw new HTTP_Request2_MessageException( + 'The data does not seem to contain a valid gzip header', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + + $method = ord(substr($data, 2, 1)); + if (8 != $method) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: unknown compression method', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $flags = ord(substr($data, 3, 1)); + if ($flags & 224) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: reserved bits are set', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + + // header is 10 bytes minimum. may be longer, though. + $headerLength = 10; + // extra fields, need to skip 'em + if ($flags & 4) { + if ($length - $headerLength - 2 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $extraLength = unpack('v', substr($data, 10, 2)); + if ($length - $headerLength - 2 - $extraLength[1] < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += $extraLength[1] + 2; + } + // file name, need to skip that + if ($flags & 8) { + if ($length - $headerLength - 1 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $filenameLength = strpos(substr($data, $headerLength), chr(0)); + if (false === $filenameLength + || $length - $headerLength - $filenameLength - 1 < 0 + ) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += $filenameLength + 1; + } + // comment, need to skip that also + if ($flags & 16) { + if ($length - $headerLength - 1 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $commentLength = strpos(substr($data, $headerLength), chr(0)); + if (false === $commentLength + || $length - $headerLength - $commentLength - 1 < 0 + ) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += $commentLength + 1; + } + // have a CRC for header. let's check + if ($flags & 2) { + if ($length - $headerLength - 2 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $crcReal = 0xffff & crc32(substr($data, 0, $headerLength)); + $crcStored = unpack('v', substr($data, $headerLength, 2)); + if ($crcReal != $crcStored[1]) { + throw new HTTP_Request2_MessageException( + 'Header CRC check failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += 2; + } + return $headerLength; + } + + /** + * Decodes the message-body encoded by gzip + * + * The real decoding work is done by gzinflate() built-in function, this + * method only parses the header and checks data for compliance with + * RFC 1952 + * + * @param string $data gzip-encoded data + * + * @return string decoded data + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_MessageException + * @link http://tools.ietf.org/html/rfc1952 + */ + public static function decodeGzip($data) + { + // If it doesn't look like gzip-encoded data, don't bother + if (!self::hasGzipIdentification($data)) { + return $data; + } + if (!function_exists('gzinflate')) { + throw new HTTP_Request2_LogicException( + 'Unable to decode body: gzip extension not available', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + + // unpacked data CRC and size at the end of encoded data + $tmp = unpack('V2', substr($data, -8)); + $dataCrc = $tmp[1]; + $dataSize = $tmp[2]; + + $headerLength = self::parseGzipHeader($data, true); + + // don't pass $dataSize to gzinflate, see bugs #13135, #14370 + $unpacked = gzinflate(substr($data, $headerLength, -8)); + if (false === $unpacked) { + throw new HTTP_Request2_MessageException( + 'gzinflate() call failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } elseif ($dataSize != strlen($unpacked)) { + throw new HTTP_Request2_MessageException( + 'Data size check failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } elseif ((0xffffffff & $dataCrc) != (0xffffffff & crc32($unpacked))) { + throw new HTTP_Request2_MessageException( + 'Data CRC check failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + return $unpacked; + } + + /** + * Decodes the message-body encoded by deflate + * + * @param string $data deflate-encoded data + * + * @return string decoded data + * @throws HTTP_Request2_LogicException + */ + public static function decodeDeflate($data) + { + if (!function_exists('gzuncompress')) { + throw new HTTP_Request2_LogicException( + 'Unable to decode body: gzip extension not available', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + // RFC 2616 defines 'deflate' encoding as zlib format from RFC 1950, + // while many applications send raw deflate stream from RFC 1951. + // We should check for presence of zlib header and use gzuncompress() or + // gzinflate() as needed. See bug #15305 + $header = unpack('n', substr($data, 0, 2)); + return (0 == $header[1] % 31)? gzuncompress($data): gzinflate($data); + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/SOCKS5.php b/bundled-libs/HTTP/Request2/SOCKS5.php index 0b86445c..2a782ced 100644 --- a/bundled-libs/HTTP/Request2/SOCKS5.php +++ b/bundled-libs/HTTP/Request2/SOCKS5.php @@ -1,135 +1,135 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Socket wrapper class used by Socket Adapter */ -require_once 'HTTP/Request2/SocketWrapper.php'; - -/** - * SOCKS5 proxy connection class (used by Socket Adapter) - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://pear.php.net/bugs/bug.php?id=19332 - * @link http://tools.ietf.org/html/rfc1928 - */ -class HTTP_Request2_SOCKS5 extends HTTP_Request2_SocketWrapper -{ - /** - * Constructor, tries to connect and authenticate to a SOCKS5 proxy - * - * @param string $address Proxy address, e.g. 'tcp://localhost:1080' - * @param int $timeout Connection timeout (seconds) - * @param array $contextOptions Stream context options - * @param string $username Proxy user name - * @param string $password Proxy password - * - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_ConnectionException - * @throws HTTP_Request2_MessageException - */ - public function __construct( - $address, $timeout = 10, array $contextOptions = array(), - $username = null, $password = null - ) { - parent::__construct($address, $timeout, $contextOptions); - - if (strlen($username)) { - $request = pack('C4', 5, 2, 0, 2); - } else { - $request = pack('C3', 5, 1, 0); - } - $this->write($request); - $response = unpack('Cversion/Cmethod', $this->read(3)); - if (5 != $response['version']) { - throw new HTTP_Request2_MessageException( - 'Invalid version received from SOCKS5 proxy: ' . $response['version'], - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } - switch ($response['method']) { - case 2: - $this->performAuthentication($username, $password); - case 0: - break; - default: - throw new HTTP_Request2_ConnectionException( - "Connection rejected by proxy due to unsupported auth method" - ); - } - } - - /** - * Performs username/password authentication for SOCKS5 - * - * @param string $username Proxy user name - * @param string $password Proxy password - * - * @throws HTTP_Request2_ConnectionException - * @throws HTTP_Request2_MessageException - * @link http://tools.ietf.org/html/rfc1929 - */ - protected function performAuthentication($username, $password) - { - $request = pack('C2', 1, strlen($username)) . $username - . pack('C', strlen($password)) . $password; - - $this->write($request); - $response = unpack('Cvn/Cstatus', $this->read(3)); - if (1 != $response['vn'] || 0 != $response['status']) { - throw new HTTP_Request2_ConnectionException( - 'Connection rejected by proxy due to invalid username and/or password' - ); - } - } - - /** - * Connects to a remote host via proxy - * - * @param string $remoteHost Remote host - * @param int $remotePort Remote port - * - * @throws HTTP_Request2_ConnectionException - * @throws HTTP_Request2_MessageException - */ - public function connect($remoteHost, $remotePort) - { - $request = pack('C5', 0x05, 0x01, 0x00, 0x03, strlen($remoteHost)) - . $remoteHost . pack('n', $remotePort); - - $this->write($request); - $response = unpack('Cversion/Creply/Creserved', $this->read(1024)); - if (5 != $response['version'] || 0 != $response['reserved']) { - throw new HTTP_Request2_MessageException( - 'Invalid response received from SOCKS5 proxy', - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } elseif (0 != $response['reply']) { - throw new HTTP_Request2_ConnectionException( - "Unable to connect to {$remoteHost}:{$remotePort} through SOCKS5 proxy", - 0, $response['reply'] - ); - } - } -} + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Socket wrapper class used by Socket Adapter */ +require_once 'HTTP/Request2/SocketWrapper.php'; + +/** + * SOCKS5 proxy connection class (used by Socket Adapter) + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://pear.php.net/bugs/bug.php?id=19332 + * @link http://tools.ietf.org/html/rfc1928 + */ +class HTTP_Request2_SOCKS5 extends HTTP_Request2_SocketWrapper +{ + /** + * Constructor, tries to connect and authenticate to a SOCKS5 proxy + * + * @param string $address Proxy address, e.g. 'tcp://localhost:1080' + * @param int $timeout Connection timeout (seconds) + * @param array $contextOptions Stream context options + * @param string $username Proxy user name + * @param string $password Proxy password + * + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_ConnectionException + * @throws HTTP_Request2_MessageException + */ + public function __construct( + $address, $timeout = 10, array $contextOptions = array(), + $username = null, $password = null + ) { + parent::__construct($address, $timeout, $contextOptions); + + if (strlen($username)) { + $request = pack('C4', 5, 2, 0, 2); + } else { + $request = pack('C3', 5, 1, 0); + } + $this->write($request); + $response = unpack('Cversion/Cmethod', $this->read(3)); + if (5 != $response['version']) { + throw new HTTP_Request2_MessageException( + 'Invalid version received from SOCKS5 proxy: ' . $response['version'], + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } + switch ($response['method']) { + case 2: + $this->performAuthentication($username, $password); + case 0: + break; + default: + throw new HTTP_Request2_ConnectionException( + "Connection rejected by proxy due to unsupported auth method" + ); + } + } + + /** + * Performs username/password authentication for SOCKS5 + * + * @param string $username Proxy user name + * @param string $password Proxy password + * + * @throws HTTP_Request2_ConnectionException + * @throws HTTP_Request2_MessageException + * @link http://tools.ietf.org/html/rfc1929 + */ + protected function performAuthentication($username, $password) + { + $request = pack('C2', 1, strlen($username)) . $username + . pack('C', strlen($password)) . $password; + + $this->write($request); + $response = unpack('Cvn/Cstatus', $this->read(3)); + if (1 != $response['vn'] || 0 != $response['status']) { + throw new HTTP_Request2_ConnectionException( + 'Connection rejected by proxy due to invalid username and/or password' + ); + } + } + + /** + * Connects to a remote host via proxy + * + * @param string $remoteHost Remote host + * @param int $remotePort Remote port + * + * @throws HTTP_Request2_ConnectionException + * @throws HTTP_Request2_MessageException + */ + public function connect($remoteHost, $remotePort) + { + $request = pack('C5', 0x05, 0x01, 0x00, 0x03, strlen($remoteHost)) + . $remoteHost . pack('n', $remotePort); + + $this->write($request); + $response = unpack('Cversion/Creply/Creserved', $this->read(1024)); + if (5 != $response['version'] || 0 != $response['reserved']) { + throw new HTTP_Request2_MessageException( + 'Invalid response received from SOCKS5 proxy', + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } elseif (0 != $response['reply']) { + throw new HTTP_Request2_ConnectionException( + "Unable to connect to {$remoteHost}:{$remotePort} through SOCKS5 proxy", + 0, $response['reply'] + ); + } + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/SocketWrapper.php b/bundled-libs/HTTP/Request2/SocketWrapper.php index 388c1b65..2cf4257d 100644 --- a/bundled-libs/HTTP/Request2/SocketWrapper.php +++ b/bundled-libs/HTTP/Request2/SocketWrapper.php @@ -1,297 +1,320 @@ - - * @copyright 2008-2014 Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Exception classes for HTTP_Request2 package */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Socket wrapper class used by Socket Adapter - * - * Needed to properly handle connection errors, global timeout support and - * similar things. Loosely based on Net_Socket used by older HTTP_Request. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://pear.php.net/bugs/bug.php?id=19332 - * @link http://tools.ietf.org/html/rfc1928 - */ -class HTTP_Request2_SocketWrapper -{ - /** - * PHP warning messages raised during stream_socket_client() call - * @var array - */ - protected $connectionWarnings = array(); - - /** - * Connected socket - * @var resource - */ - protected $socket; - - /** - * Sum of start time and global timeout, exception will be thrown if request continues past this time - * @var integer - */ - protected $deadline; - - /** - * Global timeout value, mostly for exception messages - * @var integer - */ - protected $timeout; - - /** - * Class constructor, tries to establish connection - * - * @param string $address Address for stream_socket_client() call, - * e.g. 'tcp://localhost:80' - * @param int $timeout Connection timeout (seconds) - * @param array $contextOptions Context options - * - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_ConnectionException - */ - public function __construct($address, $timeout, array $contextOptions = array()) - { - if (!empty($contextOptions) - && !isset($contextOptions['socket']) && !isset($contextOptions['ssl']) - ) { - // Backwards compatibility with 2.1.0 and 2.1.1 releases - $contextOptions = array('ssl' => $contextOptions); - } - $context = stream_context_create(); - foreach ($contextOptions as $wrapper => $options) { - foreach ($options as $name => $value) { - if (!stream_context_set_option($context, $wrapper, $name, $value)) { - throw new HTTP_Request2_LogicException( - "Error setting '{$wrapper}' wrapper context option '{$name}'" - ); - } - } - } - set_error_handler(array($this, 'connectionWarningsHandler')); - $this->socket = stream_socket_client( - $address, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context - ); - restore_error_handler(); - // if we fail to bind to a specified local address (see request #19515), - // connection still succeeds, albeit with a warning. Throw an Exception - // with the warning text in this case as that connection is unlikely - // to be what user wants and as Curl throws an error in similar case. - if ($this->connectionWarnings) { - if ($this->socket) { - fclose($this->socket); - } - $error = $errstr ? $errstr : implode("\n", $this->connectionWarnings); - throw new HTTP_Request2_ConnectionException( - "Unable to connect to {$address}. Error: {$error}", 0, $errno - ); - } - } - - /** - * Destructor, disconnects socket - */ - public function __destruct() - { - fclose($this->socket); - } - - /** - * Wrapper around fread(), handles global request timeout - * - * @param int $length Reads up to this number of bytes - * - * @return string Data read from socket - * @throws HTTP_Request2_MessageException In case of timeout - */ - public function read($length) - { - if ($this->deadline) { - stream_set_timeout($this->socket, max($this->deadline - time(), 1)); - } - $data = fread($this->socket, $length); - $this->checkTimeout(); - return $data; - } - - /** - * Reads until either the end of the socket or a newline, whichever comes first - * - * Strips the trailing newline from the returned data, handles global - * request timeout. Method idea borrowed from Net_Socket PEAR package. - * - * @param int $bufferSize buffer size to use for reading - * @param int $localTimeout timeout value to use just for this call - * (used when waiting for "100 Continue" response) - * - * @return string Available data up to the newline (not including newline) - * @throws HTTP_Request2_MessageException In case of timeout - */ - public function readLine($bufferSize, $localTimeout = null) - { - $line = ''; - while (!feof($this->socket)) { - if (null !== $localTimeout) { - stream_set_timeout($this->socket, $localTimeout); - } elseif ($this->deadline) { - stream_set_timeout($this->socket, max($this->deadline - time(), 1)); - } - - $line .= @fgets($this->socket, $bufferSize); - - if (null === $localTimeout) { - $this->checkTimeout(); - - } else { - $info = stream_get_meta_data($this->socket); - // reset socket timeout if we don't have request timeout specified, - // prevents further calls failing with a bogus Exception - if (!$this->deadline) { - $default = (int)@ini_get('default_socket_timeout'); - stream_set_timeout($this->socket, $default > 0 ? $default : PHP_INT_MAX); - } - if ($info['timed_out']) { - throw new HTTP_Request2_MessageException( - "readLine() call timed out", HTTP_Request2_Exception::TIMEOUT - ); - } - } - if (substr($line, -1) == "\n") { - return rtrim($line, "\r\n"); - } - } - return $line; - } - - /** - * Wrapper around fwrite(), handles global request timeout - * - * @param string $data String to be written - * - * @return int - * @throws HTTP_Request2_MessageException - */ - public function write($data) - { - if ($this->deadline) { - stream_set_timeout($this->socket, max($this->deadline - time(), 1)); - } - $written = fwrite($this->socket, $data); - $this->checkTimeout(); - // http://www.php.net/manual/en/function.fwrite.php#96951 - if ($written < strlen($data)) { - throw new HTTP_Request2_MessageException('Error writing request'); - } - return $written; - } - - /** - * Tests for end-of-file on a socket - * - * @return bool - */ - public function eof() - { - return feof($this->socket); - } - - /** - * Sets request deadline - * - * @param int $deadline Exception will be thrown if request continues - * past this time - * @param int $timeout Original request timeout value, to use in - * Exception message - */ - public function setDeadline($deadline, $timeout) - { - $this->deadline = $deadline; - $this->timeout = $timeout; - } - - /** - * Turns on encryption on a socket - * - * @throws HTTP_Request2_ConnectionException - */ - public function enableCrypto() - { - $modes = array( - STREAM_CRYPTO_METHOD_TLS_CLIENT, - STREAM_CRYPTO_METHOD_SSLv3_CLIENT, - STREAM_CRYPTO_METHOD_SSLv23_CLIENT, - STREAM_CRYPTO_METHOD_SSLv2_CLIENT - ); - - foreach ($modes as $mode) { - if (stream_socket_enable_crypto($this->socket, true, $mode)) { - return; - } - } - throw new HTTP_Request2_ConnectionException( - 'Failed to enable secure connection when connecting through proxy' - ); - } - - /** - * Throws an Exception if stream timed out - * - * @throws HTTP_Request2_MessageException - */ - protected function checkTimeout() - { - $info = stream_get_meta_data($this->socket); - if ($info['timed_out'] || $this->deadline && time() > $this->deadline) { - $reason = $this->deadline - ? "after {$this->timeout} second(s)" - : 'due to default_socket_timeout php.ini setting'; - throw new HTTP_Request2_MessageException( - "Request timed out {$reason}", HTTP_Request2_Exception::TIMEOUT - ); - } - } - - /** - * Error handler to use during stream_socket_client() call - * - * One stream_socket_client() call may produce *multiple* PHP warnings - * (especially OpenSSL-related), we keep them in an array to later use for - * the message of HTTP_Request2_ConnectionException - * - * @param int $errno error level - * @param string $errstr error message - * - * @return bool - */ - protected function connectionWarningsHandler($errno, $errstr) - { - if ($errno & E_WARNING) { - array_unshift($this->connectionWarnings, $errstr); - } - return true; - } -} -?> + + * @copyright 2008-2016 Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Exception classes for HTTP_Request2 package */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Socket wrapper class used by Socket Adapter + * + * Needed to properly handle connection errors, global timeout support and + * similar things. Loosely based on Net_Socket used by older HTTP_Request. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://pear.php.net/bugs/bug.php?id=19332 + * @link http://tools.ietf.org/html/rfc1928 + */ +class HTTP_Request2_SocketWrapper +{ + /** + * PHP warning messages raised during stream_socket_client() call + * @var array + */ + protected $connectionWarnings = array(); + + /** + * Connected socket + * @var resource + */ + protected $socket; + + /** + * Sum of start time and global timeout, exception will be thrown if request continues past this time + * @var integer + */ + protected $deadline; + + /** + * Global timeout value, mostly for exception messages + * @var integer + */ + protected $timeout; + + /** + * Class constructor, tries to establish connection + * + * @param string $address Address for stream_socket_client() call, + * e.g. 'tcp://localhost:80' + * @param int $timeout Connection timeout (seconds) + * @param array $contextOptions Context options + * + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_ConnectionException + */ + public function __construct($address, $timeout, array $contextOptions = array()) + { + if (!empty($contextOptions) + && !isset($contextOptions['socket']) && !isset($contextOptions['ssl']) + ) { + // Backwards compatibility with 2.1.0 and 2.1.1 releases + $contextOptions = array('ssl' => $contextOptions); + } + if (isset($contextOptions['ssl'])) { + $contextOptions['ssl'] += array( + // Using "Intermediate compatibility" cipher bundle from + // https://wiki.mozilla.org/Security/Server_Side_TLS + 'ciphers' => 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:' + . 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:' + . 'DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:' + . 'ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:' + . 'ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:' + . 'ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:' + . 'ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:' + . 'DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:' + . 'DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:' + . 'ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:' + . 'AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:' + . 'AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:' + . '!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA' + ); + if (version_compare(phpversion(), '5.4.13', '>=')) { + $contextOptions['ssl']['disable_compression'] = true; + if (version_compare(phpversion(), '5.6', '>=')) { + $contextOptions['ssl']['crypto_method'] = STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + } + } + } + $context = stream_context_create(); + foreach ($contextOptions as $wrapper => $options) { + foreach ($options as $name => $value) { + if (!stream_context_set_option($context, $wrapper, $name, $value)) { + throw new HTTP_Request2_LogicException( + "Error setting '{$wrapper}' wrapper context option '{$name}'" + ); + } + } + } + set_error_handler(array($this, 'connectionWarningsHandler')); + $this->socket = stream_socket_client( + $address, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context + ); + restore_error_handler(); + // if we fail to bind to a specified local address (see request #19515), + // connection still succeeds, albeit with a warning. Throw an Exception + // with the warning text in this case as that connection is unlikely + // to be what user wants and as Curl throws an error in similar case. + if ($this->connectionWarnings) { + if ($this->socket) { + fclose($this->socket); + } + $error = $errstr ? $errstr : implode("\n", $this->connectionWarnings); + throw new HTTP_Request2_ConnectionException( + "Unable to connect to {$address}. Error: {$error}", 0, $errno + ); + } + } + + /** + * Destructor, disconnects socket + */ + public function __destruct() + { + fclose($this->socket); + } + + /** + * Wrapper around fread(), handles global request timeout + * + * @param int $length Reads up to this number of bytes + * + * @return string Data read from socket + * @throws HTTP_Request2_MessageException In case of timeout + */ + public function read($length) + { + if ($this->deadline) { + stream_set_timeout($this->socket, max($this->deadline - time(), 1)); + } + $data = fread($this->socket, $length); + $this->checkTimeout(); + return $data; + } + + /** + * Reads until either the end of the socket or a newline, whichever comes first + * + * Strips the trailing newline from the returned data, handles global + * request timeout. Method idea borrowed from Net_Socket PEAR package. + * + * @param int $bufferSize buffer size to use for reading + * @param int $localTimeout timeout value to use just for this call + * (used when waiting for "100 Continue" response) + * + * @return string Available data up to the newline (not including newline) + * @throws HTTP_Request2_MessageException In case of timeout + */ + public function readLine($bufferSize, $localTimeout = null) + { + $line = ''; + while (!feof($this->socket)) { + if (null !== $localTimeout) { + stream_set_timeout($this->socket, $localTimeout); + } elseif ($this->deadline) { + stream_set_timeout($this->socket, max($this->deadline - time(), 1)); + } + + $line .= @fgets($this->socket, $bufferSize); + + if (null === $localTimeout) { + $this->checkTimeout(); + + } else { + $info = stream_get_meta_data($this->socket); + // reset socket timeout if we don't have request timeout specified, + // prevents further calls failing with a bogus Exception + if (!$this->deadline) { + $default = (int)@ini_get('default_socket_timeout'); + stream_set_timeout($this->socket, $default > 0 ? $default : PHP_INT_MAX); + } + if ($info['timed_out']) { + throw new HTTP_Request2_MessageException( + "readLine() call timed out", HTTP_Request2_Exception::TIMEOUT + ); + } + } + if (substr($line, -1) == "\n") { + return rtrim($line, "\r\n"); + } + } + return $line; + } + + /** + * Wrapper around fwrite(), handles global request timeout + * + * @param string $data String to be written + * + * @return int + * @throws HTTP_Request2_MessageException + */ + public function write($data) + { + if ($this->deadline) { + stream_set_timeout($this->socket, max($this->deadline - time(), 1)); + } + $written = fwrite($this->socket, $data); + $this->checkTimeout(); + // http://www.php.net/manual/en/function.fwrite.php#96951 + if ($written < strlen($data)) { + throw new HTTP_Request2_MessageException('Error writing request'); + } + return $written; + } + + /** + * Tests for end-of-file on a socket + * + * @return bool + */ + public function eof() + { + return feof($this->socket); + } + + /** + * Sets request deadline + * + * @param int $deadline Exception will be thrown if request continues + * past this time + * @param int $timeout Original request timeout value, to use in + * Exception message + */ + public function setDeadline($deadline, $timeout) + { + $this->deadline = $deadline; + $this->timeout = $timeout; + } + + /** + * Turns on encryption on a socket + * + * @throws HTTP_Request2_ConnectionException + */ + public function enableCrypto() + { + if (version_compare(phpversion(), '5.6', '<')) { + $cryptoMethod = STREAM_CRYPTO_METHOD_TLS_CLIENT; + } else { + $cryptoMethod = STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + } + + if (!stream_socket_enable_crypto($this->socket, true, $cryptoMethod)) { + throw new HTTP_Request2_ConnectionException( + 'Failed to enable secure connection when connecting through proxy' + ); + } + } + + /** + * Throws an Exception if stream timed out + * + * @throws HTTP_Request2_MessageException + */ + protected function checkTimeout() + { + $info = stream_get_meta_data($this->socket); + if ($info['timed_out'] || $this->deadline && time() > $this->deadline) { + $reason = $this->deadline + ? "after {$this->timeout} second(s)" + : 'due to default_socket_timeout php.ini setting'; + throw new HTTP_Request2_MessageException( + "Request timed out {$reason}", HTTP_Request2_Exception::TIMEOUT + ); + } + } + + /** + * Error handler to use during stream_socket_client() call + * + * One stream_socket_client() call may produce *multiple* PHP warnings + * (especially OpenSSL-related), we keep them in an array to later use for + * the message of HTTP_Request2_ConnectionException + * + * @param int $errno error level + * @param string $errstr error message + * + * @return bool + */ + protected function connectionWarningsHandler($errno, $errstr) + { + if ($errno & E_WARNING) { + array_unshift($this->connectionWarnings, $errstr); + } + return true; + } +} +?> diff --git a/bundled-libs/Net/DNS2.php b/bundled-libs/Net/DNS2.php new file mode 100644 index 00000000..7a1ef2f4 --- /dev/null +++ b/bundled-libs/Net/DNS2.php @@ -0,0 +1,1427 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/* + * register the auto-load function + * + */ +spl_autoload_register('Net_DNS2::autoload'); + +/** + * This is the base class for the Net_DNS2_Resolver and Net_DNS2_Updater + * classes. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Resolver, Net_DNS2_Updater + * + */ +class Net_DNS2 +{ + /* + * the current version of this library + */ + const VERSION = '1.4.3'; + + /* + * the default path to a resolv.conf file + */ + const RESOLV_CONF = '/etc/resolv.conf'; + + /* + * override options from the resolv.conf file + * + * if this is set, then certain values from the resolv.conf file will override + * local settings. This is disabled by default to remain backwards compatible. + * + */ + public $use_resolv_options = false; + + /* + * use TCP only (true/false) + */ + public $use_tcp = false; + + /* + * DNS Port to use (53) + */ + public $dns_port = 53; + + /* + * the ip/port for use as a local socket + */ + public $local_host = ''; + public $local_port = 0; + + /* + * timeout value for socket connections + */ + public $timeout = 5; + + /* + * randomize the name servers list + */ + public $ns_random = false; + + /* + * default domains + */ + public $domain = ''; + + /* + * domain search list - not actually used right now + */ + public $search_list = array(); + + /* + * enable cache; either "shared", "file" or "none" + */ + public $cache_type = 'none'; + + /* + * file name to use for shared memory segment or file cache + */ + public $cache_file = '/tmp/net_dns2.cache'; + + /* + * the max size of the cache file (in bytes) + */ + public $cache_size = 50000; + + /* + * the method to use for storing cache data; either "serialize" or "json" + * + * json is faster, but can't remember the class names (everything comes back + * as a "stdClass Object"; all the data is the same though. serialize is + * slower, but will have all the class info. + * + * defaults to 'serialize' + */ + public $cache_serializer = 'serialize'; + + /* + * by default, according to RFC 1034 + * + * CNAME RRs cause special action in DNS software. When a name server + * fails to find a desired RR in the resource set associated with the + * domain name, it checks to see if the resource set consists of a CNAME + * record with a matching class. If so, the name server includes the CNAME + * record in the response and restarts the query at the domain name + * specified in the data field of the CNAME record. + * + * this can cause "unexpected" behavious, since i'm sure *most* people + * don't know DNS does this; there may be cases where Net_DNS2 returns a + * positive response, even though the hostname the user looked up did not + * actually exist. + * + * strict_query_mode means that if the hostname that was looked up isn't + * actually in the answer section of the response, Net_DNS2 will return an + * empty answer section, instead of an answer section that could contain + * CNAME records. + * + */ + public $strict_query_mode = false; + + /* + * if we should set the recursion desired bit to 1 or 0. + * + * by default this is set to true, we want the DNS server to perform a recursive + * request. If set to false, the RD bit will be set to 0, and the server will + * not perform recursion on the request. + */ + public $recurse = true; + + /* + * request DNSSEC values, by setting the DO flag to 1; this actually makes + * the resolver add a OPT RR to the additional section, and sets the DO flag + * in this RR to 1 + * + */ + public $dnssec = false; + + /* + * set the DNSSEC AD (Authentic Data) bit on/off; the AD bit on the request + * side was previously undefined, and resolvers we instructed to always clear + * the AD bit when sending a request. + * + * RFC6840 section 5.7 defines setting the AD bit in the query as a signal to + * the server that it wants the value of the AD bit, without needed to request + * all the DNSSEC data via the DO bit. + * + */ + public $dnssec_ad_flag = false; + + /* + * set the DNSSEC CD (Checking Disabled) bit on/off; turning this off, means + * that the DNS resolver will perform it's own signature validation- so the DNS + * servers simply pass through all the details. + * + */ + public $dnssec_cd_flag = false; + + /* + * the EDNS(0) UDP payload size to use when making DNSSEC requests + * see RFC 4035 section 4.1 - EDNS Support. + * + * there is some different ideas on the suggest size to supprt; but it seems to + * be "at least 1220 bytes, but SHOULD support 4000 bytes. + * + * we'll just support 4000 + * + */ + public $dnssec_payload_size = 4000; + + /* + * the last exeception that was generated + */ + public $last_exception = null; + + /* + * the list of exceptions by name server + */ + public $last_exception_list = array(); + + /* + * name server list + */ + public $nameservers = array(); + + /* + * local sockets + */ + protected $sock = array(Net_DNS2_Socket::SOCK_DGRAM => array(), Net_DNS2_Socket::SOCK_STREAM => array()); + + /* + * if the socket extension is loaded + */ + protected $sockets_enabled = false; + + /* + * the TSIG or SIG RR object for authentication + */ + protected $auth_signature = null; + + /* + * the shared memory segment id for the local cache + */ + protected $cache = null; + + /* + * internal setting for enabling cache + */ + protected $use_cache = false; + + /** + * Constructor - base constructor for the Resolver and Updater + * + * @param mixed $options array of options or null for none + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(array $options = null) + { + // + // check for the sockets extension; we no longer support the sockets library under + // windows- there have been too many errors related to sockets under windows- + // specifically inconsistent socket defines between versions of windows- + // + // and since I can't seem to find a way to get the actual windows version, it + // doesn't seem fixable in the code. + // + if ( (extension_loaded('sockets') == true) && (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') ) { + + $this->sockets_enabled = true; + } + + // + // load any options that were provided + // + if (!empty($options)) { + + foreach ($options as $key => $value) { + + if ($key == 'nameservers') { + + $this->setServers($value); + } else { + + $this->$key = $value; + } + } + } + + // + // if we're set to use the local shared memory cache, then + // make sure it's been initialized + // + switch($this->cache_type) { + case 'shared': + if (extension_loaded('shmop')) { + + $this->cache = new Net_DNS2_Cache_Shm; + $this->use_cache = true; + } else { + + throw new Net_DNS2_Exception( + 'shmop library is not available for cache', + Net_DNS2_Lookups::E_CACHE_SHM_UNAVAIL + ); + } + break; + case 'file': + + $this->cache = new Net_DNS2_Cache_File; + $this->use_cache = true; + + break; + case 'none': + $this->use_cache = false; + break; + default: + + throw new Net_DNS2_Exception( + 'un-supported cache type: ' . $this->cache_type, + Net_DNS2_Lookups::E_CACHE_UNSUPPORTED + ); + } + } + + /** + * autoload call-back function; used to auto-load classes + * + * @param string $name the name of the class + * + * @return void + * @access public + * + */ + static public function autoload($name) + { + // + // only auto-load our classes + // + if (strncmp($name, 'Net_DNS2', 8) == 0) { + + include str_replace('_', '/', $name) . '.php'; + } + + return; + } + + /** + * sets the name servers to be used + * + * @param mixed $nameservers either an array of name servers, or a file name + * to parse, assuming it's in the resolv.conf format + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function setServers($nameservers) + { + // + // if it's an array, then use it directly + // + // otherwise, see if it's a path to a resolv.conf file and if so, load it + // + if (is_array($nameservers)) { + + $this->nameservers = $nameservers; + + } else { + + // + // temporary list of name servers; do it this way rather than just + // resetting the local nameservers value, just incase an exception + // is thrown here; this way we might avoid ending up with an empty + // namservers list. + // + $ns = array(); + + // + // check to see if the file is readable + // + if (is_readable($nameservers) === true) { + + $data = file_get_contents($nameservers); + if ($data === false) { + throw new Net_DNS2_Exception( + 'failed to read contents of file: ' . $nameservers, + Net_DNS2_Lookups::E_NS_INVALID_FILE + ); + } + + $lines = explode("\n", $data); + + foreach ($lines as $line) { + + $line = trim($line); + + // + // ignore empty lines, and lines that are commented out + // + if ( (strlen($line) == 0) + || ($line[0] == '#') + || ($line[0] == ';') + ) { + continue; + } + + // + // ignore lines with no spaces in them. + // + if (strpos($line, ' ') === false) { + continue; + } + + list($key, $value) = preg_split('/\s+/', $line, 2); + + $key = trim(strtolower($key)); + $value = trim(strtolower($value)); + + switch($key) { + case 'nameserver': + + // + // nameserver can be a IPv4 or IPv6 address + // + if ( (self::isIPv4($value) == true) + || (self::isIPv6($value) == true) + ) { + + $ns[] = $value; + } else { + + throw new Net_DNS2_Exception( + 'invalid nameserver entry: ' . $value, + Net_DNS2_Lookups::E_NS_INVALID_ENTRY + ); + } + break; + + case 'domain': + $this->domain = $value; + break; + + case 'search': + $this->search_list = preg_split('/\s+/', $value); + break; + + case 'options': + $this->parseOptions($value); + break; + + default: + ; + } + } + + // + // if we don't have a domain, but we have a search list, then + // take the first entry on the search list as the domain + // + if ( (strlen($this->domain) == 0) + && (count($this->search_list) > 0) + ) { + $this->domain = $this->search_list[0]; + } + + } else { + throw new Net_DNS2_Exception( + 'resolver file file provided is not readable: ' . $nameservers, + Net_DNS2_Lookups::E_NS_INVALID_FILE + ); + } + + // + // store the name servers locally + // + if (count($ns) > 0) { + $this->nameservers = $ns; + } + } + + // + // remove any duplicates; not sure if we should bother with this- if people + // put duplicate name servers, who I am to stop them? + // + $this->nameservers = array_unique($this->nameservers); + + // + // check the name servers + // + $this->checkServers(); + + return true; + } + + /** + * parses the options line from a resolv.conf file; we don't support all the options + * yet, and using them is optional. + * + * @param string $value is the options string from the resolv.conf file. + * + * @return boolean + * @access private + * + */ + private function parseOptions($value) + { + // + // if overrides are disabled (the default), or the options list is empty for some + // reason, then we don't need to do any of this work. + // + if ( ($this->use_resolv_options == false) || (strlen($value) == 0) ) { + + return true; + } + + $options = preg_split('/\s+/', strtolower($value)); + + foreach ($options as $option) { + + // + // override the timeout value from the resolv.conf file. + // + if ( (strncmp($option, 'timeout', 7) == 0) && (strpos($option, ':') !== false) ) { + + list($key, $val) = explode(':', $option); + + if ( ($val > 0) && ($val <= 30) ) { + + $this->timeout = $val; + } + + // + // the rotate option just enabled the ns_random option + // + } else if (strncmp($option, 'rotate', 6) == 0) { + + $this->ns_random = true; + } + } + + return true; + } + + /** + * checks the list of name servers to make sure they're set + * + * @param mixed $default a path to a resolv.conf file or an array of servers. + * + * @return boolean + * @throws Net_DNS2_Exception + * @access protected + * + */ + protected function checkServers($default = null) + { + if (empty($this->nameservers)) { + + if (isset($default)) { + + $this->setServers($default); + } else { + + throw new Net_DNS2_Exception( + 'empty name servers list; you must provide a list of name '. + 'servers, or the path to a resolv.conf file.', + Net_DNS2_Lookups::E_NS_INVALID_ENTRY + ); + } + } + + return true; + } + + /** + * adds a TSIG RR object for authentication + * + * @param string $keyname the key name to use for the TSIG RR + * @param string $signature the key to sign the request. + * @param string $algorithm the algorithm to use + * + * @return boolean + * @access public + * @since function available since release 1.1.0 + * + */ + public function signTSIG( + $keyname, $signature = '', $algorithm = Net_DNS2_RR_TSIG::HMAC_MD5 + ) { + // + // if the TSIG was pre-created and passed in, then we can just used + // it as provided. + // + if ($keyname instanceof Net_DNS2_RR_TSIG) { + + $this->auth_signature = $keyname; + + } else { + + // + // otherwise create the TSIG RR, but don't add it just yet; TSIG needs + // to be added as the last additional entry- so we'll add it just + // before we send. + // + $this->auth_signature = Net_DNS2_RR::fromString( + strtolower(trim($keyname)) . + ' TSIG '. $signature + ); + + // + // set the algorithm to use + // + $this->auth_signature->algorithm = $algorithm; + } + + return true; + } + + /** + * adds a SIG RR object for authentication + * + * @param string $filename the name of a file to load the signature from. + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * @since function available since release 1.1.0 + * + */ + public function signSIG0($filename) + { + // + // check for OpenSSL + // + if (extension_loaded('openssl') === false) { + + throw new Net_DNS2_Exception( + 'the OpenSSL extension is required to use SIG(0).', + Net_DNS2_Lookups::E_OPENSSL_UNAVAIL + ); + } + + // + // if the SIG was pre-created, then use it as-is + // + if ($filename instanceof Net_DNS2_RR_SIG) { + + $this->auth_signature = $filename; + + } else { + + // + // otherwise, it's filename which needs to be parsed and processed. + // + $private = new Net_DNS2_PrivateKey($filename); + + // + // create a new Net_DNS2_RR_SIG object + // + $this->auth_signature = new Net_DNS2_RR_SIG(); + + // + // reset some values + // + $this->auth_signature->name = $private->signname; + $this->auth_signature->ttl = 0; + $this->auth_signature->class = 'ANY'; + + // + // these values are pulled from the private key + // + $this->auth_signature->algorithm = $private->algorithm; + $this->auth_signature->keytag = $private->keytag; + $this->auth_signature->signname = $private->signname; + + // + // these values are hard-coded for SIG0 + // + $this->auth_signature->typecovered = 'SIG0'; + $this->auth_signature->labels = 0; + $this->auth_signature->origttl = 0; + + // + // generate the dates + // + $t = time(); + + $this->auth_signature->sigincep = gmdate('YmdHis', $t); + $this->auth_signature->sigexp = gmdate('YmdHis', $t + 500); + + // + // store the private key in the SIG object for later. + // + $this->auth_signature->private_key = $private; + } + + // + // only RSA algorithms are supported for SIG(0) + // + switch($this->auth_signature->algorithm) { + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSA: + break; + default: + throw new Net_DNS2_Exception( + 'only asymmetric algorithms work with SIG(0)!', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + + return true; + } + + /** + * a simple function to determine if the RR type is cacheable + * + * @param stream $_type the RR type string + * + * @return bool returns true/false if the RR type if cachable + * @access public + * + */ + public function cacheable($_type) + { + switch($_type) { + case 'AXFR': + case 'OPT': + return false; + } + + return true; + } + + /** + * PHP doesn't support unsigned integers, but many of the RR's return + * unsigned values (like SOA), so there is the possibility that the + * value will overrun on 32bit systems, and you'll end up with a + * negative value. + * + * 64bit systems are not affected, as their PHP_IN_MAX value should + * be 64bit (ie 9223372036854775807) + * + * This function returns a negative integer value, as a string, with + * the correct unsigned value. + * + * @param string $_int the unsigned integer value to check + * + * @return string returns the unsigned value as a string. + * @access public + * + */ + public static function expandUint32($_int) + { + if ( ($_int < 0) && (PHP_INT_MAX == 2147483647) ) { + return sprintf('%u', $_int); + } else { + return $_int; + } + } + + /** + * returns true/false if the given address is a valid IPv4 address + * + * @param string $_address the IPv4 address to check + * + * @return boolean returns true/false if the address is IPv4 address + * @access public + * + */ + public static function isIPv4($_address) + { + // + // use filter_var() if it's available; it's faster than preg + // + if (extension_loaded('filter') == true) { + + if (filter_var($_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) == false) { + return false; + } + } else { + + // + // do the main check here; + // + if (inet_pton($_address) === false) { + return false; + } + + // + // then make sure we're not a IPv6 address + // + if (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $_address) == 0) { + return false; + } + } + + return true; + } + + /** + * returns true/false if the given address is a valid IPv6 address + * + * @param string $_address the IPv6 address to check + * + * @return boolean returns true/false if the address is IPv6 address + * @access public + * + */ + public static function isIPv6($_address) + { + // + // use filter_var() if it's available; it's faster than preg + // + if (extension_loaded('filter') == true) { + if (filter_var($_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) == false) { + return false; + } + } else { + + // + // do the main check here + // + if (inet_pton($_address) === false) { + return false; + } + + // + // then make sure it doesn't match a IPv4 address + // + if (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $_address) == 1) { + return false; + } + } + + return true; + } + + /** + * formats the given IPv6 address as a fully expanded IPv6 address + * + * @param string $_address the IPv6 address to expand + * + * @return string the fully expanded IPv6 address + * @access public + * + */ + public static function expandIPv6($_address) + { + $hex = unpack('H*hex', inet_pton($_address)); + + return substr(preg_replace('/([A-f0-9]{4})/', "$1:", $hex['hex']), 0, -1); + } + + /** + * sends a standard Net_DNS2_Packet_Request packet + * + * @param Net_DNS2_Packet $request a Net_DNS2_Packet_Request object + * @param boolean $use_tcp true/false if the function should + * use TCP for the request + * + * @return mixed returns a Net_DNS2_Packet_Response object, or false on error + * @throws Net_DNS2_Exception + * @access protected + * + */ + protected function sendPacket(Net_DNS2_Packet $request, $use_tcp) + { + // + // get the data from the packet + // + $data = $request->get(); + if (strlen($data) < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + throw new Net_DNS2_Exception( + 'invalid or empty packet for sending!', + Net_DNS2_Lookups::E_PACKET_INVALID, + null, + $request + ); + } + + reset($this->nameservers); + + // + // randomize the name server list if it's asked for + // + if ($this->ns_random == true) { + + shuffle($this->nameservers); + } + + // + // loop so we can handle server errors + // + $response = null; + $ns = ''; + + while (1) { + + // + // grab the next DNS server + // + $ns = each($this->nameservers); + if ($ns === false) { + + if (is_null($this->last_exception) == false) { + + throw $this->last_exception; + } else { + + throw new Net_DNS2_Exception( + 'every name server provided has failed', + Net_DNS2_Lookups::E_NS_FAILED + ); + } + } + + $ns = $ns[1]; + + // + // if the use TCP flag (force TCP) is set, or the packet is bigger than our + // max allowed UDP size- which is either 512, or if this is DNSSEC request, + // then whatever the configured dnssec_payload_size is. + // + $max_udp_size = Net_DNS2_Lookups::DNS_MAX_UDP_SIZE; + if ($this->dnssec == true) + { + $max_udp_size = $this->dnssec_payload_size; + } + + if ( ($use_tcp == true) || (strlen($data) > $max_udp_size) ) { + + try + { + $response = $this->sendTCPRequest($ns, $data, ($request->question[0]->qtype == 'AXFR') ? true : false); + + } catch(Net_DNS2_Exception $e) { + + $this->last_exception = $e; + $this->last_exception_list[$ns] = $e; + + continue; + } + + // + // otherwise, send it using UDP + // + } else { + + try + { + $response = $this->sendUDPRequest($ns, $data); + + // + // check the packet header for a trucated bit; if it was truncated, + // then re-send the request as TCP. + // + if ($response->header->tc == 1) { + + $response = $this->sendTCPRequest($ns, $data); + } + + } catch(Net_DNS2_Exception $e) { + + $this->last_exception = $e; + $this->last_exception_list[$ns] = $e; + + continue; + } + } + + // + // make sure header id's match between the request and response + // + if ($request->header->id != $response->header->id) { + + $this->last_exception = new Net_DNS2_Exception( + + 'invalid header: the request and response id do not match.', + Net_DNS2_Lookups::E_HEADER_INVALID, + null, + $request, + $response + ); + + $this->last_exception_list[$ns] = $this->last_exception; + continue; + } + + // + // make sure the response is actually a response + // + // 0 = query, 1 = response + // + if ($response->header->qr != Net_DNS2_Lookups::QR_RESPONSE) { + + $this->last_exception = new Net_DNS2_Exception( + + 'invalid header: the response provided is not a response packet.', + Net_DNS2_Lookups::E_HEADER_INVALID, + null, + $request, + $response + ); + + $this->last_exception_list[$ns] = $this->last_exception; + continue; + } + + // + // make sure the response code in the header is ok + // + if ($response->header->rcode != Net_DNS2_Lookups::RCODE_NOERROR) { + + $this->last_exception = new Net_DNS2_Exception( + + 'DNS request failed: ' . + Net_DNS2_Lookups::$result_code_messages[$response->header->rcode], + $response->header->rcode, + null, + $request, + $response + ); + + $this->last_exception_list[$ns] = $this->last_exception; + continue; + } + + break; + } + + return $response; + } + + /** + * cleans up a failed socket and throws the given exception + * + * @param string $_proto the protocol of the socket + * @param string $_ns the name server to use for the request + * @param string $_error the error message to throw at the end of the function + * + * @throws Net_DNS2_Exception + * @access private + * + */ + private function generateError($_proto, $_ns, $_error) + { + if (isset($this->sock[$_proto][$_ns]) == false) + { + throw new Net_DNS2_Exception('invalid socket referenced', Net_DNS2_Lookups::E_NS_INVALID_SOCKET); + } + + // + // grab the last error message off the socket + // + $last_error = $this->sock[$_proto][$_ns]->last_error; + + // + // close it + // + $this->sock[$_proto][$_ns]->close(); + + // + // remove it from the socket cache + // + unset($this->sock[$_proto][$_ns]); + + // + // throw the error provided + // + throw new Net_DNS2_Exception($last_error, $_error); + } + + /** + * sends a DNS request using TCP + * + * @param string $_ns the name server to use for the request + * @param string $_data the raw DNS packet data + * @param boolean $_axfr if this is a zone transfer request + * + * @return Net_DNS2_Packet_Response the reponse object + * @throws Net_DNS2_Exception + * @access private + * + */ + private function sendTCPRequest($_ns, $_data, $_axfr = false) + { + // + // grab the start time + // + $start_time = microtime(true); + + // + // see if we already have an open socket from a previous request; if so, try to use + // that instead of opening a new one. + // + if ( (!isset($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns])) + || (!($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns] instanceof Net_DNS2_Socket)) + ) { + + // + // if the socket library is available, then use that + // + if ($this->sockets_enabled === true) { + + $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns] = new Net_DNS2_Socket_Sockets( + Net_DNS2_Socket::SOCK_STREAM, $_ns, $this->dns_port, $this->timeout + ); + + // + // otherwise the streams library + // + } else { + + $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns] = new Net_DNS2_Socket_Streams( + Net_DNS2_Socket::SOCK_STREAM, $_ns, $this->dns_port, $this->timeout + ); + } + + // + // if a local IP address / port is set, then add it + // + if (strlen($this->local_host) > 0) { + + $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->bindAddress( + $this->local_host, $this->local_port + ); + } + + // + // open the socket + // + if ($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->open() === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + } + + // + // write the data to the socket; if it fails, continue on + // the while loop + // + if ($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->write($_data) === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // read the content, using select to wait for a response + // + $size = 0; + $result = null; + $response = null; + + // + // handle zone transfer requests differently than other requests. + // + if ($_axfr == true) { + + $soa_count = 0; + + while (1) { + + // + // read the data off the socket + // + $result = $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->read($size, ($this->dnssec == true) ? $this->dnssec_payload_size : Net_DNS2_Lookups::DNS_MAX_UDP_SIZE); + if ( ($result === false) || ($size < Net_DNS2_Lookups::DNS_HEADER_SIZE) ) { + + // + // if we get an error, then keeping this socket around for a future request, could cause + // an error- for example, https://github.com/mikepultz/netdns2/issues/61 + // + // in this case, the connection was timing out, which once it did finally respond, left + // data on the socket, which could be captured on a subsequent request. + // + // since there's no way to "reset" a socket, the only thing we can do it close it. + // + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // parse the first chunk as a packet + // + $chunk = new Net_DNS2_Packet_Response($result, $size); + + // + // if this is the first packet, then clone it directly, then + // go through it to see if there are two SOA records + // (indicating that it's the only packet) + // + if (is_null($response) == true) { + + $response = clone $chunk; + + // + // look for a failed response; if the zone transfer + // failed, then we don't need to do anything else at this + // point, and we should just break out. + // + if ($response->header->rcode != Net_DNS2_Lookups::RCODE_NOERROR) { + break; + } + + // + // go through each answer + // + foreach ($response->answer as $index => $rr) { + + // + // count the SOA records + // + if ($rr->type == 'SOA') { + $soa_count++; + } + } + + // + // if we have 2 or more SOA records, then we're done; + // otherwise continue out so we read the rest of the + // packets off the socket + // + if ($soa_count >= 2) { + break; + } else { + continue; + } + + } else { + + // + // go through all these answers, and look for SOA records + // + foreach ($chunk->answer as $index => $rr) { + + // + // count the number of SOA records we find + // + if ($rr->type == 'SOA') { + $soa_count++; + } + + // + // add the records to a single response object + // + $response->answer[] = $rr; + } + + // + // if we've found the second SOA record, we're done + // + if ($soa_count >= 2) { + break; + } + } + } + + // + // everything other than a AXFR + // + } else { + + $result = $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->read($size, ($this->dnssec == true) ? $this->dnssec_payload_size : Net_DNS2_Lookups::DNS_MAX_UDP_SIZE); + if ( ($result === false) || ($size < Net_DNS2_Lookups::DNS_HEADER_SIZE) ) { + + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // create the packet object + // + $response = new Net_DNS2_Packet_Response($result, $size); + } + + // + // store the query time + // + $response->response_time = microtime(true) - $start_time; + + // + // add the name server that the response came from to the response object, + // and the socket type that was used. + // + $response->answer_from = $_ns; + $response->answer_socket_type = Net_DNS2_Socket::SOCK_STREAM; + + // + // return the Net_DNS2_Packet_Response object + // + return $response; + } + + /** + * sends a DNS request using UDP + * + * @param string $_ns the name server to use for the request + * @param string $_data the raw DNS packet data + * + * @return Net_DNS2_Packet_Response the reponse object + * @throws Net_DNS2_Exception + * @access private + * + */ + private function sendUDPRequest($_ns, $_data) + { + // + // grab the start time + // + $start_time = microtime(true); + + // + // see if we already have an open socket from a previous request; if so, try to use + // that instead of opening a new one. + // + if ( (!isset($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns])) + || (!($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns] instanceof Net_DNS2_Socket)) + ) { + + // + // if the socket library is available, then use that + // + if ($this->sockets_enabled === true) { + + $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns] = new Net_DNS2_Socket_Sockets( + Net_DNS2_Socket::SOCK_DGRAM, $_ns, $this->dns_port, $this->timeout + ); + + // + // otherwise the streams library + // + } else { + + $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns] = new Net_DNS2_Socket_Streams( + Net_DNS2_Socket::SOCK_DGRAM, $_ns, $this->dns_port, $this->timeout + ); + } + + // + // if a local IP address / port is set, then add it + // + if (strlen($this->local_host) > 0) { + + $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->bindAddress( + $this->local_host, $this->local_port + ); + } + + // + // open the socket + // + if ($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->open() === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_DGRAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + } + + // + // write the data to the socket + // + if ($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->write($_data) === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_DGRAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // read the content, using select to wait for a response + // + $size = 0; + + $result = $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->read($size, ($this->dnssec == true) ? $this->dnssec_payload_size : Net_DNS2_Lookups::DNS_MAX_UDP_SIZE); + if (( $result === false) || ($size < Net_DNS2_Lookups::DNS_HEADER_SIZE)) { + + $this->generateError(Net_DNS2_Socket::SOCK_DGRAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // create the packet object + // + $response = new Net_DNS2_Packet_Response($result, $size); + + // + // store the query time + // + $response->response_time = microtime(true) - $start_time; + + // + // add the name server that the response came from to the response object, + // and the socket type that was used. + // + $response->answer_from = $_ns; + $response->answer_socket_type = Net_DNS2_Socket::SOCK_DGRAM; + + // + // return the Net_DNS2_Packet_Response object + // + return $response; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/BitMap.php b/bundled-libs/Net/DNS2/BitMap.php new file mode 100644 index 00000000..8b42649f --- /dev/null +++ b/bundled-libs/Net/DNS2/BitMap.php @@ -0,0 +1,254 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * a class to handle converting RR bitmaps to arrays and back; used on NSEC + * and NSEC3 RR's + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_BitMap +{ + /** + * parses a RR bitmap field defined in RFC3845, into an array of RR names. + * + * Type Bit Map(s) Field = ( Window Block # | Bitmap Length | Bitmap ) + + * + * @param string $data a bitmap stringto parse + * + * @return array + * @access public + * + */ + public static function bitMapToArray($data) + { + if (strlen($data) == 0) { + return null; + } + + $output = array(); + $offset = 0; + $length = strlen($data); + + while ($offset < $length) { + + // + // unpack the window and length values + // + $x = unpack('@' . $offset . '/Cwindow/Clength', $data); + $offset += 2; + + // + // copy out the bitmap value + // + $bitmap = unpack('C*', substr($data, $offset, $x['length'])); + $offset += $x['length']; + + // + // I'm not sure if there's a better way of doing this, but PHP doesn't + // have a 'B' flag for unpack() + // + $bitstr = ''; + foreach ($bitmap as $r) { + + $bitstr .= sprintf('%08b', $r); + } + + $blen = strlen($bitstr); + for ($i=0; $i<$blen; $i++) { + + if ($bitstr[$i] == '1') { + + $type = $x['window'] * 256 + $i; + + if (isset(Net_DNS2_Lookups::$rr_types_by_id[$type])) { + + $output[] = Net_DNS2_Lookups::$rr_types_by_id[$type]; + } else { + + $output[] = 'TYPE' . $type; + } + } + } + } + + return $output; + } + + /** + * builds a RR Bit map from an array of RR type names + * + * @param array $data a list of RR names + * + * @return string + * @access public + * + */ + public static function arrayToBitMap(array $data) + { + if (count($data) == 0) { + return null; + } + + $current_window = 0; + + // + // go through each RR + // + $max = 0; + $bm = array(); + + foreach ($data as $rr) { + + $rr = strtoupper($rr); + + // + // get the type id for the RR + // + $type = @Net_DNS2_Lookups::$rr_types_by_name[$rr]; + if (isset($type)) { + + // + // skip meta types or qtypes + // + if ( (isset(Net_DNS2_Lookups::$rr_qtypes_by_id[$type])) + || (isset(Net_DNS2_Lookups::$rr_metatypes_by_id[$type])) + ) { + continue; + } + + } else { + + // + // if it's not found, then it must be defined as TYPE, per + // RFC3845 section 2.2, if it's not, we ignore it. + // + list($name, $type) = explode('TYPE', $rr); + if (!isset($type)) { + + continue; + } + } + + // + // build the current window + // + $current_window = (int)($type / 256); + + $val = $type - $current_window * 256.0; + if ($val > $max) { + $max = $val; + } + + $bm[$current_window][$val] = 1; + $bm[$current_window]['length'] = ceil(($max + 1) / 8); + } + + $output = ''; + + foreach ($bm as $window => $bitdata) { + + $bitstr = ''; + + for ($i=0; $i<$bm[$window]['length'] * 8; $i++) { + if (isset($bm[$window][$i])) { + $bitstr .= '1'; + } else { + $bitstr .= '0'; + } + } + + $output .= pack('CC', $window, $bm[$window]['length']); + $output .= pack('H*', self::bigBaseConvert($bitstr)); + } + + return $output; + } + + /** + * a base_convert that handles large numbers; forced to 2/16 + * + * @param string $number a bit string + * + * @return string + * @access public + * + */ + public static function bigBaseConvert($number) + { + $result = ''; + + $bin = substr(chunk_split(strrev($number), 4, '-'), 0, -1); + $temp = preg_split('[-]', $bin, -1, PREG_SPLIT_DELIM_CAPTURE); + + for ($i = count($temp)-1;$i >= 0;$i--) { + + $result = $result . base_convert(strrev($temp[$i]), 2, 16); + } + + return strtoupper($result); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Cache.php b/bundled-libs/Net/DNS2/Cache.php new file mode 100644 index 00000000..1abbd015 --- /dev/null +++ b/bundled-libs/Net/DNS2/Cache.php @@ -0,0 +1,311 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * A class to provide simple dns lookup caching. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Cache +{ + /* + * the filename of the cache file + */ + protected $cache_file = ''; + + /* + * the local data store for the cache + */ + protected $cache_data = array(); + + /* + * the size of the cache to use + */ + protected $cache_size = 0; + + /* + * the cache serializer + */ + protected $cache_serializer; + + /* + * an internal flag to make sure we don't load the cache content more + * than once per instance. + */ + protected $cache_opened = false; + + /** + * returns true/false if the provided key is defined in the cache + * + * @param string $key the key to lookup in the local cache + * + * @return boolean + * @access public + * + */ + public function has($key) + { + return isset($this->cache_data[$key]); + } + + /** + * returns the value for the given key + * + * @param string $key the key to lookup in the local cache + * + * @return mixed returns the cache data on sucess, false on error + * @access public + * + */ + public function get($key) + { + if (isset($this->cache_data[$key])) { + + if ($this->cache_serializer == 'json') { + return json_decode($this->cache_data[$key]['object']); + } else { + return unserialize($this->cache_data[$key]['object']); + } + } else { + + return false; + } + } + + /** + * adds a new key/value pair to the cache + * + * @param string $key the key for the new cache entry + * @param mixed $data the data to store in cache + * + * @return void + * @access public + * + */ + public function put($key, $data) + { + $ttl = 86400 * 365; + + // + // clear the rdata values + // + $data->rdata = ''; + $data->rdlength = 0; + + // + // find the lowest TTL, and use that as the TTL for the whole cached + // object. The downside to using one TTL for the whole object, is that + // we'll invalidate entries before they actuall expire, causing a + // real lookup to happen. + // + // The upside is that we don't need to require() each RR type in the + // cache, so we can look at their individual TTL's on each run- we only + // unserialize the actual RR object when it's get() from the cache. + // + foreach ($data->answer as $index => $rr) { + + if ($rr->ttl < $ttl) { + $ttl = $rr->ttl; + } + + $rr->rdata = ''; + $rr->rdlength = 0; + } + foreach ($data->authority as $index => $rr) { + + if ($rr->ttl < $ttl) { + $ttl = $rr->ttl; + } + + $rr->rdata = ''; + $rr->rdlength = 0; + } + foreach ($data->additional as $index => $rr) { + + if ($rr->ttl < $ttl) { + $ttl = $rr->ttl; + } + + $rr->rdata = ''; + $rr->rdlength = 0; + } + + $this->cache_data[$key] = array( + + 'cache_date' => time(), + 'ttl' => $ttl + ); + + if ($this->cache_serializer == 'json') { + $this->cache_data[$key]['object'] = json_encode($data); + } else { + $this->cache_data[$key]['object'] = serialize($data); + } + } + + /** + * runs a clean up process on the cache data + * + * @return void + * @access protected + * + */ + protected function clean() + { + if (count($this->cache_data) > 0) { + + // + // go through each entry and adjust their TTL, and remove entries that + // have expired + // + $now = time(); + + foreach ($this->cache_data as $key => $data) { + + $diff = $now - $data['cache_date']; + + if ($data['ttl'] <= $diff) { + + unset($this->cache_data[$key]); + } else { + + $this->cache_data[$key]['ttl'] -= $diff; + $this->cache_data[$key]['cache_date'] = $now; + } + } + } + } + + /** + * runs a clean up process on the cache data + * + * @return mixed + * @access protected + * + */ + protected function resize() + { + if (count($this->cache_data) > 0) { + + // + // serialize the cache data + // + if ($this->cache_serializer == 'json') { + $cache = json_encode($this->cache_data); + } else { + $cache = serialize($this->cache_data); + } + + // + // only do this part if the size allocated to the cache storage + // is smaller than the actual cache data + // + if (strlen($cache) > $this->cache_size) { + + while (strlen($cache) > $this->cache_size) { + + // + // go through the data, and remove the entries closed to + // their expiration date. + // + $smallest_ttl = time(); + $smallest_key = null; + + foreach ($this->cache_data as $key => $data) { + + if ($data['ttl'] < $smallest_ttl) { + + $smallest_ttl = $data['ttl']; + $smallest_key = $key; + } + } + + // + // unset the key with the smallest TTL + // + unset($this->cache_data[$smallest_key]); + + // + // re-serialize + // + if ($this->cache_serializer == 'json') { + $cache = json_encode($this->cache_data); + } else { + $cache = serialize($this->cache_data); + } + } + } + + if ( ($cache == 'a:0:{}') || ($cache == '{}') ) { + return null; + } else { + return $cache; + } + } + + return null; + } +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Cache/File.php b/bundled-libs/Net/DNS2/Cache/File.php new file mode 100644 index 00000000..92fdcc27 --- /dev/null +++ b/bundled-libs/Net/DNS2/Cache/File.php @@ -0,0 +1,247 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * File-based caching for the Net_DNS2_Cache class + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Cache_File extends Net_DNS2_Cache +{ + /** + * open a cache object + * + * @param string $cache_file path to a file to use for cache storage + * @param integer $size the size of the shared memory segment to create + * @param string $serializer the name of the cache serialize to use + * + * @throws Net_DNS2_Exception + * @access public + * @return void + * + */ + public function open($cache_file, $size, $serializer) + { + $this->cache_size = $size; + $this->cache_file = $cache_file; + $this->cache_serializer = $serializer; + + // + // check that the file exists first + // + if ( ($this->cache_opened == false) + && (file_exists($this->cache_file) == true) + && (filesize($this->cache_file) > 0) + ) { + // + // open the file for reading + // + $fp = @fopen($this->cache_file, 'r'); + if ($fp !== false) { + + // + // lock the file just in case + // + flock($fp, LOCK_EX); + + // + // read the file contents + // + $data = fread($fp, filesize($this->cache_file)); + + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = $decoded; + } else { + + $this->cache_data = array(); + } + + // + // unlock + // + flock($fp, LOCK_UN); + + // + // close the file + // + fclose($fp); + + // + // clean up the data + // + $this->clean(); + + // + // mark this so we don't read this contents more than once per instance. + // + $this->cache_opened = true; + } + } + } + + /** + * Destructor + * + * @access public + * + */ + public function __destruct() + { + // + // if there's no cache file set, then there's nothing to do + // + if (strlen($this->cache_file) == 0) { + return; + } + + // + // open the file for reading/writing + // + $fp = fopen($this->cache_file, 'a+'); + if ($fp !== false) { + + // + // lock the file just in case + // + flock($fp, LOCK_EX); + + // + // seek to the start of the file to read + // + fseek($fp, 0, SEEK_SET); + + // + // read the file contents + // + $data = @fread($fp, filesize($this->cache_file)); + if ( ($data !== false) && (strlen($data) > 0) ) { + + // + // unserialize and store the data + // + $c = $this->cache_data; + + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = array_merge($c, $decoded); + } + } + + // + // trucate the file + // + ftruncate($fp, 0); + + // + // clean the data + // + $this->clean(); + + // + // resize the data + // + $data = $this->resize(); + if (!is_null($data)) { + + // + // write the file contents + // + fwrite($fp, $data); + } + + // + // unlock + // + flock($fp, LOCK_UN); + + // + // close the file + // + fclose($fp); + } + } +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Cache/Shm.php b/bundled-libs/Net/DNS2/Cache/Shm.php new file mode 100644 index 00000000..2abfa4fb --- /dev/null +++ b/bundled-libs/Net/DNS2/Cache/Shm.php @@ -0,0 +1,318 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * Shared Memory-based caching for the Net_DNS2_Cache class + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Cache_Shm extends Net_DNS2_Cache +{ + /* + * resource id of the shared memory cache + */ + private $_cache_id = false; + + /* + * the IPC key + */ + private $_cache_file_tok = -1; + + /** + * open a cache object + * + * @param string $cache_file path to a file to use for cache storage + * @param integer $size the size of the shared memory segment to create + * @param string $serializer the name of the cache serialize to use + * + * @throws Net_DNS2_Exception + * @access public + * @return void + * + */ + public function open($cache_file, $size, $serializer) + { + $this->cache_size = $size; + $this->cache_file = $cache_file; + $this->cache_serializer = $serializer; + + // + // if we've already loaded the cache data, then just return right away + // + if ($this->cache_opened == true) + { + return; + } + + // + // make sure the file exists first + // + if (!file_exists($cache_file)) { + + if (file_put_contents($cache_file, '') === false) { + + throw new Net_DNS2_Exception( + 'failed to create empty SHM file: ' . $cache_file, + Net_DNS2_Lookups::E_CACHE_SHM_FILE + ); + } + } + + // + // convert the filename to a IPC key + // + $this->_cache_file_tok = ftok($cache_file, 't'); + if ($this->_cache_file_tok == -1) { + + throw new Net_DNS2_Exception( + 'failed on ftok() file: ' . $this->_cache_file_tok, + Net_DNS2_Lookups::E_CACHE_SHM_FILE + ); + } + + // + // try to open an existing cache; if it doesn't exist, then there's no + // cache, and nothing to do. + // + $this->_cache_id = @shmop_open($this->_cache_file_tok, 'w', 0, 0); + if ($this->_cache_id !== false) { + + // + // this returns the size allocated, and not the size used, but it's + // still a good check to make sure there's space allocated. + // + $allocated = shmop_size($this->_cache_id); + if ($allocated > 0) { + + // + // read the data from the shared memory segment + // + $data = trim(shmop_read($this->_cache_id, 0, $allocated)); + if ( ($data !== false) && (strlen($data) > 0) ) { + + // + // unserialize and store the data + // + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = $decoded; + } else { + + $this->cache_data = array(); + } + + // + // call clean to clean up old entries + // + $this->clean(); + + // + // mark the cache as loaded, so we don't load it more than once + // + $this->cache_opened = true; + } + } + } + } + + /** + * Destructor + * + * @access public + * + */ + public function __destruct() + { + // + // if there's no cache file set, then there's nothing to do + // + if (strlen($this->cache_file) == 0) { + return; + } + + $fp = fopen($this->cache_file, 'r'); + if ($fp !== false) { + + // + // lock the file + // + flock($fp, LOCK_EX); + + // + // check to see if we have an open shm segment + // + if ($this->_cache_id === false) { + + // + // try opening it again, incase it was created by another + // process in the mean time + // + $this->_cache_id = @shmop_open( + $this->_cache_file_tok, 'w', 0, 0 + ); + if ($this->_cache_id === false) { + + // + // otherwise, create it. + // + $this->_cache_id = @shmop_open( + $this->_cache_file_tok, 'c', 0, $this->cache_size + ); + } + } + + // + // get the size allocated to the segment + // + $allocated = shmop_size($this->_cache_id); + + // + // read the contents + // + $data = trim(shmop_read($this->_cache_id, 0, $allocated)); + + // + // if there was some data + // + if ( ($data !== false) && (strlen($data) > 0) ) { + + // + // unserialize and store the data + // + $c = $this->cache_data; + + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = array_merge($c, $decoded); + } + } + + // + // delete the segment + // + shmop_delete($this->_cache_id); + + // + // clean the data + // + $this->clean(); + + // + // clean up and write the data + // + $data = $this->resize(); + if (!is_null($data)) { + + // + // re-create segment + // + $this->_cache_id = @shmop_open( + $this->_cache_file_tok, 'c', 0644, $this->cache_size + ); + if ($this->_cache_id === false) { + return; + } + + $o = shmop_write($this->_cache_id, $data, 0); + } + + // + // close the segment + // + shmop_close($this->_cache_id); + + // + // unlock + // + flock($fp, LOCK_UN); + + // + // close the file + // + fclose($fp); + } + } +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Exception.php b/bundled-libs/Net/DNS2/Exception.php new file mode 100644 index 00000000..196223d1 --- /dev/null +++ b/bundled-libs/Net/DNS2/Exception.php @@ -0,0 +1,142 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + */ + +/** + * Exception handler used by Net_DNS2 + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_Exception extends Exception +{ + private $_request; + private $_response; + + /** + * Constructor - overload the constructor so we can pass in the request + * and response object (when it's available) + * + * @param string $message the exception message + * @param int $code the exception code + * @param object $previous the previous Exception object + * @param object $request the Net_DNS2_Packet_Request object for this request + * @param object $response the Net_DNS2_Packet_Response object for this request + * + * @access public + * + */ + public function __construct( + $message = '', + $code = 0, + $previous = null, + Net_DNS2_Packet_Request $request = null, + Net_DNS2_Packet_Response $response = null + ) { + // + // store the request/response objects (if passed) + // + $this->_request = $request; + $this->_response = $response; + + // + // call the parent constructor + // + // the "previous" argument was added in PHP 5.3.0 + // + // https://code.google.com/p/netdns2/issues/detail?id=25 + // + if (version_compare(PHP_VERSION, '5.3.0', '>=') == true) { + + parent::__construct($message, $code, $previous); + } else { + + parent::__construct($message, $code); + } + } + + /** + * returns the Net_DNS2_Packet_Request object (if available) + * + * @return Net_DNS2_Packet_Request object + * @access public + * @since function available since release 1.3.1 + * + */ + public function getRequest() + { + return $this->_request; + } + + /** + * returns the Net_DNS2_Packet_Response object (if available) + * + * @return Net_DNS2_Packet_Response object + * @access public + * @since function available since release 1.3.1 + * + */ + public function getResponse() + { + return $this->_response; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Header.php b/bundled-libs/Net/DNS2/Header.php new file mode 100644 index 00000000..511b62c2 --- /dev/null +++ b/bundled-libs/Net/DNS2/Header.php @@ -0,0 +1,277 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * DNS Packet Header class + * + * This class handles parsing and constructing DNS Packet Headers as defined + * by section 4.1.1 of RFC1035. + * + * DNS header format - RFC1035 section 4.1.1 + * DNS header format - RFC4035 section 3.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ID | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * |QR| Opcode |AA|TC|RD|RA| Z|AD|CD| RCODE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QDCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ANCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | NSCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ARCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_Header +{ + public $id; // 16 bit - identifier + public $qr; // 1 bit - 0 = query, 1 = response + public $opcode; // 4 bit - op code + public $aa; // 1 bit - Authoritative Answer + public $tc; // 1 bit - TrunCation + public $rd; // 1 bit - Recursion Desired + public $ra; // 1 bit - Recursion Available + public $z; // 1 bit - Reserved + public $ad; // 1 bit - Authentic Data (RFC4035) + public $cd; // 1 bit - Checking Disabled (RFC4035) + public $rcode; // 4 bit - Response code + public $qdcount; // 16 bit - entries in the question section + public $ancount; // 16 bit - resource records in the answer section + public $nscount; // 16 bit - name server rr in the authority records section + public $arcount; // 16 bit - rr's in the additional records section + + /** + * Constructor - builds a new Net_DNS2_Header object + * + * @param mixed &$packet either a Net_DNS2_Packet object or null + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null) + { + if (!is_null($packet)) { + + $this->set($packet); + } else { + + $this->id = $this->nextPacketId(); + $this->qr = Net_DNS2_Lookups::QR_QUERY; + $this->opcode = Net_DNS2_Lookups::OPCODE_QUERY; + $this->aa = 0; + $this->tc = 0; + $this->rd = 1; + $this->ra = 0; + $this->z = 0; + $this->ad = 0; + $this->cd = 0; + $this->rcode = Net_DNS2_Lookups::RCODE_NOERROR; + $this->qdcount = 1; + $this->ancount = 0; + $this->nscount = 0; + $this->arcount = 0; + } + } + + /** + * returns the next available packet id + * + * @return integer + * @access public + * + */ + public function nextPacketId() + { + if (++Net_DNS2_Lookups::$next_packet_id > 65535) { + + Net_DNS2_Lookups::$next_packet_id = 1; + } + + return Net_DNS2_Lookups::$next_packet_id; + } + + /** + * magic __toString() method to return the header as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + $output = ";;\n;; Header:\n"; + + $output .= ";;\t id = " . $this->id . "\n"; + $output .= ";;\t qr = " . $this->qr . "\n"; + $output .= ";;\t opcode = " . $this->opcode . "\n"; + $output .= ";;\t aa = " . $this->aa . "\n"; + $output .= ";;\t tc = " . $this->tc . "\n"; + $output .= ";;\t rd = " . $this->rd . "\n"; + $output .= ";;\t ra = " . $this->ra . "\n"; + $output .= ";;\t z = " . $this->z . "\n"; + $output .= ";;\t ad = " . $this->ad . "\n"; + $output .= ";;\t cd = " . $this->cd . "\n"; + $output .= ";;\t rcode = " . $this->rcode . "\n"; + $output .= ";;\t qdcount = " . $this->qdcount . "\n"; + $output .= ";;\t ancount = " . $this->ancount . "\n"; + $output .= ";;\t nscount = " . $this->nscount . "\n"; + $output .= ";;\t arcount = " . $this->arcount . "\n"; + + return $output; + } + + /** + * constructs a Net_DNS2_Header from a Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet Object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set(Net_DNS2_Packet &$packet) + { + // + // the header must be at least 12 bytes long. + // + if ($packet->rdlength < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + throw new Net_DNS2_Exception( + 'invalid header data provided; to small', + Net_DNS2_Lookups::E_HEADER_INVALID + ); + } + + $offset = 0; + + // + // parse the values + // + $this->id = ord($packet->rdata[$offset]) << 8 | + ord($packet->rdata[++$offset]); + + ++$offset; + $this->qr = (ord($packet->rdata[$offset]) >> 7) & 0x1; + $this->opcode = (ord($packet->rdata[$offset]) >> 3) & 0xf; + $this->aa = (ord($packet->rdata[$offset]) >> 2) & 0x1; + $this->tc = (ord($packet->rdata[$offset]) >> 1) & 0x1; + $this->rd = ord($packet->rdata[$offset]) & 0x1; + + ++$offset; + $this->ra = (ord($packet->rdata[$offset]) >> 7) & 0x1; + $this->z = (ord($packet->rdata[$offset]) >> 6) & 0x1; + $this->ad = (ord($packet->rdata[$offset]) >> 5) & 0x1; + $this->cd = (ord($packet->rdata[$offset]) >> 4) & 0x1; + $this->rcode = ord($packet->rdata[$offset]) & 0xf; + + $this->qdcount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + $this->ancount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + $this->nscount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + $this->arcount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + + // + // increment the internal offset + // + $packet->offset += Net_DNS2_Lookups::DNS_HEADER_SIZE; + + return true; + } + + /** + * returns a binary packed DNS Header + * + * @param Net_DNS2_Packet &$packet Object + * + * @return string + * @access public + * + */ + public function get(Net_DNS2_Packet &$packet) + { + $packet->offset += Net_DNS2_Lookups::DNS_HEADER_SIZE; + + return pack('n', $this->id) . + chr( + ($this->qr << 7) | ($this->opcode << 3) | + ($this->aa << 2) | ($this->tc << 1) | ($this->rd) + ) . + chr( + ($this->ra << 7) | ($this->ad << 5) | ($this->cd << 4) | $this->rcode + ) . + pack('n4', $this->qdcount, $this->ancount, $this->nscount, $this->arcount); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Lookups.php b/bundled-libs/Net/DNS2/Lookups.php new file mode 100644 index 00000000..d4898a28 --- /dev/null +++ b/bundled-libs/Net/DNS2/Lookups.php @@ -0,0 +1,578 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +// +// initalize the packet id value +// +Net_DNS2_Lookups::$next_packet_id = mt_rand(0, 65535); + +// +// build the reverse lookup tables; this is just so we don't have to +// have duplicate static content laying around. +// +Net_DNS2_Lookups::$rr_types_by_id = array_flip(Net_DNS2_Lookups::$rr_types_by_name); +Net_DNS2_Lookups::$classes_by_id = array_flip(Net_DNS2_Lookups::$classes_by_name); +Net_DNS2_Lookups::$rr_types_class_to_id = array_flip(Net_DNS2_Lookups::$rr_types_id_to_class); +Net_DNS2_Lookups::$algorithm_name_to_id = array_flip(Net_DNS2_Lookups::$algorithm_id_to_name); +Net_DNS2_Lookups::$digest_name_to_id = array_flip(Net_DNS2_Lookups::$digest_id_to_name); +Net_DNS2_Lookups::$rr_qtypes_by_id = array_flip(Net_DNS2_Lookups::$rr_qtypes_by_name); +Net_DNS2_Lookups::$rr_metatypes_by_id = array_flip(Net_DNS2_Lookups::$rr_metatypes_by_name); +Net_DNS2_Lookups::$protocol_by_id = array_flip(Net_DNS2_Lookups::$protocol_by_name); + +/** + * This class provides simple lookups used througout the Net_DNS2 code + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_Lookups +{ + /* + * size (in bytes) of a header in a standard DNS packet + */ + const DNS_HEADER_SIZE = 12; + + /* + * max size of a UDP packet + */ + const DNS_MAX_UDP_SIZE = 512; + + /* + * Query/Response flag + */ + const QR_QUERY = 0; // RFC 1035 + const QR_RESPONSE = 1; // RFC 1035 + + /* + * DNS Op Codes + */ + const OPCODE_QUERY = 0; // RFC 1035 + const OPCODE_IQUERY = 1; // RFC 1035, RFC 3425 + const OPCODE_STATUS = 2; // RFC 1035 + const OPCODE_NOTIFY = 4; // RFC 1996 + const OPCODE_UPDATE = 5; // RFC 2136 + + /* + * Resource Record Classes + */ + const RR_CLASS_IN = 1; // RFC 1035 + const RR_CLASS_CH = 3; // RFC 1035 + const RR_CLASS_HS = 4; // RFC 1035 + const RR_CLASS_NONE = 254; // RFC 2136 + const RR_CLASS_ANY = 255; // RFC 1035 + + /* + * DNS Response Codes + */ + const RCODE_NOERROR = 0; // RFC 1035 + const RCODE_FORMERR = 1; // RFC 1035 + const RCODE_SERVFAIL = 2; // RFC 1035 + const RCODE_NXDOMAIN = 3; // RFC 1035 + const RCODE_NOTIMP = 4; // RFC 1035 + const RCODE_REFUSED = 5; // RFC 1035 + const RCODE_YXDOMAIN = 6; // RFC 2136 + const RCODE_YXRRSET = 7; // RFC 2136 + const RCODE_NXRRSET = 8; // RFC 2136 + const RCODE_NOTAUTH = 9; // RFC 2136 + const RCODE_NOTZONE = 10; // RFC 2136 + + // 11-15 reserved + + const RCODE_BADSIG = 16; // RFC 2845 + const RCODE_BADVERS = 16; // RFC 6891 + const RCODE_BADKEY = 17; // RFC 2845 + const RCODE_BADTIME = 18; // RFC 2845 + const RCODE_BADMODE = 19; // RFC 2930 + const RCODE_BADNAME = 20; // RFC 2930 + const RCODE_BADALG = 21; // RFC 2930 + const RCODE_BADTRUNC = 22; // RFC 4635 + const RCODE_BADCOOKIE = 23; // RFC 7873 + + /* + * internal errors codes returned by the exceptions class + */ + const E_NONE = 0; + const E_DNS_FORMERR = self::RCODE_FORMERR; + const E_DNS_SERVFAIL = self::RCODE_SERVFAIL; + const E_DNS_NXDOMAIN = self::RCODE_NXDOMAIN; + const E_DNS_NOTIMP = self::RCODE_NOTIMP; + const E_DNS_REFUSED = self::RCODE_REFUSED; + const E_DNS_YXDOMAIN = self::RCODE_YXDOMAIN; + const E_DNS_YXRRSET = self::RCODE_YXRRSET; + const E_DNS_NXRRSET = self::RCODE_NXRRSET; + const E_DNS_NOTAUTH = self::RCODE_NOTAUTH; + const E_DNS_NOTZONE = self::RCODE_NOTZONE; + + // 11-15 reserved + + const E_DNS_BADSIG = self::RCODE_BADSIG; + const E_DNS_BADKEY = self::RCODE_BADKEY; + const E_DNS_BADTIME = self::RCODE_BADTIME; + const E_DNS_BADMODE = self::RCODE_BADMODE; + const E_DNS_BADNAME = self::RCODE_BADNAME; + const E_DNS_BADALG = self::RCODE_BADALG; + const E_DNS_BADTRUNC = self::RCODE_BADTRUNC; + const E_DNS_BADCOOKIE = self::RCODE_BADCOOKIE; + + // other error conditions + + const E_NS_INVALID_FILE = 200; + const E_NS_INVALID_ENTRY = 201; + const E_NS_FAILED = 202; + const E_NS_SOCKET_FAILED = 203; + const E_NS_INVALID_SOCKET = 204; + + const E_PACKET_INVALID = 300; + const E_PARSE_ERROR = 301; + const E_HEADER_INVALID = 302; + const E_QUESTION_INVALID = 303; + const E_RR_INVALID = 304; + + const E_OPENSSL_ERROR = 400; + const E_OPENSSL_UNAVAIL = 401; + const E_OPENSSL_INV_PKEY = 402; + const E_OPENSSL_INV_ALGO = 403; + + const E_CACHE_UNSUPPORTED = 500; + const E_CACHE_SHM_FILE = 501; + const E_CACHE_SHM_UNAVAIL = 502; + + /* + * EDNS0 Option Codes (OPT) + */ + // 0 - Reserved + const EDNS0_OPT_LLQ = 1; + const EDNS0_OPT_UL = 2; + const EDNS0_OPT_NSID = 3; + // 4 - Reserved + const EDNS0_OPT_DAU = 5; + const EDNS0_OPT_DHU = 6; + const EDNS0_OPT_N3U = 7; + const EDNS0_OPT_CLIENT_SUBNET = 8; + const EDNS0_OPT_EXPIRE = 9; + const EDNS0_OPT_COOKIE = 10; + const EDNS0_OPT_TCP_KEEPALIVE = 11; + const EDNS0_OPT_PADDING = 12; + const EDNS0_OPT_CHAIN = 13; + + /* + * DNSSEC Algorithms + */ + const DNSSEC_ALGORITHM_RES = 0; + const DNSSEC_ALGORITHM_RSAMD5 = 1; + const DNSSEC_ALGORITHM_DH = 2; + const DNSSEC_ALGORITHM_DSA = 3; + const DNSSEC_ALGORITHM_ECC = 4; + const DNSSEC_ALGORITHM_RSASHA1 = 5; + const DNSSEC_ALGORITHM_DSANSEC3SHA1 = 6; + const DSNSEC_ALGORITHM_RSASHA1NSEC3SHA1 = 7; + const DNSSEC_ALGORITHM_RSASHA256 = 8; + const DNSSEC_ALGORITHM_RSASHA512 = 10; + const DNSSEC_ALGORITHM_ECCGOST = 12; + const DNSSEC_ALGORITHM_INDIRECT = 252; + const DNSSEC_ALGORITHM_PRIVATEDNS = 253; + const DNSSEC_ALGORITHM_PRIVATEOID = 254; + + /* + * DNSSEC Digest Types + */ + const DNSSEC_DIGEST_RES = 0; + const DNSSEC_DIGEST_SHA1 = 1; + + /* + * The packet id used when sending requests + */ + public static $next_packet_id; + + /* + * Used to map resource record types to their id's, and back + */ + public static $rr_types_by_id = array(); + public static $rr_types_by_name = array( + + 'SIG0' => 0, // RFC 2931 pseudo type + 'A' => 1, // RFC 1035 + 'NS' => 2, // RFC 1035 + 'MD' => 3, // RFC 1035 - obsolete, Not implemented + 'MF' => 4, // RFC 1035 - obsolete, Not implemented + 'CNAME' => 5, // RFC 1035 + 'SOA' => 6, // RFC 1035 + 'MB' => 7, // RFC 1035 - obsolete, Not implemented + 'MG' => 8, // RFC 1035 - obsolete, Not implemented + 'MR' => 9, // RFC 1035 - obsolete, Not implemented + 'NULL' => 10, // RFC 1035 - obsolete, Not implemented + 'WKS' => 11, // RFC 1035 + 'PTR' => 12, // RFC 1035 + 'HINFO' => 13, // RFC 1035 + 'MINFO' => 14, // RFC 1035 - obsolete, Not implemented + 'MX' => 15, // RFC 1035 + 'TXT' => 16, // RFC 1035 + 'RP' => 17, // RFC 1183 + 'AFSDB' => 18, // RFC 1183 + 'X25' => 19, // RFC 1183 + 'ISDN' => 20, // RFC 1183 + 'RT' => 21, // RFC 1183 + 'NSAP' => 22, // RFC 1706 + 'NSAP_PTR' => 23, // RFC 1348 - obsolete, Not implemented + 'SIG' => 24, // RFC 2535 + 'KEY' => 25, // RFC 2535, RFC 2930 + 'PX' => 26, // RFC 2163 + 'GPOS' => 27, // RFC 1712 - Not implemented + 'AAAA' => 28, // RFC 3596 + 'LOC' => 29, // RFC 1876 + 'NXT' => 30, // RFC 2065, obsoleted by by RFC 3755 + 'EID' => 31, // [Patton][Patton1995] + 'NIMLOC' => 32, // [Patton][Patton1995] + 'SRV' => 33, // RFC 2782 + 'ATMA' => 34, // Windows only + 'NAPTR' => 35, // RFC 2915 + 'KX' => 36, // RFC 2230 + 'CERT' => 37, // RFC 4398 + 'A6' => 38, // downgraded to experimental by RFC 3363 + 'DNAME' => 39, // RFC 2672 + 'SINK' => 40, // Not implemented + 'OPT' => 41, // RFC 2671 + 'APL' => 42, // RFC 3123 + 'DS' => 43, // RFC 4034 + 'SSHFP' => 44, // RFC 4255 + 'IPSECKEY' => 45, // RFC 4025 + 'RRSIG' => 46, // RFC 4034 + 'NSEC' => 47, // RFC 4034 + 'DNSKEY' => 48, // RFC 4034 + 'DHCID' => 49, // RFC 4701 + 'NSEC3' => 50, // RFC 5155 + 'NSEC3PARAM' => 51, // RFC 5155 + 'TLSA' => 52, // RFC 6698 + 'SMIMEA' => 53, // draft-ietf-dane-smime-10 + + // 54 unassigned + + 'HIP' => 55, // RFC 5205 + 'NINFO' => 56, // Not implemented + 'RKEY' => 57, // Not implemented + 'TALINK' => 58, // + 'CDS' => 59, // RFC 7344 + 'CDNSKEY' => 60, // RFC 7344 + 'OPENPGPKEY' => 61, // RFC 7929 + 'CSYNC' => 62, // RFC 7477 + + // 63 - 98 unassigned + + 'SPF' => 99, // RFC 4408 + 'UINFO' => 100, // no RFC, Not implemented + 'UID' => 101, // no RFC, Not implemented + 'GID' => 102, // no RFC, Not implemented + 'UNSPEC' => 103, // no RFC, Not implemented + 'NID' => 104, // RFC 6742 + 'L32' => 105, // RFC 6742 + 'L64' => 106, // RFC 6742 + 'LP' => 107, // RFC 6742 + 'EUI48' => 108, // RFC 7043 + 'EUI64' => 109, // RFC 7043 + + // 110 - 248 unassigned + + 'TKEY' => 249, // RFC 2930 + 'TSIG' => 250, // RFC 2845 + 'IXFR' => 251, // RFC 1995 - only a full (AXFR) is supported + 'AXFR' => 252, // RFC 1035 + 'MAILB' => 253, // RFC 883, Not implemented + 'MAILA' => 254, // RFC 973, Not implemented + 'ANY' => 255, // RFC 1035 - we support both 'ANY' and '*' + 'URI' => 256, // tools.ietf.org/html/draft-faltstrom-uri-06 + 'CAA' => 257, // tools.ietf.org/html/draft-ietf-pkix-caa-03 + 'AVC' => 258, // Application Visibility and Control + + // 259 - 32767 unassigned + + 'TA' => 32768, // same as DS + 'DLV' => 32769 // RFC 4431 + ); + + /* + * Qtypes and Metatypes - defined in RFC2929 section 3.1 + */ + public static $rr_qtypes_by_id = array(); + public static $rr_qtypes_by_name = array( + + 'IXFR' => 251, // RFC 1995 - only a full (AXFR) is supported + 'AXFR' => 252, // RFC 1035 + 'MAILB' => 253, // RFC 883, Not implemented + 'MAILA' => 254, // RFC 973, Not implemented + 'ANY' => 255 // RFC 1035 - we support both 'ANY' and '*' + ); + + public static $rr_metatypes_by_id = array(); + public static $rr_metatypes_by_name = array( + + 'OPT' => 41, // RFC 2671 + 'TKEY' => 249, // RFC 2930 + 'TSIG' => 250 // RFC 2845 + ); + + /* + * used to map resource record id's to RR class names + */ + public static $rr_types_class_to_id = array(); + public static $rr_types_id_to_class = array( + + 1 => 'Net_DNS2_RR_A', + 2 => 'Net_DNS2_RR_NS', + 5 => 'Net_DNS2_RR_CNAME', + 6 => 'Net_DNS2_RR_SOA', + 11 => 'Net_DNS2_RR_WKS', + 12 => 'Net_DNS2_RR_PTR', + 13 => 'Net_DNS2_RR_HINFO', + 15 => 'Net_DNS2_RR_MX', + 16 => 'Net_DNS2_RR_TXT', + 17 => 'Net_DNS2_RR_RP', + 18 => 'Net_DNS2_RR_AFSDB', + 19 => 'Net_DNS2_RR_X25', + 20 => 'Net_DNS2_RR_ISDN', + 21 => 'Net_DNS2_RR_RT', + 22 => 'Net_DNS2_RR_NSAP', + 24 => 'Net_DNS2_RR_SIG', + 25 => 'Net_DNS2_RR_KEY', + 26 => 'Net_DNS2_RR_PX', + 28 => 'Net_DNS2_RR_AAAA', + 29 => 'Net_DNS2_RR_LOC', + 31 => 'Net_DNS2_RR_EID', + 32 => 'Net_DNS2_RR_NIMLOC', + 33 => 'Net_DNS2_RR_SRV', + 34 => 'Net_DNS2_RR_ATMA', + 35 => 'Net_DNS2_RR_NAPTR', + 36 => 'Net_DNS2_RR_KX', + 37 => 'Net_DNS2_RR_CERT', + 39 => 'Net_DNS2_RR_DNAME', + 41 => 'Net_DNS2_RR_OPT', + 42 => 'Net_DNS2_RR_APL', + 43 => 'Net_DNS2_RR_DS', + 44 => 'Net_DNS2_RR_SSHFP', + 45 => 'Net_DNS2_RR_IPSECKEY', + 46 => 'Net_DNS2_RR_RRSIG', + 47 => 'Net_DNS2_RR_NSEC', + 48 => 'Net_DNS2_RR_DNSKEY', + 49 => 'Net_DNS2_RR_DHCID', + 50 => 'Net_DNS2_RR_NSEC3', + 51 => 'Net_DNS2_RR_NSEC3PARAM', + 52 => 'Net_DNS2_RR_TLSA', + 53 => 'Net_DNS2_RR_SMIMEA', + 55 => 'Net_DNS2_RR_HIP', + 58 => 'Net_DNS2_RR_TALINK', + 59 => 'Net_DNS2_RR_CDS', + 60 => 'Net_DNS2_RR_CDNSKEY', + 61 => 'Net_DNS2_RR_OPENPGPKEY', + 62 => 'Net_DNS2_RR_CSYNC', + 99 => 'Net_DNS2_RR_SPF', + 104 => 'Net_DNS2_RR_NID', + 105 => 'Net_DNS2_RR_L32', + 106 => 'Net_DNS2_RR_L64', + 107 => 'Net_DNS2_RR_LP', + 108 => 'Net_DNS2_RR_EUI48', + 109 => 'Net_DNS2_RR_EUI64', + + 249 => 'Net_DNS2_RR_TKEY', + 250 => 'Net_DNS2_RR_TSIG', + + // 251 - IXFR - handled as a full zone transfer (252) + // 252 - AXFR - handled as a function call + + 255 => 'Net_DNS2_RR_ANY', + 256 => 'Net_DNS2_RR_URI', + 257 => 'Net_DNS2_RR_CAA', + 258 => 'Net_DNS2_RR_AVC', + 32768 => 'Net_DNS2_RR_TA', + 32769 => 'Net_DNS2_RR_DLV' + ); + + /* + * used to map resource record class names to their id's, and back + */ + public static $classes_by_id = array(); + public static $classes_by_name = array( + + 'IN' => self::RR_CLASS_IN, // RFC 1035 + 'CH' => self::RR_CLASS_CH, // RFC 1035 + 'HS' => self::RR_CLASS_HS, // RFC 1035 + 'NONE' => self::RR_CLASS_NONE, // RFC 2136 + 'ANY' => self::RR_CLASS_ANY // RFC 1035 + ); + + /* + * maps response codes to error messages + */ + public static $result_code_messages = array( + + self::RCODE_NOERROR => 'The request completed successfully.', + self::RCODE_FORMERR => 'The name server was unable to interpret the query.', + self::RCODE_SERVFAIL => 'The name server was unable to process this query due to a problem with the name server.', + self::RCODE_NXDOMAIN => 'The domain name referenced in the query does not exist.', + self::RCODE_NOTIMP => 'The name server does not support the requested kind of query.', + self::RCODE_REFUSED => 'The name server refuses to perform the specified operation for policy reasons.', + self::RCODE_YXDOMAIN => 'Name Exists when it should not.', + self::RCODE_YXRRSET => 'RR Set Exists when it should not.', + self::RCODE_NXRRSET => 'RR Set that should exist does not.', + self::RCODE_NOTAUTH => 'Server Not Authoritative for zone.', + self::RCODE_NOTZONE => 'Name not contained in zone.', + + self::RCODE_BADSIG => 'TSIG Signature Failure.', + self::RCODE_BADKEY => 'Key not recognized.', + self::RCODE_BADTIME => 'Signature out of time window.', + self::RCODE_BADMODE => 'Bad TKEY Mode.', + self::RCODE_BADNAME => 'Duplicate key name.', + self::RCODE_BADALG => 'Algorithm not supported.', + self::RCODE_BADTRUNC => 'Bad truncation.' + ); + + /* + * maps DNS SEC alrorithms to their mnemonics + */ + public static $algorithm_name_to_id = array(); + public static $algorithm_id_to_name = array( + + self::DNSSEC_ALGORITHM_RES => 'RES', + self::DNSSEC_ALGORITHM_RSAMD5 => 'RSAMD5', + self::DNSSEC_ALGORITHM_DH => 'DH', + self::DNSSEC_ALGORITHM_DSA => 'DSA', + self::DNSSEC_ALGORITHM_ECC => 'ECC', + self::DNSSEC_ALGORITHM_RSASHA1 => 'RSASHA1', + self::DNSSEC_ALGORITHM_DSANSEC3SHA1 => 'DSA-NSEC3-SHA1', + self::DSNSEC_ALGORITHM_RSASHA1NSEC3SHA1 => 'RSASHA1-NSEC3-SHA1', + self::DNSSEC_ALGORITHM_RSASHA256 => 'RSASHA256', + self::DNSSEC_ALGORITHM_RSASHA512 => 'RSASHA512', + self::DNSSEC_ALGORITHM_ECCGOST => 'ECC-GOST', + self::DNSSEC_ALGORITHM_INDIRECT => 'INDIRECT', + self::DNSSEC_ALGORITHM_PRIVATEDNS => 'PRIVATEDNS', + self::DNSSEC_ALGORITHM_PRIVATEOID => 'PRIVATEOID' + ); + + /* + * maps DNSSEC digest types to their mnemonics + */ + public static $digest_name_to_id = array(); + public static $digest_id_to_name = array( + + self::DNSSEC_DIGEST_RES => 'RES', + self::DNSSEC_DIGEST_SHA1 => 'SHA-1' + ); + + /* + * Protocols names - RFC 1010 + */ + public static $protocol_by_id = array(); + public static $protocol_by_name = array( + + 'ICMP' => 1, + 'IGMP' => 2, + 'GGP' => 3, + 'ST' => 5, + 'TCP' => 6, + 'UCL' => 7, + 'EGP' => 8, + 'IGP' => 9, + 'BBN-RCC-MON' => 10, + 'NVP-II' => 11, + 'PUP' => 12, + 'ARGUS' => 13, + 'EMCON' => 14, + 'XNET' => 15, + 'CHAOS' => 16, + 'UDP' => 17, + 'MUX' => 18, + 'DCN-MEAS' => 19, + 'HMP' => 20, + 'PRM' => 21, + 'XNS-IDP' => 22, + 'TRUNK-1' => 23, + 'TRUNK-2' => 24, + 'LEAF-1' => 25, + 'LEAF-2' => 26, + 'RDP' => 27, + 'IRTP' => 28, + 'ISO-TP4' => 29, + 'NETBLT' => 30, + 'MFE-NSP' => 31, + 'MERIT-INP' => 32, + 'SEP' => 33, + // 34 - 60 - Unassigned + // 61 - any host internal protocol + 'CFTP' => 62, + // 63 - any local network + 'SAT-EXPAK' => 64, + 'MIT-SUBNET' => 65, + 'RVD' => 66, + 'IPPC' => 67, + // 68 - any distributed file system + 'SAT-MON' => 69, + // 70 - Unassigned + 'IPCV' => 71, + // 72 - 75 - Unassigned + 'BR-SAT-MON' => 76, + // 77 - Unassigned + 'WB-MON' => 78, + 'WB-EXPAK' => 79 + // 80 - 254 - Unassigned + // 255 - Reserved + ); +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Packet.php b/bundled-libs/Net/DNS2/Packet.php new file mode 100644 index 00000000..08e9bf8a --- /dev/null +++ b/bundled-libs/Net/DNS2/Packet.php @@ -0,0 +1,434 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + * This file contains code based off the Net::DNS Perl module by + * Michael Fuhr. + * + * This is the copyright notice from the PERL Net::DNS module: + * + * Copyright (c) 1997-2000 Michael Fuhr. All rights reserved. This + * program is free software; you can redistribute it and/or modify it + * under the same terms as Perl itself. + * + */ + +/** + * This is the base class that holds a standard DNS packet. + * + * The Net_DNS2_Packet_Request and Net_DNS2_Packet_Response classes extend this + * class. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet_Request, Net_DNS2_Packet_Response + * + */ +class Net_DNS2_Packet +{ + /* + * the full binary data and length for this packet + */ + public $rdata; + public $rdlength; + + /* + * the offset pointer used when building/parsing packets + */ + public $offset = 0; + + /* + * Net_DNS2_Header object with the DNS packet header + */ + public $header; + + /* + * array of Net_DNS2_Question objects + * + * used as "zone" for updates per RFC2136 + * + */ + public $question = array(); + + /* + * array of Net_DNS2_RR Objects for Answers + * + * used as "prerequisite" for updates per RFC2136 + * + */ + public $answer = array(); + + /* + * array of Net_DNS2_RR Objects for Authority + * + * used as "update" for updates per RFC2136 + * + */ + public $authority = array(); + + /* + * array of Net_DNS2_RR Objects for Addtitional + */ + public $additional = array(); + + /* + * array of compressed labeles + */ + private $_compressed = array(); + + /** + * magic __toString() method to return the Net_DNS2_Packet as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + $output = $this->header->__toString(); + + foreach ($this->question as $x) { + + $output .= $x->__toString() . "\n"; + } + foreach ($this->answer as $x) { + + $output .= $x->__toString() . "\n"; + } + foreach ($this->authority as $x) { + + $output .= $x->__toString() . "\n"; + } + foreach ($this->additional as $x) { + + $output .= $x->__toString() . "\n"; + } + + return $output; + } + + /** + * returns a full binary DNS packet + * + * @return string + * @throws Net_DNS2_Exception + * @access public + * + */ + public function get() + { + $data = $this->header->get($this); + + foreach ($this->question as $x) { + + $data .= $x->get($this); + } + foreach ($this->answer as $x) { + + $data .= $x->get($this); + } + foreach ($this->authority as $x) { + + $data .= $x->get($this); + } + foreach ($this->additional as $x) { + + $data .= $x->get($this); + } + + return $data; + } + + /** + * applies a standard DNS name compression on the given name/offset + * + * This logic was based on the Net::DNS::Packet::dn_comp() function + * by Michanel Fuhr + * + * @param string $name the name to be compressed + * @param integer &$offset the offset into the given packet object + * + * @return string + * @access public + * + */ + public function compress($name, &$offset) + { + $names = explode('.', $name); + $compname = ''; + + while (!empty($names)) { + + $dname = join('.', $names); + + if (isset($this->_compressed[$dname])) { + + $compname .= pack('n', 0xc000 | $this->_compressed[$dname]); + $offset += 2; + + break; + } + + $this->_compressed[$dname] = $offset; + $first = array_shift($names); + + $length = strlen($first); + if ($length <= 0) { + continue; + } + + // + // truncate see RFC1035 2.3.1 + // + if ($length > 63) { + + $length = 63; + $first = substr($first, 0, $length); + } + + $compname .= pack('Ca*', $length, $first); + $offset += $length + 1; + } + + if (empty($names)) { + + $compname .= pack('C', 0); + $offset++; + } + + return $compname; + } + + /** + * applies a standard DNS name compression on the given name/offset + * + * This logic was based on the Net::DNS::Packet::dn_comp() function + * by Michanel Fuhr + * + * @param string $name the name to be compressed + * + * @return string + * @access public + * + */ + public static function pack($name) + { + $offset = 0; + $names = explode('.', $name); + $compname = ''; + + while (!empty($names)) { + + $first = array_shift($names); + $length = strlen($first); + + $compname .= pack('Ca*', $length, $first); + $offset += $length + 1; + } + + $compname .= "\0"; + $offset++; + + return $compname; + } + + /** + * expands the domain name stored at a given offset in a DNS Packet + * + * This logic was based on the Net::DNS::Packet::dn_expand() function + * by Michanel Fuhr + * + * @param Net_DNS2_Packet &$packet the DNS packet to look in for the domain name + * @param integer &$offset the offset into the given packet object + * + * @return mixed either the domain name or null if it's not found. + * @access public + * + */ + public static function expand(Net_DNS2_Packet &$packet, &$offset) + { + $name = ''; + + while (1) { + if ($packet->rdlength < ($offset + 1)) { + return null; + } + + $xlen = ord($packet->rdata[$offset]); + if ($xlen == 0) { + + ++$offset; + break; + + } else if (($xlen & 0xc0) == 0xc0) { + if ($packet->rdlength < ($offset + 2)) { + + return null; + } + + $ptr = ord($packet->rdata[$offset]) << 8 | + ord($packet->rdata[$offset+1]); + $ptr = $ptr & 0x3fff; + + $name2 = Net_DNS2_Packet::expand($packet, $ptr); + if (is_null($name2)) { + + return null; + } + + $name .= $name2; + $offset += 2; + + break; + } else { + ++$offset; + + if ($packet->rdlength < ($offset + $xlen)) { + + return null; + } + + $elem = ''; + $elem = substr($packet->rdata, $offset, $xlen); + $name .= $elem . '.'; + $offset += $xlen; + } + } + + return trim($name, '.'); + } + + /** + * parses a domain label from a DNS Packet at the given offset + * + * @param Net_DNS2_Packet &$packet the DNS packet to look in for the domain name + * @param integer &$offset the offset into the given packet object + * + * @return mixed either the domain name or null if it's not found. + * @access public + * + */ + public static function label(Net_DNS2_Packet &$packet, &$offset) + { + $name = ''; + + if ($packet->rdlength < ($offset + 1)) { + + return null; + } + + $xlen = ord($packet->rdata[$offset]); + ++$offset; + + if (($xlen + $offset) > $packet->rdlength) { + + $name = substr($packet->rdata, $offset); + $offset = $packet->rdlength; + } else { + + $name = substr($packet->rdata, $offset, $xlen); + $offset += $xlen; + } + + return $name; + } + + /** + * copies the contents of the given packet, to the local packet object. this + * function intentionally ignores some of the packet data. + * + * @param Net_DNS2_Packet $packet the DNS packet to copy the data from + * + * @return boolean + * @access public + * + */ + public function copy(Net_DNS2_Packet $packet) + { + $this->header = $packet->header; + $this->question = $packet->question; + $this->answer = $packet->answer; + $this->authority = $packet->authority; + $this->additional = $packet->additional; + + return true; + } + + /** + * resets the values in the current packet object + * + * @return boolean + * @access public + * + */ + public function reset() + { + $this->header->id = $this->header->nextPacketId(); + $this->rdata = ''; + $this->rdlength = 0; + $this->offset = 0; + $this->answer = array(); + $this->authority = array(); + $this->additional = array(); + $this->_compressed = array(); + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Packet/Request.php b/bundled-libs/Net/DNS2/Packet/Request.php new file mode 100644 index 00000000..2e013aec --- /dev/null +++ b/bundled-libs/Net/DNS2/Packet/Request.php @@ -0,0 +1,217 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * This class handles building new DNS request packets; packets used for DNS + * queries and updates. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Packet_Request extends Net_DNS2_Packet +{ + /** + * Constructor - builds a new Net_DNS2_Packet_Request object + * + * @param string $name the domain name for the packet + * @param string $type the DNS RR type for the packet + * @param string $class the DNS class for the packet + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($name, $type = null, $class = null) + { + $this->set($name, $type, $class); + } + + /** + * builds a new Net_DNS2_Packet_Request object + * + * @param string $name the domain name for the packet + * @param string $type the DNS RR type for the packet + * @param string $class the DNS class for the packet + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set($name, $type = 'A', $class = 'IN') + { + // + // generate a new header + // + $this->header = new Net_DNS2_Header; + + // + // add a new question + // + $q = new Net_DNS2_Question(); + + // + // allow queries directly to . for the root name servers + // + if ($name != '.') { + $name = trim(strtolower($name), " \t\n\r\0\x0B."); + } + + $type = strtoupper(trim($type)); + $class = strtoupper(trim($class)); + + // + // check that the input string has some data in it + // + if (empty($name)) { + + throw new Net_DNS2_Exception( + 'empty query string provided', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + // + // if the type is "*", rename it to "ANY"- both are acceptable. + // + if ($type == '*') { + + $type = 'ANY'; + } + + // + // check that the type and class are valid + // + if ( (!isset(Net_DNS2_Lookups::$rr_types_by_name[$type])) + || (!isset(Net_DNS2_Lookups::$classes_by_name[$class])) + ) { + throw new Net_DNS2_Exception( + 'invalid type (' . $type . ') or class (' . $class . ') specified.', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + if ($type == 'PTR') { + + // + // if it's a PTR request for an IP address, then make sure we tack on + // the arpa domain. + // + // there are other types of PTR requests, so if an IP adress doesn't match, + // then just let it flow through and assume it's a hostname + // + if (Net_DNS2::isIPv4($name) == true) { + + // + // IPv4 + // + $name = implode('.', array_reverse(explode('.', $name))); + $name .= '.in-addr.arpa'; + + } else if (Net_DNS2::isIPv6($name) == true) { + + // + // IPv6 + // + $e = Net_DNS2::expandIPv6($name); + if ($e !== false) { + + $name = implode( + '.', array_reverse(str_split(str_replace(':', '', $e))) + ); + + $name .= '.ip6.arpa'; + + } else { + + throw new Net_DNS2_Exception( + 'unsupported PTR value: ' . $name, + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + } + } + + // + // store the data + // + $q->qname = $name; + $q->qtype = $type; + $q->qclass = $class; + + $this->question[] = $q; + + // + // the answer, authority and additional are empty; they can be modified + // after the request is created for UPDATE requests if needed. + // + $this->answer = array(); + $this->authority = array(); + $this->additional = array(); + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Packet/Response.php b/bundled-libs/Net/DNS2/Packet/Response.php new file mode 100644 index 00000000..604a4392 --- /dev/null +++ b/bundled-libs/Net/DNS2/Packet/Response.php @@ -0,0 +1,194 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * This class handles building new DNS response packets; it parses binary packed + * packets that come off the wire + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Packet_Response extends Net_DNS2_Packet +{ + /* + * The name servers that this response came from + */ + public $answer_from; + + /* + * The socket type the answer came from (TCP/UDP) + */ + public $answer_socket_type; + + /* + * The query response time in microseconds + */ + public $response_time = 0; + + /** + * Constructor - builds a new Net_DNS2_Packet_Response object + * + * @param string $data binary DNS packet + * @param integer $size the length of the DNS packet + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($data, $size) + { + $this->set($data, $size); + } + + /** + * builds a new Net_DNS2_Packet_Response object + * + * @param string $data binary DNS packet + * @param integer $size the length of the DNS packet + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set($data, $size) + { + // + // store the full packet + // + $this->rdata = $data; + $this->rdlength = $size; + + // + // parse the header + // + // we don't bother checking the size earlier, because the first thing the + // header class does, is check the size and throw and exception if it's + // invalid. + // + $this->header = new Net_DNS2_Header($this); + + // + // if the truncation bit is set, then just return right here, because the + // rest of the packet is probably empty; and there's no point in processing + // anything else. + // + // we also don't need to worry about checking to see if the the header is + // null or not, since the Net_DNS2_Header() constructor will throw an + // exception if the packet is invalid. + // + if ($this->header->tc == 1) { + + return false; + } + + // + // parse the questions + // + for ($x = 0; $x < $this->header->qdcount; ++$x) { + + $this->question[$x] = new Net_DNS2_Question($this); + } + + // + // parse the answers + // + for ($x = 0; $x < $this->header->ancount; ++$x) { + + $o = Net_DNS2_RR::parse($this); + if (!is_null($o)) { + + $this->answer[] = $o; + } + } + + // + // parse the authority section + // + for ($x = 0; $x < $this->header->nscount; ++$x) { + + $o = Net_DNS2_RR::parse($this); + if (!is_null($o)) { + + $this->authority[] = $o; + } + } + + // + // parse the additional section + // + for ($x = 0; $x < $this->header->arcount; ++$x) { + + $o = Net_DNS2_RR::parse($this); + if (!is_null($o)) { + + $this->additional[] = $o; + } + } + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/PrivateKey.php b/bundled-libs/Net/DNS2/PrivateKey.php new file mode 100644 index 00000000..35ac58bc --- /dev/null +++ b/bundled-libs/Net/DNS2/PrivateKey.php @@ -0,0 +1,424 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2011 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * SSL Private Key container class + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_PrivateKey +{ + /* + * the filename that was loaded; stored for reference + */ + public $filename; + + /* + * the keytag for the signature + */ + public $keytag; + + /* + * the sign name for the signature + */ + public $signname; + + /* + * the algorithm used for the signature + */ + public $algorithm; + + /* + * the key format fo the signature + */ + public $key_format; + + /* + * the openssl private key id + */ + public $instance; + + /* + * RSA: modulus + */ + private $_modulus; + + /* + * RSA: public exponent + */ + private $_public_exponent; + + /* + * RSA: rivate exponent + */ + private $_private_exponent; + + /* + * RSA: prime1 + */ + private $_prime1; + + /* + * RSA: prime2 + */ + private $_prime2; + + /* + * RSA: exponent 1 + */ + private $_exponent1; + + /* + * RSA: exponent 2 + */ + private $_exponent2; + + /* + * RSA: coefficient + */ + private $_coefficient; + + /* + * DSA: prime + */ + public $prime; + + /* + * DSA: subprime + */ + public $subprime; + + /* + * DSA: base + */ + public $base; + + /* + * DSA: private value + */ + public $private_value; + + /* + * DSA: public value + */ + public $public_value; + + /** + * Constructor - base constructor the private key container class + * + * @param string $file path to a private-key file to parse and load + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($file = null) + { + if (isset($file)) { + $this->parseFile($file); + } + } + + /** + * parses a private key file generated by dnssec-keygen + * + * @param string $file path to a private-key file to parse and load + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function parseFile($file) + { + // + // check for OpenSSL + // + if (extension_loaded('openssl') === false) { + + throw new Net_DNS2_Exception( + 'the OpenSSL extension is required to use parse private key.', + Net_DNS2_Lookups::E_OPENSSL_UNAVAIL + ); + } + + // + // check to make sure the file exists + // + if (is_readable($file) == false) { + + throw new Net_DNS2_Exception( + 'invalid private key file: ' . $file, + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // get the base filename, and parse it for the local value + // + $keyname = basename($file); + if (strlen($keyname) == 0) { + + throw new Net_DNS2_Exception( + 'failed to get basename() for: ' . $file, + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // parse the keyname + // + if (preg_match("/K(.*)\.\+(\d{3})\+(\d*)\.private/", $keyname, $matches)) { + + $this->signname = $matches[1]; + $this->algorithm = intval($matches[2]); + $this->keytag = intval($matches[3]); + + } else { + + throw new Net_DNS2_Exception( + 'file ' . $keyname . ' does not look like a private key file!', + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // read all the data from the + // + $data = file($file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); + if (count($data) == 0) { + + throw new Net_DNS2_Exception( + 'file ' . $keyname . ' is empty!', + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + foreach ($data as $line) { + + list($key, $value) = explode(':', $line); + + $key = trim($key); + $value = trim($value); + + switch(strtolower($key)) { + + case 'private-key-format': + $this->_key_format = $value; + break; + + case 'algorithm': + if ($this->algorithm != $value) { + throw new Net_DNS2_Exception( + 'Algorithm mis-match! filename is ' . $this->algorithm . + ', contents say ' . $value, + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + break; + + // + // RSA + // + case 'modulus': + $this->_modulus = $value; + break; + + case 'publicexponent': + $this->_public_exponent = $value; + break; + + case 'privateexponent': + $this->_private_exponent = $value; + break; + + case 'prime1': + $this->_prime1 = $value; + break; + + case 'prime2': + $this->_prime2 = $value; + break; + + case 'exponent1': + $this->_exponent1 = $value; + break; + + case 'exponent2': + $this->_exponent2 = $value; + break; + + case 'coefficient': + $this->_coefficient = $value; + break; + + // + // DSA - this won't work in PHP until the OpenSSL extension is better + // + case 'prime(p)': + $this->prime = $value; + break; + + case 'subprime(q)': + $this->subprime = $value; + break; + + case 'base(g)': + $this->base = $value; + break; + + case 'private_value(x)': + $this->private_value = $value; + break; + + case 'public_value(y)': + $this->public_value = $value; + break; + + default: + throw new Net_DNS2_Exception( + 'unknown private key data: ' . $key . ': ' . $value, + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + } + + // + // generate the private key + // + $args = array(); + + switch($this->algorithm) { + + // + // RSA + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + + $args = array( + + 'rsa' => array( + + 'n' => base64_decode($this->_modulus), + 'e' => base64_decode($this->_public_exponent), + 'd' => base64_decode($this->_private_exponent), + 'p' => base64_decode($this->_prime1), + 'q' => base64_decode($this->_prime2), + 'dmp1' => base64_decode($this->_exponent1), + 'dmq1' => base64_decode($this->_exponent2), + 'iqmp' => base64_decode($this->_coefficient) + ) + ); + + break; + + // + // DSA - this won't work in PHP until the OpenSSL extension is better + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSA: + + $args = array( + + 'dsa' => array( + + 'p' => base64_decode($this->prime), + 'q' => base64_decode($this->subprime), + 'g' => base64_decode($this->base), + 'priv_key' => base64_decode($this->private_value), + 'pub_key' => base64_decode($this->public_value) + ) + ); + + break; + + default: + throw new Net_DNS2_Exception( + 'we only currently support RSAMD5 and RSASHA1 encryption.', + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // generate and store the key + // + $this->instance = openssl_pkey_new($args); + if ($this->instance === false) { + throw new Net_DNS2_Exception( + openssl_error_string(), + Net_DNS2_Lookups::E_OPENSSL_ERROR + ); + } + + // + // store the filename incase we need it for something + // + $this->filename = $file; + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Question.php b/bundled-libs/Net/DNS2/Question.php new file mode 100644 index 00000000..893f0c93 --- /dev/null +++ b/bundled-libs/Net/DNS2/Question.php @@ -0,0 +1,244 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * This class handles parsing and constructing the question sectino of DNS + * packets. + * + * This is referred to as the "zone" for update per RFC2136 + * + * DNS question format - RFC1035 section 4.1.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | | + * / QNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QTYPE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QCLASS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Question +{ + /* + * The name of the question + * + * referred to as "zname" for updates per RFC2136 + * + */ + public $qname; + + /* + * The RR type for the questino + * + * referred to as "ztype" for updates per RFC2136 + * + */ + public $qtype; + + /* + * The RR class for the questino + * + * referred to as "zclass" for updates per RFC2136 + * + */ + public $qclass; + + /** + * Constructor - builds a new Net_DNS2_Question object + * + * @param mixed &$packet either a Net_DNS2_Packet object, or null to + * build an empty object + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null) + { + if (!is_null($packet)) { + + $this->set($packet); + } else { + + $this->qname = ''; + $this->qtype = 'A'; + $this->qclass = 'IN'; + } + } + + /** + * magic __toString() function to return the Net_DNS2_Question object as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + return ";;\n;; Question:\n;;\t " . $this->qname . '. ' . + $this->qtype . ' ' . $this->qclass . "\n"; + } + + /** + * builds a new Net_DNS2_Header object from a Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set(Net_DNS2_Packet &$packet) + { + // + // expand the name + // + $this->qname = $packet->expand($packet, $packet->offset); + if ($packet->rdlength < ($packet->offset + 4)) { + + throw new Net_DNS2_Exception( + 'invalid question section: to small', + Net_DNS2_Lookups::E_QUESTION_INVALID + ); + } + + // + // unpack the type and class + // + $type = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + $class = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + // + // validate it + // + $type_name = Net_DNS2_Lookups::$rr_types_by_id[$type]; + $class_name = Net_DNS2_Lookups::$classes_by_id[$class]; + + if ( (!isset($type_name)) || (!isset($class_name)) ) { + + throw new Net_DNS2_Exception( + 'invalid question section: invalid type (' . $type . + ') or class (' . $class . ') specified.', + Net_DNS2_Lookups::E_QUESTION_INVALID + ); + } + + // + // store it + // + $this->qtype = $type_name; + $this->qclass = $class_name; + + return true; + } + + /** + * returns a binary packed Net_DNS2_Question object + * + * @param Net_DNS2_Packet &$packet the Net_DNS2_Packet object this question is + * part of. This needs to be passed in so that + * the compressed qname value can be packed in + * with the names of the other parts of the + * packet. + * + * @return string + * @throws Net_DNS2_Exception + * @access public + * + */ + public function get(Net_DNS2_Packet &$packet) + { + // + // validate the type and class + // + $type = Net_DNS2_Lookups::$rr_types_by_name[$this->qtype]; + $class = Net_DNS2_Lookups::$classes_by_name[$this->qclass]; + + if ( (!isset($type)) || (!isset($class)) ) { + + throw new Net_DNS2_Exception( + 'invalid question section: invalid type (' . $this->qtype . + ') or class (' . $this->qclass . ') specified.', + Net_DNS2_Lookups::E_QUESTION_INVALID + ); + } + + $data = $packet->compress($this->qname, $packet->offset); + + $data .= chr($type >> 8) . chr($type) . chr($class >> 8) . chr($class); + $packet->offset += 4; + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR.php b/bundled-libs/Net/DNS2/RR.php new file mode 100644 index 00000000..876205fa --- /dev/null +++ b/bundled-libs/Net/DNS2/RR.php @@ -0,0 +1,644 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * This is the base class for DNS Resource Records + * + * Each resource record type (defined in RR/*.php) extends this class for + * base functionality. + * + * This class handles parsing and constructing the common parts of the DNS + * resource records, while the RR specific functionality is handled in each + * child class. + * + * DNS resource record format - RFC1035 section 4.1.3 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | | + * / / + * / NAME / + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | TYPE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | CLASS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | TTL | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | RDLENGTH | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| + * / RDATA / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +abstract class Net_DNS2_RR +{ + /* + * The name of the resource record + */ + public $name; + + /* + * The resource record type + */ + public $type; + + /* + * The resouce record class + */ + public $class; + + /* + * The time to live for this resource record + */ + public $ttl; + + /* + * The length of the rdata field + */ + public $rdlength; + + /* + * The resource record specific data as a packed binary string + */ + public $rdata; + + /** + * abstract definition - method to return a RR as a string; not to + * be confused with the __toString() magic method. + * + * @return string + * @access protected + * + */ + abstract protected function rrToString(); + + /** + * abstract definition - parses a RR from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + abstract protected function rrFromString(array $rdata); + + /** + * abstract definition - sets a Net_DNS2_RR from a Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + abstract protected function rrSet(Net_DNS2_Packet &$packet); + + /** + * abstract definition - returns a binary packet DNS RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed string or + * null on failure + * @access protected + * + */ + abstract protected function rrGet(Net_DNS2_Packet &$packet); + + /** + * Constructor - builds a new Net_DNS2_RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet or null to create + * an empty object + * @param array $rr an array with RR parse values or null to + * create an empty object + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null) + { + if ( (!is_null($packet)) && (!is_null($rr)) ) { + + if ($this->set($packet, $rr) == false) { + + throw new Net_DNS2_Exception( + 'failed to generate resource record', + Net_DNS2_Lookups::E_RR_INVALID + ); + } + } else { + + $class = Net_DNS2_Lookups::$rr_types_class_to_id[get_class($this)]; + if (isset($class)) { + + $this->type = Net_DNS2_Lookups::$rr_types_by_id[$class]; + } + + $this->class = 'IN'; + $this->ttl = 86400; + } + } + + /** + * magic __toString() method to return the Net_DNS2_RR object object as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + return $this->name . '. ' . $this->ttl . ' ' . $this->class . + ' ' . $this->type . ' ' . $this->rrToString(); + } + + /** + * return a formatted string; if a string has spaces in it, then return + * it with double quotes around it, otherwise, return it as it was passed in. + * + * @param string $string the string to format + * + * @return string + * @access protected + * + */ + protected function formatString($string) + { + return '"' . str_replace('"', '\"', trim($string, '"')) . '"'; + } + + /** + * builds an array of strings from an array of chunks of text split by spaces + * + * @param array $chunks an array of chunks of text split by spaces + * + * @return array + * @access protected + * + */ + protected function buildString(array $chunks) + { + $data = array(); + $c = 0; + $in = false; + + foreach ($chunks as $r) { + + $r = trim($r); + if (strlen($r) == 0) { + continue; + } + + if ( ($r[0] == '"') + && ($r[strlen($r) - 1] == '"') + && ($r[strlen($r) - 2] != '\\') + ) { + + $data[$c] = $r; + ++$c; + $in = false; + + } else if ($r[0] == '"') { + + $data[$c] = $r; + $in = true; + + } else if ( ($r[strlen($r) - 1] == '"') + && ($r[strlen($r) - 2] != '\\') + ) { + + $data[$c] .= ' ' . $r; + ++$c; + $in = false; + + } else { + + if ($in == true) { + $data[$c] .= ' ' . $r; + } else { + $data[$c++] = $r; + } + } + } + + foreach ($data as $index => $string) { + + $data[$index] = str_replace('\"', '"', trim($string, '"')); + } + + return $data; + } + + /** + * builds a new Net_DNS2_RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet or null to create + * an empty object + * @param array $rr an array with RR parse values or null to + * create an empty object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set(Net_DNS2_Packet &$packet, array $rr) + { + $this->name = $rr['name']; + $this->type = Net_DNS2_Lookups::$rr_types_by_id[$rr['type']]; + + // + // for RR OPT (41), the class value includes the requestors UDP payload size, + // and not a class value + // + if ($this->type == 'OPT') { + $this->class = $rr['class']; + } else { + $this->class = Net_DNS2_Lookups::$classes_by_id[$rr['class']]; + } + + $this->ttl = $rr['ttl']; + $this->rdlength = $rr['rdlength']; + $this->rdata = substr($packet->rdata, $packet->offset, $rr['rdlength']); + + return $this->rrSet($packet); + } + + /** + * returns a binary packed DNS RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet used for + * compressing names + * + * @return string + * @throws Net_DNS2_Exception + * @access public + * + */ + public function get(Net_DNS2_Packet &$packet) + { + $data = ''; + $rdata = ''; + + // + // pack the name + // + $data = $packet->compress($this->name, $packet->offset); + + // + // pack the main values + // + if ($this->type == 'OPT') { + + // + // pre-build the TTL value + // + $this->preBuild(); + + // + // the class value is different for OPT types + // + $data .= pack( + 'nnN', + Net_DNS2_Lookups::$rr_types_by_name[$this->type], + $this->class, + $this->ttl + ); + } else { + + $data .= pack( + 'nnN', + Net_DNS2_Lookups::$rr_types_by_name[$this->type], + Net_DNS2_Lookups::$classes_by_name[$this->class], + $this->ttl + ); + } + + // + // increase the offset, and allow for the rdlength + // + $packet->offset += 10; + + // + // get the RR specific details + // + if ($this->rdlength != -1) { + + $rdata = $this->rrGet($packet); + } + + // + // add the RR + // + $data .= pack('n', strlen($rdata)) . $rdata; + + return $data; + } + + /** + * parses a binary packet, and returns the appropriate Net_DNS2_RR object, + * based on the RR type of the binary content. + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet used for + * decompressing names + * + * @return mixed returns a new Net_DNS2_RR_* object for + * the given RR + * @throws Net_DNS2_Exception + * @access public + * + */ + public static function parse(Net_DNS2_Packet &$packet) + { + $object = array(); + + // + // expand the name + // + $object['name'] = $packet->expand($packet, $packet->offset); + if (is_null($object['name'])) { + + throw new Net_DNS2_Exception( + 'failed to parse resource record: failed to expand name.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + if ($packet->rdlength < ($packet->offset + 10)) { + + throw new Net_DNS2_Exception( + 'failed to parse resource record: packet too small.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + // + // unpack the RR details + // + $object['type'] = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + $object['class'] = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + $object['ttl'] = ord($packet->rdata[$packet->offset++]) << 24 | + ord($packet->rdata[$packet->offset++]) << 16 | + ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + $object['rdlength'] = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + if ($packet->rdlength < ($packet->offset + $object['rdlength'])) { + return null; + } + + // + // lookup the class to use + // + $o = null; + $class = Net_DNS2_Lookups::$rr_types_id_to_class[$object['type']]; + + if (isset($class)) { + + $o = new $class($packet, $object); + if ($o) { + + $packet->offset += $object['rdlength']; + } + } else { + + throw new Net_DNS2_Exception( + 'un-implemented resource record type: ' . $object['type'], + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + return $o; + } + + /** + * cleans up some RR data + * + * @param string $data the text string to clean + * + * @return string returns the cleaned string + * + * @access public + * + */ + public function cleanString($data) + { + return strtolower(rtrim($data, '.')); + } + + /** + * parses a standard RR format lines, as defined by rfc1035 (kinda) + * + * In our implementation, the domain *must* be specified- format must be + * + * [] [] + * or + * [] [] + * + * name, title, class and type are parsed by this function, rdata is passed + * to the RR specific classes for parsing. + * + * @param string $line a standard DNS config line + * + * @return mixed returns a new Net_DNS2_RR_* object for the given RR + * @throws Net_DNS2_Exception + * @access public + * + */ + public static function fromString($line) + { + if (strlen($line) == 0) { + throw new Net_DNS2_Exception( + 'empty config line provided.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + $name = ''; + $type = ''; + $class = 'IN'; + $ttl = 86400; + + // + // split the line by spaces + // + $values = preg_split('/[\s]+/', $line); + if (count($values) < 3) { + + throw new Net_DNS2_Exception( + 'failed to parse config: minimum of name, type and rdata required.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + // + // assume the first value is the name + // + $name = trim(strtolower(array_shift($values)), '.'); + + // + // The next value is either a TTL, Class or Type + // + foreach ($values as $value) { + + switch(true) { + case is_numeric($value): + + $ttl = array_shift($values); + break; + + // + // this is here because of a bug in is_numeric() in certain versions of + // PHP on windows. + // + case ($value === 0): + + $ttl = array_shift($values); + break; + + case isset(Net_DNS2_Lookups::$classes_by_name[strtoupper($value)]): + + $class = strtoupper(array_shift($values)); + break; + + case isset(Net_DNS2_Lookups::$rr_types_by_name[strtoupper($value)]): + + $type = strtoupper(array_shift($values)); + break 2; + break; + + default: + + throw new Net_DNS2_Exception( + 'invalid config line provided: unknown file: ' . $value, + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + } + + // + // lookup the class to use + // + $o = null; + $class_name = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + + if (isset($class_name)) { + + $o = new $class_name; + if (!is_null($o)) { + + // + // set the parsed values + // + $o->name = $name; + $o->class = $class; + $o->ttl = $ttl; + + // + // parse the rdata + // + if ($o->rrFromString($values) === false) { + + throw new Net_DNS2_Exception( + 'failed to parse rdata for config: ' . $line, + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + } else { + + throw new Net_DNS2_Exception( + 'failed to create new RR record for type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + } else { + + throw new Net_DNS2_Exception( + 'un-implemented resource record type: '. $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + return $o; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/A.php b/bundled-libs/Net/DNS2/RR/A.php new file mode 100644 index 00000000..0e8ed33f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/A.php @@ -0,0 +1,156 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * A Resource Record - RFC1035 section 3.4.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ADDRESS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_A extends Net_DNS2_RR +{ + /* + * The IPv4 address in quad-dotted notation + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + if (Net_DNS2::isIPv4($value) == true) { + + $this->address = $value; + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->address = inet_ntop($this->rdata); + if ($this->address !== false) { + + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $packet->offset += 4; + return inet_pton($this->address); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/AAAA.php b/bundled-libs/Net/DNS2/RR/AAAA.php new file mode 100644 index 00000000..df81370f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/AAAA.php @@ -0,0 +1,177 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * A Resource Record - RFC1035 section 3.4.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | | + * | | + * | | + * | ADDRESS | + * | | + * | (128 bit) | + * | | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_AAAA extends Net_DNS2_RR +{ + /* + * the IPv6 address in the preferred hexadecimal values of the eight + * 16-bit pieces + * per RFC1884 + * + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // expand out compressed formats + // + $value = array_shift($rdata); + if (Net_DNS2::isIPv6($value) == true) { + + $this->address = $value; + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + // + // must be 8 x 16bit chunks, or 16 x 8bit + // + if ($this->rdlength == 16) { + + // + // PHP's inet_ntop returns IPv6 addresses in their compressed form, + // but we want to keep with the preferred standard, so we'll parse + // it manually. + // + $x = unpack('n8', $this->rdata); + if (count($x) == 8) { + + $this->address = vsprintf('%x:%x:%x:%x:%x:%x:%x:%x', $x); + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $packet->offset += 16; + return inet_pton($this->address); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/AFSDB.php b/bundled-libs/Net/DNS2/RR/AFSDB.php new file mode 100644 index 00000000..724f87f8 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/AFSDB.php @@ -0,0 +1,174 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * AFSDB Resource Record - RFC1183 section 1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | SUBTYPE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / HOSTNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_AFSDB extends Net_DNS2_RR +{ + /* + * The AFSDB sub type + */ + public $subtype; + + /* + * The AFSDB hostname + */ + public $hostname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->subtype . ' ' . $this->cleanString($this->hostname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->subtype = array_shift($rdata); + $this->hostname = $this->cleanString(array_shift($rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the subtype + // + $x = unpack('nsubtype', $this->rdata); + + $this->subtype = $x['subtype']; + $offset = $packet->offset + 2; + + $this->hostname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->hostname) > 0) { + + $data = pack('n', $this->subtype); + $packet->offset += 2; + + $data .= $packet->compress($this->hostname, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/ANY.php b/bundled-libs/Net/DNS2/RR/ANY.php new file mode 100644 index 00000000..617bb3e9 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/ANY.php @@ -0,0 +1,129 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * This is only used for generating an empty ANY RR. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_ANY extends Net_DNS2_RR +{ + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + return true; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + return ''; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/APL.php b/bundled-libs/Net/DNS2/RR/APL.php new file mode 100644 index 00000000..15842104 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/APL.php @@ -0,0 +1,343 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.0 + * + */ + +/** + * APL Resource Record - RFC3123 + * + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | ADDRESSFAMILY | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | PREFIX | N | AFDLENGTH | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * / AFDPART / + * | | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_APL extends Net_DNS2_RR +{ + /* + * a list of all the address prefix list items + */ + public $apl_items = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = ''; + + foreach ($this->apl_items as $item) { + + if ($item['n'] == 1) { + + $out .= '!'; + } + + $out .= $item['address_family'] . ':' . + $item['afd_part'] . '/' . $item['prefix'] . ' '; + } + + return trim($out); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + foreach ($rdata as $item) { + + if (preg_match('/^(!?)([1|2])\:([^\/]*)\/([0-9]{1,3})$/', $item, $m)) { + + $i = array( + + 'address_family' => $m[2], + 'prefix' => $m[4], + 'n' => ($m[1] == '!') ? 1 : 0, + 'afd_part' => strtolower($m[3]) + ); + + $address = $this->_trimZeros( + $i['address_family'], $i['afd_part'] + ); + + $i['afd_length'] = count(explode('.', $address)); + + $this->apl_items[] = $i; + } + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = 0; + + while ($offset < $this->rdlength) { + + // + // unpack the family, prefix, negate and length values + // + $x = unpack( + 'naddress_family/Cprefix/Cextra', substr($this->rdata, $offset) + ); + + $item = array( + + 'address_family' => $x['address_family'], + 'prefix' => $x['prefix'], + 'n' => ($x['extra'] >> 7) & 0x1, + 'afd_length' => $x['extra'] & 0xf + ); + + switch($item['address_family']) { + + case 1: + $r = unpack( + 'C*', substr($this->rdata, $offset + 4, $item['afd_length']) + ); + if (count($r) < 4) { + + for ($c=count($r)+1; $c<4+1; $c++) { + + $r[$c] = 0; + } + } + + $item['afd_part'] = implode('.', $r); + + break; + case 2: + $r = unpack( + 'C*', substr($this->rdata, $offset + 4, $item['afd_length']) + ); + if (count($r) < 8) { + + for ($c=count($r)+1; $c<8+1; $c++) { + + $r[$c] = 0; + } + } + + $item['afd_part'] = sprintf( + '%x:%x:%x:%x:%x:%x:%x:%x', + $r[1], $r[2], $r[3], $r[4], $r[5], $r[6], $r[7], $r[8] + ); + + break; + default: + return false; + } + + $this->apl_items[] = $item; + + $offset += 4 + $item['afd_length']; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (count($this->apl_items) > 0) { + + $data = ''; + + foreach ($this->apl_items as $item) { + + // + // pack the address_family and prefix values + // + $data .= pack( + 'nCC', + $item['address_family'], + $item['prefix'], + ($item['n'] << 7) | $item['afd_length'] + ); + + switch($item['address_family']) { + case 1: + $address = explode( + '.', + $this->_trimZeros($item['address_family'], $item['afd_part']) + ); + + foreach ($address as $b) { + $data .= chr($b); + } + break; + case 2: + $address = explode( + ':', + $this->_trimZeros($item['address_family'], $item['afd_part']) + ); + + foreach ($address as $b) { + $data .= pack('H', $b); + } + break; + default: + return null; + } + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } + + /** + * returns an IP address with the right-hand zero's trimmed + * + * @param integer $family the IP address family from the rdata + * @param string $address the IP address + * + * @return string the trimmed IP addresss. + * + * @access private + * + */ + private function _trimZeros($family, $address) + { + $a = array(); + + switch($family) { + case 1: + $a = array_reverse(explode('.', $address)); + break; + case 2: + $a = array_reverse(explode(':', $address)); + break; + default: + return ''; + } + + foreach ($a as $value) { + + if ($value === '0') { + + array_shift($a); + } + } + + $out = ''; + + switch($family) { + case 1: + $out = implode('.', array_reverse($a)); + break; + case 2: + $out = implode(':', array_reverse($a)); + break; + default: + return ''; + } + + return $out; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/ATMA.php b/bundled-libs/Net/DNS2/RR/ATMA.php new file mode 100644 index 00000000..4eeca9f1 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/ATMA.php @@ -0,0 +1,210 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * ATMA Resource Record + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | FORMAT | | + * | +--+--+--+--+--+--+--+--+ + * / ADDRESS / + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_ATMA extends Net_DNS2_RR +{ + /* + * One octet that indicates the format of ADDRESS. The two possible values + * for FORMAT are value 0 indicating ATM End System Address (AESA) format + * and value 1 indicating E.164 format + */ + public $format; + + /* + * The IPv4 address in quad-dotted notation + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + if (ctype_xdigit($value) == true) { + + $this->format = 0; + $this->address = $value; + + } else if (is_numeric($value) == true) { + + $this->format = 1; + $this->address = $value; + + } else { + + return false; + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the format + // + $x = unpack('Cformat/N*address', $this->rdata); + + $this->format = $x['format']; + + if ($this->format == 0) { + + $a = unpack('@1/H*address', $this->rdata); + + $this->address = $a['address']; + + } else if ($this->format == 1) { + + $this->address = substr($this->rdata, 1, $this->rdlength - 1); + + } else { + + return false; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = chr($this->format); + + if ($this->format == 0) { + + $data .= pack('H*', $this->address); + + } else if ($this->format == 1) { + + $data .= $this->address; + + } else { + + return null; + } + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/AVC.php b/bundled-libs/Net/DNS2/RR/AVC.php new file mode 100644 index 00000000..851d87a4 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/AVC.php @@ -0,0 +1,75 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2016 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.2 + * + */ + +/** + * The AVC RR is implemented exactly like the TXT record, so + * for now we just extend the TXT RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_AVC extends Net_DNS2_RR_TXT +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CAA.php b/bundled-libs/Net/DNS2/RR/CAA.php new file mode 100644 index 00000000..05cfba18 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CAA.php @@ -0,0 +1,179 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2011 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * CAA Resource Record - http://tools.ietf.org/html/draft-ietf-pkix-caa-03 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | FLAGS | TAG LENGTH | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TAG / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CAA extends Net_DNS2_RR +{ + /* + * The critcal flag + */ + public $flags; + + /* + * The property identifier + */ + public $tag; + + /* + * The property value + */ + public $value; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->flags . ' ' . $this->tag . ' "' . + trim($this->cleanString($this->value), '"') . '"'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->flags = array_shift($rdata); + $this->tag = array_shift($rdata); + + $this->value = trim($this->cleanString(implode($rdata, ' ')), '"'); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the flags and tag length + // + $x = unpack('Cflags/Ctag_length', $this->rdata); + + $this->flags = $x['flags']; + $offset = 2; + + $this->tag = substr($this->rdata, $offset, $x['tag_length']); + $offset += $x['tag_length']; + + $this->value = substr($this->rdata, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->value) > 0) { + + $data = chr($this->flags); + $data .= chr(strlen($this->tag)) . $this->tag . $this->value; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +?> diff --git a/bundled-libs/Net/DNS2/RR/CDNSKEY.php b/bundled-libs/Net/DNS2/RR/CDNSKEY.php new file mode 100644 index 00000000..d3b331c8 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CDNSKEY.php @@ -0,0 +1,77 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2014 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.0 + * + */ + +/** + * The CDNSKEY RR is implemented exactly like the DNSKEY record, so + * for now we just extend the DNSKEY RR and use it. + * + * http://www.rfc-editor.org/rfc/rfc7344.txt + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CDNSKEY extends Net_DNS2_RR_DNSKEY +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CDS.php b/bundled-libs/Net/DNS2/RR/CDS.php new file mode 100644 index 00000000..4f24367d --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CDS.php @@ -0,0 +1,77 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2011 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * The CDS RR is implemented exactly like the DS record, so + * for now we just extend the DS RR and use it. + * + * http://www.rfc-editor.org/rfc/rfc7344.txt + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CDS extends Net_DNS2_RR_DS +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CERT.php b/bundled-libs/Net/DNS2/RR/CERT.php new file mode 100644 index 00000000..c6748310 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CERT.php @@ -0,0 +1,292 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * CERT Resource Record - RFC4398 section 2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | format | key tag | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | algorithm | / + * +---------------+ certificate or CRL / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CERT extends Net_DNS2_RR +{ + /* + * format's allowed for certificates + */ + const CERT_FORMAT_RES = 0; + const CERT_FORMAT_PKIX = 1; + const CERT_FORMAT_SPKI = 2; + const CERT_FORMAT_PGP = 3; + const CERT_FORMAT_IPKIX = 4; + const CERT_FORMAT_ISPKI = 5; + const CERT_FORMAT_IPGP = 6; + const CERT_FORMAT_ACPKIX = 7; + const CERT_FORMAT_IACPKIX = 8; + const CERT_FORMAT_URI = 253; + const CERT_FORMAT_OID = 254; + + public $cert_format_name_to_id = array(); + public $cert_format_id_to_name = array( + + self::CERT_FORMAT_RES => 'Reserved', + self::CERT_FORMAT_PKIX => 'PKIX', + self::CERT_FORMAT_SPKI => 'SPKI', + self::CERT_FORMAT_PGP => 'PGP', + self::CERT_FORMAT_IPKIX => 'IPKIX', + self::CERT_FORMAT_ISPKI => 'ISPKI', + self::CERT_FORMAT_IPGP => 'IPGP', + self::CERT_FORMAT_ACPKIX => 'ACPKIX', + self::CERT_FORMAT_IACPKIX => 'IACPKIX', + self::CERT_FORMAT_URI => 'URI', + self::CERT_FORMAT_OID => 'OID' + ); + + /* + * certificate format + */ + public $format; + + /* + * key tag + */ + public $keytag; + + /* + * The algorithm used for the CERt + */ + public $algorithm; + + /* + * certificate + */ + public $certificate; + + /** + * we have our own constructor so that we can load our certificate + * information for parsing. + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * @param array $rr a array with parsed RR values + * + * @return + * + */ + public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null) + { + parent::__construct($packet, $rr); + + // + // load the lookup values + // + $this->cert_format_name_to_id = array_flip($this->cert_format_id_to_name); + } + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->format . ' ' . $this->keytag . ' ' . $this->algorithm . + ' ' . base64_encode($this->certificate); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // load and check the format; can be an int, or a mnemonic symbol + // + $this->format = array_shift($rdata); + if (!is_numeric($this->format)) { + + $mnemonic = strtoupper(trim($this->format)); + if (!isset($this->cert_format_name_to_id[$mnemonic])) { + + return false; + } + + $this->format = $this->cert_format_name_to_id[$mnemonic]; + } else { + + if (!isset($this->cert_format_id_to_name[$this->format])) { + + return false; + } + } + + $this->keytag = array_shift($rdata); + + // + // parse and check the algorithm; can be an int, or a mnemonic symbol + // + $this->algorithm = array_shift($rdata); + if (!is_numeric($this->algorithm)) { + + $mnemonic = strtoupper(trim($this->algorithm)); + if (!isset(Net_DNS2_Lookups::$algorithm_name_to_id[$mnemonic])) { + + return false; + } + + $this->algorithm = Net_DNS2_Lookups::$algorithm_name_to_id[ + $mnemonic + ]; + } else { + + if (!isset(Net_DNS2_Lookups::$algorithm_id_to_name[$this->algorithm])) { + return false; + } + } + + // + // parse and base64 decode the certificate + // + // certificates MUST be provided base64 encoded, if not, everything will + // be broken after this point, as we assume it's base64 encoded. + // + $this->certificate = base64_decode(implode(' ', $rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the format, keytag and algorithm + // + $x = unpack('nformat/nkeytag/Calgorithm', $this->rdata); + + $this->format = $x['format']; + $this->keytag = $x['keytag']; + $this->algorithm = $x['algorithm']; + + // + // copy the certificate + // + $this->certificate = substr($this->rdata, 5, $this->rdlength - 5); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->certificate) > 0) { + + $data = pack('nnC', $this->format, $this->keytag, $this->algorithm) . + $this->certificate; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CNAME.php b/bundled-libs/Net/DNS2/RR/CNAME.php new file mode 100644 index 00000000..fcd37917 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CNAME.php @@ -0,0 +1,153 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * CNAME Resource Record - RFC1035 section 3.3.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / CNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CNAME extends Net_DNS2_RR +{ + /* + * The canonical name + */ + public $cname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->cname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->cname = $this->cleanString(array_shift($rdata)); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->cname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->cname) > 0) { + + return $packet->compress($this->cname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CSYNC.php b/bundled-libs/Net/DNS2/RR/CSYNC.php new file mode 100644 index 00000000..c19929b1 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CSYNC.php @@ -0,0 +1,203 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2015 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.1 + * + */ + +/** + * CSYNC Resource Record - RFC 7477 seciond 2.1.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | SOA Serial | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | Flags | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / Type Bit Map / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CSYNC extends Net_DNS2_RR +{ + /* + * serial number + */ + public $serial; + + /* + * flags + */ + public $flags; + + /* + * array of RR type names + */ + public $type_bit_maps = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->serial . ' ' . $this->flags; + + // + // show the RR's + // + foreach ($this->type_bit_maps as $rr) { + + $out .= ' ' . strtoupper($rr); + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->serial = array_shift($rdata); + $this->flags = array_shift($rdata); + + $this->type_bit_maps = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the serial and flags values + // + $x = unpack('@' . $packet->offset . '/Nserial/nflags', $packet->rdata); + + $this->serial = Net_DNS2::expandUint32($x['serial']); + $this->flags = $x['flags']; + + // + // parse out the RR bitmap + // + $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray( + substr($this->rdata, 6) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // pack the serial and flags values + // + $data = pack('Nn', $this->serial, $this->flags); + + // + // convert the array of RR names to a type bitmap + // + $data .= Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps); + + // + // advance the offset + // + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DHCID.php b/bundled-libs/Net/DNS2/RR/DHCID.php new file mode 100644 index 00000000..5c9d65cd --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DHCID.php @@ -0,0 +1,207 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DHCID Resource Record - RFC4701 section 3.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ID Type Code | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | Digest Type | / + * +--+--+--+--+--+--+--+--+ / + * / / + * / Digest / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DHCID extends Net_DNS2_RR +{ + /* + * Identifier type + */ + public $id_type; + + /* + * Digest Type + */ + public $digest_type; + + /* + * The digest + */ + public $digest; + + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = pack('nC', $this->id_type, $this->digest_type); + $out .= base64_decode($this->digest); + + return base64_encode($out); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = base64_decode(array_shift($rdata)); + if (strlen($data) > 0) { + + // + // unpack the id type and digest type + // + $x = unpack('nid_type/Cdigest_type', $data); + + $this->id_type = $x['id_type']; + $this->digest_type = $x['digest_type']; + + // + // copy out the digest + // + $this->digest = base64_encode(substr($data, 3, strlen($data) - 3)); + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the id type and digest type + // + $x = unpack('nid_type/Cdigest_type', $this->rdata); + + $this->id_type = $x['id_type']; + $this->digest_type = $x['digest_type']; + + // + // copy out the digest + // + $this->digest = base64_encode( + substr($this->rdata, 3, $this->rdlength - 3) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->digest) > 0) { + + $data = pack('nC', $this->id_type, $this->digest_type) . + base64_decode($this->digest); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DLV.php b/bundled-libs/Net/DNS2/RR/DLV.php new file mode 100644 index 00000000..d362e78a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DLV.php @@ -0,0 +1,75 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * The DLV RR is implemented exactly like the DS RR; so we just extend that + * class, and use all of it's methods + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DLV extends Net_DNS2_RR_DS +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DNAME.php b/bundled-libs/Net/DNS2/RR/DNAME.php new file mode 100644 index 00000000..139b211c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DNAME.php @@ -0,0 +1,153 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DNAME Resource Record - RFC2672 section 3 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / DNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DNAME extends Net_DNS2_RR +{ + /* + * The target name + */ + public $dname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->dname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->dname = $this->cleanString(array_shift($rdata)); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->dname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->dname) > 0) { + + return $packet->compress($this->dname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DNSKEY.php b/bundled-libs/Net/DNS2/RR/DNSKEY.php new file mode 100644 index 00000000..db79205f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DNSKEY.php @@ -0,0 +1,198 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DNSKEY Resource Record - RFC4034 sction 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Flags | Protocol | Algorithm | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Public Key / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DNSKEY extends Net_DNS2_RR +{ + /* + * flags + */ + public $flags; + + /* + * protocol + */ + public $protocol; + + /* + * algorithm used + */ + public $algorithm; + + /* + * the public key + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->flags . ' ' . $this->protocol . ' ' . + $this->algorithm . ' ' . $this->key; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->flags = array_shift($rdata); + $this->protocol = array_shift($rdata); + $this->algorithm = array_shift($rdata); + $this->key = implode(' ', $rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the flags, protocol and algorithm + // + $x = unpack('nflags/Cprotocol/Calgorithm', $this->rdata); + + // + // TODO: right now we're just displaying what's in DNS; we really + // should be parsing bit 7 and bit 15 of the flags field, and store + // those separately. + // + // right now the DNSSEC implementation is really just for display, + // we don't validate or handle any of the keys + // + $this->flags = $x['flags']; + $this->protocol = $x['protocol']; + $this->algorithm = $x['algorithm']; + + $this->key = base64_encode(substr($this->rdata, 4)); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->key) > 0) { + + $data = pack('nCC', $this->flags, $this->protocol, $this->algorithm); + $data .= base64_decode($this->key); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DS.php b/bundled-libs/Net/DNS2/RR/DS.php new file mode 100644 index 00000000..4914c692 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DS.php @@ -0,0 +1,209 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DS Resource Record - RFC4034 sction 5.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Key Tag | Algorithm | Digest Type | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Digest / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DS extends Net_DNS2_RR +{ + /* + * key tag + */ + public $keytag; + + /* + * algorithm number + */ + public $algorithm; + + /* + * algorithm used to construct the digest + */ + public $digesttype; + + /* + * the digest data + */ + public $digest; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->keytag . ' ' . $this->algorithm . ' ' . + $this->digesttype . ' ' . $this->digest; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->keytag = array_shift($rdata); + $this->algorithm = array_shift($rdata); + $this->digesttype = array_shift($rdata); + $this->digest = implode('', $rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the keytag, algorithm and digesttype + // + $x = unpack('nkeytag/Calgorithm/Cdigesttype', $this->rdata); + + $this->keytag = $x['keytag']; + $this->algorithm = $x['algorithm']; + $this->digesttype = $x['digesttype']; + + // + // figure out the digest size + // + $digest_size = 0; + if ($this->digesttype == 1) { + + $digest_size = 20; // SHA1 + + } else if ($this->digesttype == 2) { + + $digest_size = 32; // SHA256 + } + + // + // copy the digest + // + $x = unpack('H*', substr($this->rdata, 4, $digest_size)); + $this->digest = $x[1]; + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->digest) > 0) { + + $data = pack( + 'nCCH*', + $this->keytag, $this->algorithm, $this->digesttype, $this->digest + ); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/EID.php b/bundled-libs/Net/DNS2/RR/EID.php new file mode 100644 index 00000000..6bc0e4a3 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/EID.php @@ -0,0 +1,130 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * EID Resource Record - undefined; the rdata is simply used as-is in it's + * binary format, so not process has to be done. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_EID extends Net_DNS2_RR +{ + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + return true; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + return $this->rdata; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/EUI48.php b/bundled-libs/Net/DNS2/RR/EUI48.php new file mode 100644 index 00000000..7c296d20 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/EUI48.php @@ -0,0 +1,187 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2013 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.2 + * + */ + +/** + * EUI48 Resource Record - RFC7043 section 3.1 + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | EUI-48 Address | + * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_EUI48 extends Net_DNS2_RR +{ + /* + * The EUI48 address, in hex format + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + // + // re: RFC 7043, the field must be represented as six two-digit hex numbers + // separated by hyphens. + // + $a = explode('-', $value); + if (count($a) != 6) { + + return false; + } + + // + // make sure they're all hex values + // + foreach ($a as $i) { + if (ctype_xdigit($i) == false) { + return false; + } + } + + // + // store it + // + $this->address = strtolower($value); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $x = unpack('C6', $this->rdata); + if (count($x) == 6) { + + $this->address = vsprintf('%02x-%02x-%02x-%02x-%02x-%02x', $x); + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = ''; + + $a = explode('-', $this->address); + foreach ($a as $b) { + + $data .= chr(hexdec($b)); + } + + $packet->offset += 6; + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/EUI64.php b/bundled-libs/Net/DNS2/RR/EUI64.php new file mode 100644 index 00000000..4323ccad --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/EUI64.php @@ -0,0 +1,188 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2013 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.2 + * + */ + +/** + * EUI64 Resource Record - RFC7043 section 4.1 + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | EUI-48 Address | + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_EUI64 extends Net_DNS2_RR +{ + /* + * The EUI64 address, in hex format + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + // + // re: RFC 7043, the field must be represented as 8 two-digit hex numbers + // separated by hyphens. + // + $a = explode('-', $value); + if (count($a) != 8) { + + return false; + } + + // + // make sure they're all hex values + // + foreach ($a as $i) { + if (ctype_xdigit($i) == false) { + return false; + } + } + + // + // store it + // + $this->address = strtolower($value); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $x = unpack('C8', $this->rdata); + if (count($x) == 8) { + + $this->address = vsprintf( + '%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x', $x + ); + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = ''; + + $a = explode('-', $this->address); + foreach ($a as $b) { + + $data .= chr(hexdec($b)); + } + + $packet->offset += 8; + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/HINFO.php b/bundled-libs/Net/DNS2/RR/HINFO.php new file mode 100644 index 00000000..e2faf2ce --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/HINFO.php @@ -0,0 +1,175 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * HINFO Resource Record - RFC1035 section 3.3.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / CPU / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / OS / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_HINFO extends Net_DNS2_RR +{ + /* + * computer informatino + */ + public $cpu; + + /* + * operataing system + */ + public $os; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->formatString($this->cpu) . ' ' . + $this->formatString($this->os); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) == 2) { + + $this->cpu = $data[0]; + $this->os = $data[1]; + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + + $this->cpu = trim(Net_DNS2_Packet::label($packet, $offset), '"'); + $this->os = trim(Net_DNS2_Packet::label($packet, $offset), '"'); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->cpu) > 0) { + + $data = chr(strlen($this->cpu)) . $this->cpu; + $data .= chr(strlen($this->os)) . $this->os; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/HIP.php b/bundled-libs/Net/DNS2/RR/HIP.php new file mode 100644 index 00000000..4beb95ee --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/HIP.php @@ -0,0 +1,287 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.0 + * + */ + +/** + * HIP Resource Record - RFC5205 section 5 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | HIT length | PK algorithm | PK length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * ~ HIT ~ + * | | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | | + * +-+-+-+-+-+-+-+-+-+-+-+ + + * | Public Key | + * ~ ~ + * | | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + * | | + * ~ Rendezvous Servers ~ + * | | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_HIP extends Net_DNS2_RR +{ + /* + * The length of the HIT field + */ + public $hit_length; + + /* + * the public key cryptographic algorithm + */ + public $pk_algorithm; + + /* + * the length of the public key field + */ + public $pk_length; + + /* + * The HIT is stored as a binary value in network byte order. + */ + public $hit; + + /* + * The public key + */ + public $public_key; + + /* + * a list of rendezvous servers + */ + public $rendezvous_servers = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->pk_algorithm . ' ' . + $this->hit . ' ' . $this->public_key . ' '; + + foreach ($this->rendezvous_servers as $index => $server) { + + $out .= $server . '. '; + } + + return trim($out); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->pk_algorithm = array_shift($rdata); + $this->hit = strtoupper(array_shift($rdata)); + $this->public_key = array_shift($rdata); + + // + // anything left on the array, must be one or more rendezevous servers. add + // them and strip off the trailing dot + // + if (count($rdata) > 0) { + + $this->rendezvous_servers = preg_replace('/\.$/', '', $rdata); + } + + // + // store the lengths; + // + $this->hit_length = strlen(pack('H*', $this->hit)); + $this->pk_length = strlen(base64_decode($this->public_key)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the algorithm and length values + // + $x = unpack('Chit_length/Cpk_algorithm/npk_length', $this->rdata); + + $this->hit_length = $x['hit_length']; + $this->pk_algorithm = $x['pk_algorithm']; + $this->pk_length = $x['pk_length']; + + $offset = 4; + + // + // copy out the HIT value + // + $hit = unpack('H*', substr($this->rdata, $offset, $this->hit_length)); + + $this->hit = strtoupper($hit[1]); + $offset += $this->hit_length; + + // + // copy out the public key + // + $this->public_key = base64_encode( + substr($this->rdata, $offset, $this->pk_length) + ); + $offset += $this->pk_length; + + // + // copy out any possible rendezvous servers + // + $offset = $packet->offset + $offset; + + while ( ($offset - $packet->offset) < $this->rdlength) { + + $this->rendezvous_servers[] = Net_DNS2_Packet::expand( + $packet, $offset + ); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ( (strlen($this->hit) > 0) && (strlen($this->public_key) > 0) ) { + + // + // pack the length, algorithm and HIT values + // + $data = pack( + 'CCnH*', + $this->hit_length, + $this->pk_algorithm, + $this->pk_length, + $this->hit + ); + + // + // add the public key + // + $data .= base64_decode($this->public_key); + + // + // add the offset + // + $packet->offset += strlen($data); + + // + // add each rendezvous server + // + foreach ($this->rendezvous_servers as $index => $server) { + + $data .= $packet->compress($server, $packet->offset); + } + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/IPSECKEY.php b/bundled-libs/Net/DNS2/RR/IPSECKEY.php new file mode 100644 index 00000000..a56d1a64 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/IPSECKEY.php @@ -0,0 +1,386 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * IPSECKEY Resource Record - RFC4025 section 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | precedence | gateway type | algorithm | gateway | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------+ + + * ~ gateway ~ + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | / + * / public key / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_IPSECKEY extends Net_DNS2_RR +{ + const GATEWAY_TYPE_NONE = 0; + const GATEWAY_TYPE_IPV4 = 1; + const GATEWAY_TYPE_IPV6 = 2; + const GATEWAY_TYPE_DOMAIN = 3; + + const ALGORITHM_NONE = 0; + const ALGORITHM_DSA = 1; + const ALGORITHM_RSA = 2; + + /* + * Precedence (used the same was as a preference field) + */ + public $precedence; + + /* + * Gateway type - specifies the format of the gataway information + * This can be either: + * + * 0 No Gateway + * 1 IPv4 address + * 2 IPV6 address + * 3 wire-encoded domain name (not compressed) + * + */ + public $gateway_type; + + /* + * The algorithm used + * + * This can be: + * + * 0 No key is present + * 1 DSA key is present + * 2 RSA key is present + * + */ + public $algorithm; + + /* + * The gatway information + */ + public $gateway; + + /* + * the public key + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->precedence . ' ' . $this->gateway_type . ' ' . + $this->algorithm . ' '; + + switch($this->gateway_type) { + case self::GATEWAY_TYPE_NONE: + $out .= '. '; + break; + + case self::GATEWAY_TYPE_IPV4: + case self::GATEWAY_TYPE_IPV6: + $out .= $this->gateway . ' '; + break; + + case self::GATEWAY_TYPE_DOMAIN: + $out .= $this->gateway . '. '; + break; + } + + $out .= $this->key; + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // load the data + // + $precedence = array_shift($rdata); + $gateway_type = array_shift($rdata); + $algorithm = array_shift($rdata); + $gateway = strtolower(trim(array_shift($rdata))); + $key = array_shift($rdata); + + // + // validate it + // + switch($gateway_type) { + case self::GATEWAY_TYPE_NONE: + $gateway = ''; + break; + + case self::GATEWAY_TYPE_IPV4: + if (Net_DNS2::isIPv4($gateway) == false) { + return false; + } + break; + + case self::GATEWAY_TYPE_IPV6: + if (Net_DNS2::isIPv6($gateway) == false) { + return false; + } + break; + + case self::GATEWAY_TYPE_DOMAIN: + ; // do nothing + break; + + default: + return false; + } + + // + // check the algorithm and key + // + switch($algorithm) { + case self::ALGORITHM_NONE: + $key = ''; + break; + + case self::ALGORITHM_DSA: + case self::ALGORITHM_RSA: + ; // do nothing + break; + + default: + return false; + } + + // + // store the values + // + $this->precedence = $precedence; + $this->gateway_type = $gateway_type; + $this->algorithm = $algorithm; + $this->gateway = $gateway; + $this->key = $key; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse off the precedence, gateway type and algorithm + // + $x = unpack('Cprecedence/Cgateway_type/Calgorithm', $this->rdata); + + $this->precedence = $x['precedence']; + $this->gateway_type = $x['gateway_type']; + $this->algorithm = $x['algorithm']; + + $offset = 3; + + // + // extract the gatway based on the type + // + switch($this->gateway_type) { + case self::GATEWAY_TYPE_NONE: + $this->gateway = ''; + break; + + case self::GATEWAY_TYPE_IPV4: + $this->gateway = inet_ntop(substr($this->rdata, $offset, 4)); + $offset += 4; + break; + + case self::GATEWAY_TYPE_IPV6: + $ip = unpack('n8', substr($this->rdata, $offset, 16)); + if (count($ip) == 8) { + + $this->gateway = vsprintf('%x:%x:%x:%x:%x:%x:%x:%x', $ip); + $offset += 16; + } else { + + return false; + } + break; + + case self::GATEWAY_TYPE_DOMAIN: + + $doffset = $offset + $packet->offset; + $this->gateway = Net_DNS2_Packet::expand($packet, $doffset); + $offset = ($doffset - $packet->offset); + break; + + default: + return false; + } + + // + // extract the key + // + switch($this->algorithm) { + case self::ALGORITHM_NONE: + $this->key = ''; + break; + + case self::ALGORITHM_DSA: + case self::ALGORITHM_RSA: + $this->key = base64_encode(substr($this->rdata, $offset)); + break; + + default: + return false; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // pack the precedence, gateway type and algorithm + // + $data = pack( + 'CCC', $this->precedence, $this->gateway_type, $this->algorithm + ); + + // + // add the gateway based on the type + // + switch($this->gateway_type) { + case self::GATEWAY_TYPE_NONE: + ; // add nothing + break; + + case self::GATEWAY_TYPE_IPV4: + case self::GATEWAY_TYPE_IPV6: + $data .= inet_pton($this->gateway); + break; + + case self::GATEWAY_TYPE_DOMAIN: + $data .= chr(strlen($this->gateway)) . $this->gateway; + break; + + default: + return null; + } + + // + // add the key if there's one specified + // + switch($this->algorithm) { + case self::ALGORITHM_NONE: + ; // add nothing + break; + + case self::ALGORITHM_DSA: + case self::ALGORITHM_RSA: + $data .= base64_decode($this->key); + break; + + default: + return null; + } + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/ISDN.php b/bundled-libs/Net/DNS2/RR/ISDN.php new file mode 100644 index 00000000..17b3eb31 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/ISDN.php @@ -0,0 +1,190 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * ISDN Resource Record - RFC1183 section 3.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / ISDN-address / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / SA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_ISDN extends Net_DNS2_RR +{ + /* + * ISDN Number + */ + public $isdnaddress; + + /* + * Sub-Address + */ + public $sa; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->formatString($this->isdnaddress) . ' ' . + $this->formatString($this->sa); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) >= 1) { + + $this->isdnaddress = $data[0]; + if (isset($data[1])) { + + $this->sa = $data[1]; + } + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->isdnaddress = Net_DNS2_Packet::label($packet, $packet->offset); + + // + // look for a SA (sub address) - it's optional + // + if ( (strlen($this->isdnaddress) + 1) < $this->rdlength) { + + $this->sa = Net_DNS2_Packet::label($packet, $packet->offset); + } else { + + $this->sa = ''; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->isdnaddress) > 0) { + + $data = chr(strlen($this->isdnaddress)) . $this->isdnaddress; + if (!empty($this->sa)) { + + $data .= chr(strlen($this->sa)); + $data .= $this->sa; + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/KEY.php b/bundled-libs/Net/DNS2/RR/KEY.php new file mode 100644 index 00000000..4c1a3747 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/KEY.php @@ -0,0 +1,85 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * the KEY RR is implemented the same as the DNSKEY RR, the only difference + * is how the flags data is parsed. + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | A/C | Z | XT| Z | Z | NAMTYP| Z | Z | Z | Z | SIG | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * + * DNSKEY only uses bits 7 and 15 + * + * We're not doing anything with these flags right now, so duplicating the + * class like this is fine. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_KEY extends Net_DNS2_RR_DNSKEY +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/KX.php b/bundled-libs/Net/DNS2/RR/KX.php new file mode 100644 index 00000000..9b90fc7f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/KX.php @@ -0,0 +1,179 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * KX Resource Record - RFC2230 section 3.1 + * + * This class is almost identical to MX, except that the the exchanger + * domain is not compressed, it's added as a label + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / EXCHANGER / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_KX extends Net_DNS2_RR +{ + /* + * the preference for this mail exchanger + */ + public $preference; + + /* + * the hostname of the mail exchanger + */ + public $exchange; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->cleanString($this->exchange) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->exchange = $this->cleanString(array_shift($rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + + // + // get the exchange entry server) + // + $offset = $packet->offset + 2; + $this->exchange = Net_DNS2_Packet::label($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->exchange) > 0) { + + $data = pack('nC', $this->preference, strlen($this->exchange)) . + $this->exchange; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/L32.php b/bundled-libs/Net/DNS2/RR/L32.php new file mode 100644 index 00000000..db4a10cd --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/L32.php @@ -0,0 +1,180 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2013 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * L32 Resource Record - RFC6742 section 2.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | Locator32 (16 MSBs) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Locator32 (16 LSBs) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_L32 extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The locator32 field + */ + public $locator32; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->locator32; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->locator32 = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the values + // + $x = unpack('npreference/C4locator', $this->rdata); + + $this->preference = $x['preference']; + + // + // build the locator value + // + $this->locator32 = $x['locator1'] . '.' . $x['locator2'] . '.' . + $x['locator3'] . '.' . $x['locator4']; + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->locator32) > 0) { + + // + // break out the locator value + // + $n = explode('.', $this->locator32); + + // + // pack the data + // + return pack('nC4', $this->preference, $n[0], $n[1], $n[2], $n[3]); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/L64.php b/bundled-libs/Net/DNS2/RR/L64.php new file mode 100644 index 00000000..26931964 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/L64.php @@ -0,0 +1,187 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2013 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * L64 Resource Record - RFC6742 section 2.3 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + * | Locator64 | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_L64 extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The locator64 field + */ + public $locator64; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->locator64; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->locator64 = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the values + // + $x = unpack('npreference/n4locator', $this->rdata); + + $this->preference = $x['preference']; + + // + // build the locator64 + // + $this->locator64 = dechex($x['locator1']) . ':' . + dechex($x['locator2']) . ':' . + dechex($x['locator3']) . ':' . + dechex($x['locator4']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->locator64) > 0) { + + // + // break out the locator64 + // + $n = explode(':', $this->locator64); + + // + // pack the data + // + return pack( + 'n5', $this->preference, hexdec($n[0]), hexdec($n[1]), + hexdec($n[2]), hexdec($n[3]) + ); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/LOC.php b/bundled-libs/Net/DNS2/RR/LOC.php new file mode 100644 index 00000000..85ab0765 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/LOC.php @@ -0,0 +1,440 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * LOC Resource Record - RFC1876 section 2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | VERSION | SIZE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | HORIZ PRE | VERT PRE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | LATITUDE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | LONGITUDE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ALTITUDE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_LOC extends Net_DNS2_RR +{ + /* + * the LOC version- should only ever be 0 + */ + public $version; + + /* + * The diameter of a sphere enclosing the described entity + */ + public $size; + + /* + * The horizontal precision of the data + */ + public $horiz_pre; + + /* + * The vertical precision of the data + */ + public $vert_pre; + + /* + * The latitude - stored in decimal degrees + */ + public $latitude; + + /* + * The longitude - stored in decimal degrees + */ + public $longitude; + + /* + * The altitude - stored in decimal + */ + public $altitude; + + /* + * used for quick power-of-ten lookups + */ + private $_powerOfTen = array(1, 10, 100, 1000, 10000, 100000, + 1000000,10000000,100000000,1000000000); + + /* + * some conversion values + */ + const CONV_SEC = 1000; + const CONV_MIN = 60000; + const CONV_DEG = 3600000; + + const REFERENCE_ALT = 10000000; + const REFERENCE_LATLON = 2147483648; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + if ($this->version == 0) { + + return $this->_d2Dms($this->latitude, 'LAT') . ' ' . + $this->_d2Dms($this->longitude, 'LNG') . ' ' . + sprintf('%.2fm', $this->altitude) . ' ' . + sprintf('%.2fm', $this->size) . ' ' . + sprintf('%.2fm', $this->horiz_pre) . ' ' . + sprintf('%.2fm', $this->vert_pre); + } + + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // format as defined by RFC1876 section 3 + // + // d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] {"E"|"W"} alt["m"] + // [siz["m"] [hp["m"] [vp["m"]]]] + // + $res = preg_match( + '/^(\d+) \s+((\d+) \s+)?(([\d.]+) \s+)?(N|S) \s+(\d+) ' . + '\s+((\d+) \s+)?(([\d.]+) \s+)?(E|W) \s+(-?[\d.]+) m?(\s+ ' . + '([\d.]+) m?)?(\s+ ([\d.]+) m?)?(\s+ ([\d.]+) m?)?/ix', + implode(' ', $rdata), $x + ); + + if ($res) { + + // + // latitude + // + $latdeg = $x[1]; + $latmin = (isset($x[3])) ? $x[3] : 0; + $latsec = (isset($x[5])) ? $x[5] : 0; + $lathem = strtoupper($x[6]); + + $this->latitude = $this->_dms2d($latdeg, $latmin, $latsec, $lathem); + + // + // longitude + // + $londeg = $x[7]; + $lonmin = (isset($x[9])) ? $x[9] : 0; + $lonsec = (isset($x[11])) ? $x[11] : 0; + $lonhem = strtoupper($x[12]); + + $this->longitude = $this->_dms2d($londeg, $lonmin, $lonsec, $lonhem); + + // + // the rest of teh values + // + $version = 0; + + $this->size = (isset($x[15])) ? $x[15] : 1; + $this->horiz_pre = ((isset($x[17])) ? $x[17] : 10000); + $this->vert_pre = ((isset($x[19])) ? $x[19] : 10); + $this->altitude = $x[13]; + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack all the values + // + $x = unpack( + 'Cver/Csize/Choriz_pre/Cvert_pre/Nlatitude/Nlongitude/Naltitude', + $this->rdata + ); + + // + // version must be 0 per RFC 1876 section 2 + // + $this->version = $x['ver']; + if ($this->version == 0) { + + $this->size = $this->_precsizeNtoA($x['size']); + $this->horiz_pre = $this->_precsizeNtoA($x['horiz_pre']); + $this->vert_pre = $this->_precsizeNtoA($x['vert_pre']); + + // + // convert the latitude and longitude to degress in decimal + // + if ($x['latitude'] < 0) { + + $this->latitude = ($x['latitude'] + + self::REFERENCE_LATLON) / self::CONV_DEG; + } else { + + $this->latitude = ($x['latitude'] - + self::REFERENCE_LATLON) / self::CONV_DEG; + } + + if ($x['longitude'] < 0) { + + $this->longitude = ($x['longitude'] + + self::REFERENCE_LATLON) / self::CONV_DEG; + } else { + + $this->longitude = ($x['longitude'] - + self::REFERENCE_LATLON) / self::CONV_DEG; + } + + // + // convert down the altitude + // + $this->altitude = ($x['altitude'] - self::REFERENCE_ALT) / 100; + + return true; + + } else { + + return false; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ($this->version == 0) { + + $lat = 0; + $lng = 0; + + if ($this->latitude < 0) { + + $lat = ($this->latitude * self::CONV_DEG) - self::REFERENCE_LATLON; + } else { + + $lat = ($this->latitude * self::CONV_DEG) + self::REFERENCE_LATLON; + } + + if ($this->longitude < 0) { + + $lng = ($this->longitude * self::CONV_DEG) - self::REFERENCE_LATLON; + } else { + + $lng = ($this->longitude * self::CONV_DEG) + self::REFERENCE_LATLON; + } + + $packet->offset += 16; + + return pack( + 'CCCCNNN', + $this->version, + $this->_precsizeAtoN($this->size), + $this->_precsizeAtoN($this->horiz_pre), + $this->_precsizeAtoN($this->vert_pre), + $lat, $lng, + ($this->altitude * 100) + self::REFERENCE_ALT + ); + } + + return null; + } + + /** + * takes an XeY precision/size value, returns a string representation. + * shamlessly stolen from RFC1876 Appendix A + * + * @param integer $prec the value to convert + * + * @return string + * @access private + * + */ + private function _precsizeNtoA($prec) + { + $mantissa = (($prec >> 4) & 0x0f) % 10; + $exponent = (($prec >> 0) & 0x0f) % 10; + + return $mantissa * $this->_powerOfTen[$exponent]; + } + + /** + * converts ascii size/precision X * 10**Y(cm) to 0xXY. + * shamlessly stolen from RFC1876 Appendix A + * + * @param string $prec the value to convert + * + * @return integer + * @access private + * + */ + private function _precsizeAtoN($prec) + { + $exponent = 0; + while ($prec >= 10) { + + $prec /= 10; + ++$exponent; + } + + return ($prec << 4) | ($exponent & 0x0f); + } + + /** + * convert lat/lng in deg/min/sec/hem to decimal value + * + * @param integer $deg the degree value + * @param integer $min the minutes value + * @param integer $sec the seconds value + * @param string $hem the hemisphere (N/E/S/W) + * + * @return float the decinmal value + * @access private + * + */ + private function _dms2d($deg, $min, $sec, $hem) + { + $deg = $deg - 0; + $min = $min - 0; + + $sign = ($hem == 'W' || $hem == 'S') ? -1 : 1; + return ((($sec/60+$min)/60)+$deg) * $sign; + } + + /** + * convert lat/lng in decimal to deg/min/sec/hem + * + * @param float $data the decimal value + * @param string $latlng either LAT or LNG so we can determine the HEM value + * + * @return string + * @access private + * + */ + private function _d2Dms($data, $latlng) + { + $deg = 0; + $min = 0; + $sec = 0; + $msec = 0; + $hem = ''; + + if ($latlng == 'LAT') { + $hem = ($data > 0) ? 'N' : 'S'; + } else { + $hem = ($data > 0) ? 'E' : 'W'; + } + + $data = abs($data); + + $deg = (int)$data; + $min = (int)(($data - $deg) * 60); + $sec = (int)(((($data - $deg) * 60) - $min) * 60); + $msec = round((((((($data - $deg) * 60) - $min) * 60) - $sec) * 1000)); + + return sprintf('%d %02d %02d.%03d %s', $deg, $min, $sec, round($msec), $hem); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/LP.php b/bundled-libs/Net/DNS2/RR/LP.php new file mode 100644 index 00000000..f1dc4fa6 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/LP.php @@ -0,0 +1,177 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2013 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * LP Resource Record - RFC6742 section 2.4 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / / + * / FQDN / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_LP extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The fdqn field + */ + public $fqdn; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->fqdn . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->fqdn = trim(array_shift($rdata), '.'); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + $offset = $packet->offset + 2; + + // + // get the hostname + // + $this->fqdn = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->fqdn) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->fqdn, $packet->offset); + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/MX.php b/bundled-libs/Net/DNS2/RR/MX.php new file mode 100644 index 00000000..fad09b91 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/MX.php @@ -0,0 +1,175 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * MX Resource Record - RFC1035 section 3.3.9 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / EXCHANGE / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_MX extends Net_DNS2_RR +{ + /* + * the preference for this mail exchanger + */ + public $preference; + + /* + * the hostname of the mail exchanger + */ + public $exchange; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->cleanString($this->exchange) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->exchange = $this->cleanString(array_shift($rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + + // + // get the exchange entry server) + // + $offset = $packet->offset + 2; + $this->exchange = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->exchange) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->exchange, $packet->offset); + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NAPTR.php b/bundled-libs/Net/DNS2/RR/NAPTR.php new file mode 100644 index 00000000..37e3d5eb --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NAPTR.php @@ -0,0 +1,231 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NAPTR Resource Record - RFC2915 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ORDER | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / FLAGS / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / SERVICES / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / REGEXP / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / REPLACEMENT / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NAPTR extends Net_DNS2_RR +{ + /* + * the order in which the NAPTR records MUST be processed + */ + public $order; + + /* + * specifies the order in which NAPTR records with equal "order" + * values SHOULD be processed + */ + public $preference; + + /* + * rewrite flags + */ + public $flags; + + /* + * Specifies the service(s) available down this rewrite path + */ + public $services; + + /* + * regular expression + */ + public $regexp; + + /* + * The next NAME to query for NAPTR, SRV, or address records + * depending on the value of the flags field + */ + public $replacement; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->order . ' ' . $this->preference . ' ' . + $this->formatString($this->flags) . ' ' . + $this->formatString($this->services) . ' ' . + $this->formatString($this->regexp) . ' ' . + $this->cleanString($this->replacement) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->order = array_shift($rdata); + $this->preference = array_shift($rdata); + + $data = $this->buildString($rdata); + if (count($data) == 4) { + + $this->flags = $data[0]; + $this->services = $data[1]; + $this->regexp = $data[2]; + $this->replacement = $this->cleanString($data[3]); + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the order and preference + // + $x = unpack('norder/npreference', $this->rdata); + + $this->order = $x['order']; + $this->preference = $x['preference']; + + $offset = $packet->offset + 4; + + $this->flags = Net_DNS2_Packet::label($packet, $offset); + $this->services = Net_DNS2_Packet::label($packet, $offset); + $this->regexp = Net_DNS2_Packet::label($packet, $offset); + + $this->replacement = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ( (isset($this->order)) && (strlen($this->services) > 0) ) { + + $data = pack('nn', $this->order, $this->preference); + + $data .= chr(strlen($this->flags)) . $this->flags; + $data .= chr(strlen($this->services)) . $this->services; + $data .= chr(strlen($this->regexp)) . $this->regexp; + + $packet->offset += strlen($data); + + $data .= $packet->compress($this->replacement, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NID.php b/bundled-libs/Net/DNS2/RR/NID.php new file mode 100644 index 00000000..f01c504c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NID.php @@ -0,0 +1,187 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2013 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * NID Resource Record - RFC6742 section 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + * | NodeID | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NID extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The node ID field + */ + public $nodeid; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->nodeid; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->nodeid = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the values + // + $x = unpack('npreference/n4nodeid', $this->rdata); + + $this->preference = $x['preference']; + + // + // build the node id + // + $this->nodeid = dechex($x['nodeid1']) . ':' . + dechex($x['nodeid2']) . ':' . + dechex($x['nodeid3']) . ':' . + dechex($x['nodeid4']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->nodeid) > 0) { + + // + // break out the node id + // + $n = explode(':', $this->nodeid); + + // + // pack the data + // + return pack( + 'n5', $this->preference, hexdec($n[0]), hexdec($n[1]), + hexdec($n[2]), hexdec($n[3]) + ); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NIMLOC.php b/bundled-libs/Net/DNS2/RR/NIMLOC.php new file mode 100644 index 00000000..fdc14a62 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NIMLOC.php @@ -0,0 +1,130 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NIMLOCK Resource Record - undefined; the rdata is simply used as-is in it's + * binary format, so not process has to be done. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NIMLOCK extends Net_DNS2_RR +{ + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + return true; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + return $this->rdata; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NS.php b/bundled-libs/Net/DNS2/RR/NS.php new file mode 100644 index 00000000..490fb75c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NS.php @@ -0,0 +1,153 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NS Resource Record - RFC1035 section 3.3.11 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / NSDNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NS extends Net_DNS2_RR +{ + /* + * the hostname of the DNS server + */ + public $nsdname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->nsdname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->nsdname = $this->cleanString(array_shift($rdata)); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->nsdname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->nsdname) > 0) { + + return $packet->compress($this->nsdname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSAP.php b/bundled-libs/Net/DNS2/RR/NSAP.php new file mode 100644 index 00000000..b9d8a856 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSAP.php @@ -0,0 +1,262 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSAP Resource Record - RFC1706 + * + * |--------------| + * | <-- IDP --> | + * |--------------|-------------------------------------| + * | AFI | IDI | <-- DSP --> | + * |-----|--------|-------------------------------------| + * | 47 | 0005 | DFI | AA |Rsvd | RD |Area | ID |Sel | + * |-----|--------|-----|----|-----|----|-----|----|----| + * octets | 1 | 2 | 1 | 3 | 2 | 2 | 2 | 6 | 1 | + * |-----|--------|-----|----|-----|----|-----|----|----| + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSAP extends Net_DNS2_RR +{ + public $afi; + public $idi; + public $dfi; + public $aa; + public $rsvd; + public $rd; + public $area; + public $id; + public $sel; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->afi) . '.' . + $this->cleanString($this->idi) . '.' . + $this->cleanString($this->dfi) . '.' . + $this->cleanString($this->aa) . '.' . + $this->cleanString($this->rsvd) . '.' . + $this->cleanString($this->rd) . '.' . + $this->cleanString($this->area) . '.' . + $this->cleanString($this->id) . '.' . + $this->sel; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = strtolower(trim(array_shift($rdata))); + + // + // there is no real standard for format, so we can't rely on the fact that + // the value will come in with periods separating the values- so strip + // them out if they're included, and parse without them. + // + $data = str_replace(array('.', '0x'), '', $data); + + // + // unpack it as ascii characters + // + $x = unpack('A2afi/A4idi/A2dfi/A6aa/A4rsvd/A4rd/A4area/A12id/A2sel', $data); + + // + // make sure the afi value is 47 + // + if ($x['afi'] == '47') { + + $this->afi = '0x' . $x['afi']; + $this->idi = $x['idi']; + $this->dfi = $x['dfi']; + $this->aa = $x['aa']; + $this->rsvd = $x['rsvd']; + $this->rd = $x['rd']; + $this->area = $x['area']; + $this->id = $x['id']; + $this->sel = $x['sel']; + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength == 20) { + + // + // get the AFI value + // + $this->afi = dechex(ord($this->rdata[0])); + + // + // we only support AFI 47- there arent' any others defined. + // + if ($this->afi == '47') { + + // + // unpack the rest of the values + // + $x = unpack( + 'Cafi/nidi/Cdfi/C3aa/nrsvd/nrd/narea/Nidh/nidl/Csel', + $this->rdata + ); + + $this->afi = sprintf('0x%02x', $x['afi']); + $this->idi = sprintf('%04x', $x['idi']); + $this->dfi = sprintf('%02x', $x['dfi']); + $this->aa = sprintf( + '%06x', $x['aa1'] << 16 | $x['aa2'] << 8 | $x['aa3'] + ); + $this->rsvd = sprintf('%04x', $x['rsvd']); + $this->rd = sprintf('%04x', $x['rd']); + $this->area = sprintf('%04x', $x['area']); + $this->id = sprintf('%08x', $x['idh']) . + sprintf('%04x', $x['idl']); + $this->sel = sprintf('%02x', $x['sel']); + + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ($this->afi == '0x47') { + + // + // build the aa field + // + $aa = unpack('A2x/A2y/A2z', $this->aa); + + // + // build the id field + // + $id = unpack('A8a/A4b', $this->id); + + // + $data = pack( + 'CnCCCCnnnNnC', + hexdec($this->afi), + hexdec($this->idi), + hexdec($this->dfi), + hexdec($aa['x']), + hexdec($aa['y']), + hexdec($aa['z']), + hexdec($this->rsvd), + hexdec($this->rd), + hexdec($this->area), + hexdec($id['a']), + hexdec($id['b']), + hexdec($this->sel) + ); + + if (strlen($data) == 20) { + + $packet->offset += 20; + return $data; + } + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSEC.php b/bundled-libs/Net/DNS2/RR/NSEC.php new file mode 100644 index 00000000..0559641c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSEC.php @@ -0,0 +1,184 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSEC Resource Record - RFC3845 section 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / Next Domain Name / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / List of Type Bit Map(s) / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSEC extends Net_DNS2_RR +{ + /* + * The next owner name + */ + public $next_domain_name; + + /* + * identifies the RRset types that exist at the NSEC RR's owner name. + */ + public $type_bit_maps = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $data = $this->cleanString($this->next_domain_name) . '.'; + + foreach ($this->type_bit_maps as $rr) { + + $data .= ' ' . $rr; + } + + return $data; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->next_domain_name = $this->cleanString(array_shift($rdata)); + $this->type_bit_maps = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // expand the next domain name + // + $offset = $packet->offset; + $this->next_domain_name = Net_DNS2_Packet::expand($packet, $offset); + + // + // parse out the RR's from the bitmap + // + $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray( + substr($this->rdata, $offset - $packet->offset) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->next_domain_name) > 0) { + + $data = $packet->compress($this->next_domain_name, $packet->offset); + $bitmap = Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps); + + $packet->offset += strlen($bitmap); + + return $data . $bitmap; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSEC3.php b/bundled-libs/Net/DNS2/RR/NSEC3.php new file mode 100644 index 00000000..ff0a678b --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSEC3.php @@ -0,0 +1,310 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSEC3 Resource Record - RFC5155 section 3.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Hash Alg. | Flags | Iterations | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Salt Length | Salt / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Hash Length | Next Hashed Owner Name / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / Type Bit Maps / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSEC3 extends Net_DNS2_RR +{ + /* + * Algorithm to use + */ + public $algorithm; + + /* + * flags + */ + public $flags; + + /* + * defines the number of additional times the hash is performed. + */ + public $iterations; + + /* + * the length of the salt- not displayed + */ + public $salt_length; + + /* + * the salt + */ + public $salt; + + /* + * the length of the hash value + */ + public $hash_length; + + /* + * the hashed value of the owner name + */ + public $hashed_owner_name; + + /* + * array of RR type names + */ + public $type_bit_maps = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->algorithm . ' ' . $this->flags . ' ' . $this->iterations . ' '; + + // + // per RFC5155, the salt_length value isn't displayed, and if the salt + // is empty, the salt is displayed as '-' + // + if ($this->salt_length > 0) { + + $out .= $this->salt; + } else { + + $out .= '-'; + } + + // + // per RFC5255 the hash length isn't shown + // + $out .= ' ' . $this->hashed_owner_name; + + // + // show the RR's + // + foreach ($this->type_bit_maps as $rr) { + + $out .= ' ' . strtoupper($rr); + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->algorithm = array_shift($rdata); + $this->flags = array_shift($rdata); + $this->iterations = array_shift($rdata); + + // + // an empty salt is represented as '-' per RFC5155 section 3.3 + // + $salt = array_shift($rdata); + if ($salt == '-') { + + $this->salt_length = 0; + $this->salt = ''; + } else { + + $this->salt_length = strlen(pack('H*', $salt)); + $this->salt = strtoupper($salt); + } + + $this->hashed_owner_name = array_shift($rdata); + $this->hash_length = strlen(base64_decode($this->hashed_owner_name)); + + $this->type_bit_maps = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the first values + // + $x = unpack('Calgorithm/Cflags/niterations/Csalt_length', $this->rdata); + + $this->algorithm = $x['algorithm']; + $this->flags = $x['flags']; + $this->iterations = $x['iterations']; + $this->salt_length = $x['salt_length']; + + $offset = 5; + + if ($this->salt_length > 0) { + + $x = unpack('H*', substr($this->rdata, $offset, $this->salt_length)); + $this->salt = strtoupper($x[1]); + $offset += $this->salt_length; + } + + // + // unpack the hash length + // + $x = unpack('@' . $offset . '/Chash_length', $this->rdata); + $offset++; + + // + // copy out the hash + // + $this->hash_length = $x['hash_length']; + if ($this->hash_length > 0) { + + $this->hashed_owner_name = base64_encode( + substr($this->rdata, $offset, $this->hash_length) + ); + $offset += $this->hash_length; + } + + // + // parse out the RR bitmap + // + $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray( + substr($this->rdata, $offset) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // pull the salt and build the length + // + $salt = pack('H*', $this->salt); + $this->salt_length = strlen($salt); + + // + // pack the algorithm, flags, iterations and salt length + // + $data = pack( + 'CCnC', + $this->algorithm, $this->flags, $this->iterations, $this->salt_length + ); + $data .= $salt; + + // + // add the hash length and hash + // + $data .= chr($this->hash_length); + if ($this->hash_length > 0) { + + $data .= base64_decode($this->hashed_owner_name); + } + + // + // conver the array of RR names to a type bitmap + // + $data .= Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps); + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSEC3PARAM.php b/bundled-libs/Net/DNS2/RR/NSEC3PARAM.php new file mode 100644 index 00000000..f16e7ae3 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSEC3PARAM.php @@ -0,0 +1,220 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSEC3PARAM Resource Record - RFC5155 section 4.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Hash Alg. | Flags | Iterations | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Salt Length | Salt / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSEC3PARAM extends Net_DNS2_RR +{ + /* + * Algorithm to use + * + * TODO: same as the NSEC3 + */ + public $algorithm; + + /* + * flags + */ + public $flags; + + /* + * defines the number of additional times the hash is performed. + */ + public $iterations; + + /* + * the length of the salt- not displayed + */ + public $salt_length; + + /* + * the salt + */ + public $salt; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->algorithm . ' ' . $this->flags . ' ' . $this->iterations . ' '; + + // + // per RFC5155, the salt_length value isn't displayed, and if the salt + // is empty, the salt is displayed as "-" + // + if ($this->salt_length > 0) { + + $out .= $this->salt; + } else { + + $out .= '-'; + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->algorithm = array_shift($rdata); + $this->flags = array_shift($rdata); + $this->iterations = array_shift($rdata); + + $salt = array_shift($rdata); + if ($salt == '-') { + + $this->salt_length = 0; + $this->salt = ''; + } else { + + $this->salt_length = strlen(pack('H*', $salt)); + $this->salt = strtoupper($salt); + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $x = unpack('Calgorithm/Cflags/niterations/Csalt_length', $this->rdata); + + $this->algorithm = $x['algorithm']; + $this->flags = $x['flags']; + $this->iterations = $x['iterations']; + $this->salt_length = $x['salt_length']; + + if ($this->salt_length > 0) { + + $x = unpack('H*', substr($this->rdata, 5, $this->salt_length)); + $this->salt = strtoupper($x[1]); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $salt = pack('H*', $this->salt); + $this->salt_length = strlen($salt); + + $data = pack( + 'CCnC', + $this->algorithm, $this->flags, $this->iterations, $this->salt_length + ) . $salt; + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/OPENPGPKEY.php b/bundled-libs/Net/DNS2/RR/OPENPGPKEY.php new file mode 100644 index 00000000..e38c7388 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/OPENPGPKEY.php @@ -0,0 +1,159 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2014 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.0 + * + */ + +/** + * OPENPGPKEY Resource Record - https://tools.ietf.org/html/draft-ietf-dane-openpgpkey-01 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / OpenPGP Public KeyRing / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_OPENPGPKEY extends Net_DNS2_RR +{ + /* + * the public key + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->key; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->key = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->key = base64_encode(substr($this->rdata, 0, $this->rdlength)); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->key) > 0) { + + $data = base64_decode($this->key); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/OPT.php b/bundled-libs/Net/DNS2/RR/OPT.php new file mode 100644 index 00000000..70c5fcc2 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/OPT.php @@ -0,0 +1,292 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.0 + * + */ + +/** + * OPT Resource Record - RFC2929 section 3.1 + * + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | OPTION-CODE | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | OPTION-LENGTH | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | | + * / OPTION-DATA / + * / / + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_OPT extends Net_DNS2_RR +{ + /* + * option code - assigned by IANA + */ + public $option_code; + + /* + * the length of the option data + */ + public $option_length; + + /* + * the option data + */ + public $option_data; + + /* + * the extended response code stored in the TTL + */ + public $extended_rcode; + + /* + * the implementation level + */ + public $version; + + /* + * the DO bit used for DNSSEC - RFC3225 + */ + public $do; + + /* + * the extended flags + */ + public $z; + + /** + * Constructor - builds a new Net_DNS2_RR_OPT object; normally you wouldn't call + * this directly, but OPT RR's are a little different + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet or null to create + * an empty object + * @param array $rr an array with RR parse values or null to + * create an empty object + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null) + { + // + // this is for when we're manually building an OPT RR object; we aren't + // passing in binary data to parse, we just want a clean/empty object. + // + $this->type = 'OPT'; + $this->rdlength = 0; + + $this->option_length = 0; + $this->extended_rcode = 0; + $this->version = 0; + $this->do = 0; + $this->z = 0; + + // + // everthing else gets passed through to the parent. + // + if ( (!is_null($packet)) && (!is_null($rr)) ) { + + parent::__construct($packet, $rr); + } + } + + /** + * method to return the rdata portion of the packet as a string. There is no + * defintion for returning an OPT RR by string- this is just here to validate + * the binary parsing / building routines. + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->option_code . ' ' . $this->option_data; + } + + /** + * parses the rdata portion from a standard DNS config line. There is no + * definition for parsing a OPT RR by string- this is just here to validate + * the binary parsing / building routines. + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->option_code = array_shift($rdata); + $this->option_data = array_shift($rdata); + $this->option_length = strlen($this->option_data); + + $x = unpack('Cextended/Cversion/Cdo/Cz', pack('N', $this->ttl)); + + $this->extended_rcode = $x['extended']; + $this->version = $x['version']; + $this->do = ($x['do'] >> 7); + $this->z = $x['z']; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + // + // parse out the TTL value + // + $x = unpack('Cextended/Cversion/Cdo/Cz', pack('N', $this->ttl)); + + $this->extended_rcode = $x['extended']; + $this->version = $x['version']; + $this->do = ($x['do'] >> 7); + $this->z = $x['z']; + + // + // parse the data, if there is any + // + if ($this->rdlength > 0) { + + // + // unpack the code and length + // + $x = unpack('noption_code/noption_length', $this->rdata); + + $this->option_code = $x['option_code']; + $this->option_length = $x['option_length']; + + // + // copy out the data based on the length + // + $this->option_data = substr($this->rdata, 4); + } + + return true; + } + + /** + * pre-builds the TTL value for this record; we needed to separate this out + * from the rrGet() function, as the logic in the Net_DNS2_RR packs the TTL + * value before it builds the rdata value. + * + * @return void + * @access protected + * + */ + protected function preBuild() + { + // + // build the TTL value based on the local values + // + $ttl = unpack( + 'N', + pack('CCCC', $this->extended_rcode, $this->version, ($this->do << 7), 0) + ); + + $this->ttl = $ttl[1]; + + return; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // if there is an option code, then pack that data too + // + if ($this->option_code) { + + $data = pack('nn', $this->option_code, $this->option_length) . + $this->option_data; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/PTR.php b/bundled-libs/Net/DNS2/RR/PTR.php new file mode 100644 index 00000000..6926d77a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/PTR.php @@ -0,0 +1,152 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * PTR Resource Record - RFC1035 section 3.3.12 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / PTRDNAME / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_PTR extends Net_DNS2_RR +{ + /* + * the hostname of the PTR entry + */ + public $ptrdname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return rtrim($this->ptrdname, '.') . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->ptrdname = rtrim(implode(' ', $rdata), '.'); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->ptrdname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->ptrdname) > 0) { + + return $packet->compress($this->ptrdname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/PX.php b/bundled-libs/Net/DNS2/RR/PX.php new file mode 100644 index 00000000..ae4f05ec --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/PX.php @@ -0,0 +1,186 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * PX Resource Record - RFC2163 section 4 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / MAP822 / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / MAPX400 / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_PX extends Net_DNS2_RR +{ + /* + * preference + */ + public $preference; + + /* + * the RFC822 part of the MCGAM + */ + public $map822; + + /* + * the X.400 part of the MCGAM + */ + public $mapx400; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->cleanString($this->map822) . '. ' . + $this->cleanString($this->mapx400) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = $rdata[0]; + $this->map822 = $this->cleanString($rdata[1]); + $this->mapx400 = $this->cleanString($rdata[2]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + + $offset = $packet->offset + 2; + + $this->map822 = Net_DNS2_Packet::expand($packet, $offset); + $this->mapx400 = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->map822) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->map822, $packet->offset); + $data .= $packet->compress($this->mapx400, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/RP.php b/bundled-libs/Net/DNS2/RR/RP.php new file mode 100644 index 00000000..b3fae4e3 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/RP.php @@ -0,0 +1,167 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * RP Resource Record - RFC1183 section 2.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / mboxdname / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / txtdname / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_RP extends Net_DNS2_RR +{ + /* + * mailbox for the responsible person + */ + public $mboxdname; + + /* + * is a domain name for which TXT RR's exists + */ + public $txtdname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->mboxdname) . '. ' . + $this->cleanString($this->txtdname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->mboxdname = $this->cleanString($rdata[0]); + $this->txtdname = $this->cleanString($rdata[1]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + + $this->mboxdname = Net_DNS2_Packet::expand($packet, $offset); + $this->txtdname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->mboxdname) > 0) { + + return $packet->compress($this->mboxdname, $packet->offset) . + $packet->compress($this->txtdname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/RRSIG.php b/bundled-libs/Net/DNS2/RR/RRSIG.php new file mode 100644 index 00000000..0997aff0 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/RRSIG.php @@ -0,0 +1,329 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + * This file contains code based off the Net::DNS::SEC Perl module by + * Olaf M. Kolkman + * + * This is the copyright notice from the PERL Net::DNS::SEC module: + * + * Copyright (c) 2001 - 2005 RIPE NCC. Author Olaf M. Kolkman + * Copyright (c) 2007 - 2008 NLnet Labs. Author Olaf M. Kolkman + * + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of the author not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL + * AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/** + * RRSIG Resource Record - RFC4034 sction 3.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Type Covered | Algorithm | Labels | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Original TTL | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Expiration | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Inception | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Key Tag | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signer's Name / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Signature / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_RRSIG extends Net_DNS2_RR +{ + /* + * the RR type covered by this signature + */ + public $typecovered; + + /* + * the algorithm used for the signature + */ + public $algorithm; + + /* + * the number of labels in the name + */ + public $labels; + + /* + * the original TTL + */ + public $origttl; + + /* + * the signature expiration + */ + public $sigexp; + + /* + * the inception of the signature + */ + public $sigincep; + + /* + * the keytag used + */ + public $keytag; + + /* + * the signer's name + */ + public $signname; + + /* + * the signature + */ + public $signature; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->typecovered . ' ' . $this->algorithm . ' ' . + $this->labels . ' ' . $this->origttl . ' ' . + $this->sigexp . ' ' . $this->sigincep . ' ' . + $this->keytag . ' ' . $this->cleanString($this->signname) . '. ' . + $this->signature; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->typecovered = strtoupper(array_shift($rdata)); + $this->algorithm = array_shift($rdata); + $this->labels = array_shift($rdata); + $this->origttl = array_shift($rdata); + $this->sigexp = array_shift($rdata); + $this->sigincep = array_shift($rdata); + $this->keytag = array_shift($rdata); + $this->signname = $this->cleanString(array_shift($rdata)); + + foreach ($rdata as $line) { + + $this->signature .= $line; + } + + $this->signature = trim($this->signature); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack + // + $x = unpack( + 'ntc/Calgorithm/Clabels/Norigttl/Nsigexp/Nsigincep/nkeytag', + $this->rdata + ); + + $this->typecovered = Net_DNS2_Lookups::$rr_types_by_id[$x['tc']]; + $this->algorithm = $x['algorithm']; + $this->labels = $x['labels']; + $this->origttl = Net_DNS2::expandUint32($x['origttl']); + + // + // the dates are in GM time + // + $this->sigexp = gmdate('YmdHis', $x['sigexp']); + $this->sigincep = gmdate('YmdHis', $x['sigincep']); + + // + // get the keytag + // + $this->keytag = $x['keytag']; + + // + // get teh signers name and signature + // + $offset = $packet->offset + 18; + $sigoffset = $offset; + + $this->signname = strtolower( + Net_DNS2_Packet::expand($packet, $sigoffset) + ); + $this->signature = base64_encode( + substr($this->rdata, 18 + ($sigoffset - $offset)) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->signature) > 0) { + + // + // parse the values out of the dates + // + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigexp, $e + ); + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigincep, $i + ); + + // + // pack the value + // + $data = pack( + 'nCCNNNn', + Net_DNS2_Lookups::$rr_types_by_name[$this->typecovered], + $this->algorithm, + $this->labels, + $this->origttl, + gmmktime($e[4], $e[5], $e[6], $e[2], $e[3], $e[1]), + gmmktime($i[4], $i[5], $i[6], $i[2], $i[3], $i[1]), + $this->keytag + ); + + // + // the signer name is special; it's not allowed to be compressed + // (see section 3.1.7) + // + $names = explode('.', strtolower($this->signname)); + foreach ($names as $name) { + + $data .= chr(strlen($name)); + $data .= $name; + } + $data .= "\0"; + + // + // add the signature + // + $data .= base64_decode($this->signature); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/RT.php b/bundled-libs/Net/DNS2/RR/RT.php new file mode 100644 index 00000000..6128381e --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/RT.php @@ -0,0 +1,175 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * RT Resource Record - RFC1183 section 3.3 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | preference | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / intermediate-host / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_RT extends Net_DNS2_RR +{ + /* + * the preference of this route + */ + public $preference; + + /* + * host which will servce as an intermediate in reaching the owner host + */ + public $intermediatehost; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . + $this->cleanString($this->intermediatehost) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = $rdata[0]; + $this->intermediatehost = $this->cleanString($rdata[1]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the preference + // + $x = unpack('npreference', $this->rdata); + + $this->preference = $x['preference']; + $offset = $packet->offset + 2; + + $this->intermediatehost = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->intermediatehost) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->intermediatehost, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SIG.php b/bundled-libs/Net/DNS2/RR/SIG.php new file mode 100644 index 00000000..b887a8eb --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SIG.php @@ -0,0 +1,459 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + * This file contains code based off the Net::DNS::SEC Perl module by + * Olaf M. Kolkman + * + * This is the copyright notice from the PERL Net::DNS::SEC module: + * + * Copyright (c) 2001 - 2005 RIPE NCC. Author Olaf M. Kolkman + * Copyright (c) 2007 - 2008 NLnet Labs. Author Olaf M. Kolkman + * + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of the author not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL + * AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/** + * SIG Resource Record - RFC2535 section 4.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Type Covered | Algorithm | Labels | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Original TTL | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Expiration | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Inception | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Key Tag | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signer's Name / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Signature / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SIG extends Net_DNS2_RR +{ + /* + * and instance of a Net_DNS2_PrivateKey object + */ + public $private_key = null; + + /* + * the RR type covered by this signature + */ + public $typecovered; + + /* + * the algorithm used for the signature + */ + public $algorithm; + + /* + * the number of labels in the name + */ + public $labels; + + /* + * the original TTL + */ + public $origttl; + + /* + * the signature expiration + */ + public $sigexp; + + /* + * the inception of the signature + */ + public $sigincep; + + /* + * the keytag used + */ + public $keytag; + + /* + * the signer's name + */ + public $signname; + + /* + * the signature + */ + public $signature; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->typecovered . ' ' . $this->algorithm . ' ' . + $this->labels . ' ' . $this->origttl . ' ' . + $this->sigexp . ' ' . $this->sigincep . ' ' . + $this->keytag . ' ' . $this->cleanString($this->signname) . '. ' . + $this->signature; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->typecovered = strtoupper(array_shift($rdata)); + $this->algorithm = array_shift($rdata); + $this->labels = array_shift($rdata); + $this->origttl = array_shift($rdata); + $this->sigexp = array_shift($rdata); + $this->sigincep = array_shift($rdata); + $this->keytag = array_shift($rdata); + $this->signname = $this->cleanString(array_shift($rdata)); + + foreach ($rdata as $line) { + + $this->signature .= $line; + } + + $this->signature = trim($this->signature); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack + // + $x = unpack( + 'ntc/Calgorithm/Clabels/Norigttl/Nsigexp/Nsigincep/nkeytag', + $this->rdata + ); + + $this->typecovered = Net_DNS2_Lookups::$rr_types_by_id[$x['tc']]; + $this->algorithm = $x['algorithm']; + $this->labels = $x['labels']; + $this->origttl = Net_DNS2::expandUint32($x['origttl']); + + // + // the dates are in GM time + // + $this->sigexp = gmdate('YmdHis', $x['sigexp']); + $this->sigincep = gmdate('YmdHis', $x['sigincep']); + + // + // get the keytag + // + $this->keytag = $x['keytag']; + + // + // get teh signers name and signature + // + $offset = $packet->offset + 18; + $sigoffset = $offset; + + $this->signname = strtolower( + Net_DNS2_Packet::expand($packet, $sigoffset) + ); + $this->signature = base64_encode( + substr($this->rdata, 18 + ($sigoffset - $offset)) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // parse the values out of the dates + // + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigexp, $e + ); + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigincep, $i + ); + + // + // pack the value + // + $data = pack( + 'nCCNNNn', + Net_DNS2_Lookups::$rr_types_by_name[$this->typecovered], + $this->algorithm, + $this->labels, + $this->origttl, + gmmktime($e[4], $e[5], $e[6], $e[2], $e[3], $e[1]), + gmmktime($i[4], $i[5], $i[6], $i[2], $i[3], $i[1]), + $this->keytag + ); + + // + // the signer name is special; it's not allowed to be compressed + // (see section 3.1.7) + // + $names = explode('.', strtolower($this->signname)); + foreach ($names as $name) { + + $data .= chr(strlen($name)); + $data .= $name; + } + + $data .= chr('0'); + + // + // if the signature is empty, and $this->private_key is an instance of a + // private key object, and we have access to openssl, then assume this + // is a SIG(0), and generate a new signature + // + if ( (strlen($this->signature) == 0) + && ($this->private_key instanceof Net_DNS2_PrivateKey) + && (extension_loaded('openssl') === true) + ) { + + // + // create a new packet for the signature- + // + $new_packet = new Net_DNS2_Packet_Request('example.com', 'SOA', 'IN'); + + // + // copy the packet data over + // + $new_packet->copy($packet); + + // + // remove the SIG object from the additional list + // + array_pop($new_packet->additional); + $new_packet->header->arcount = count($new_packet->additional); + + // + // copy out the data + // + $sigdata = $data . $new_packet->get(); + + // + // based on the algorithm + // + $algorithm = 0; + + switch($this->algorithm) { + + // + // MD5 + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + + $algorithm = OPENSSL_ALGO_MD5; + break; + + // + // SHA1 + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + + $algorithm = OPENSSL_ALGO_SHA1; + break; + + // + // SHA256 (PHP 5.4.8 or higher) + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + + if (version_compare(PHP_VERSION, '5.4.8', '<') == true) { + + throw new Net_DNS2_Exception( + 'SHA256 support is only available in PHP >= 5.4.8', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + + $algorithm = OPENSSL_ALGO_SHA256; + break; + + // + // SHA512 (PHP 5.4.8 or higher) + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + + if (version_compare(PHP_VERSION, '5.4.8', '<') == true) { + + throw new Net_DNS2_Exception( + 'SHA512 support is only available in PHP >= 5.4.8', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + + $algorithm = OPENSSL_ALGO_SHA512; + break; + + // + // unsupported at the moment + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSA: + case Net_DNS2_Lookups::DSNSEC_ALGORITHM_RSASHA1NSEC3SHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSANSEC3SHA1: + default: + throw new Net_DNS2_Exception( + 'invalid or unsupported algorithm', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + break; + } + + // + // sign the data + // + if (openssl_sign($sigdata, $this->signature, $this->private_key->instance, $algorithm) == false) { + + throw new Net_DNS2_Exception( + openssl_error_string(), + Net_DNS2_Lookups::E_OPENSSL_ERROR + ); + } + + // + // build the signature value based + // + switch($this->algorithm) { + + // + // RSA- add it directly + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + + $this->signature = base64_encode($this->signature); + break; + } + } + + // + // add the signature + // + $data .= base64_decode($this->signature); + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SMIMEA.php b/bundled-libs/Net/DNS2/RR/SMIMEA.php new file mode 100644 index 00000000..57c0dde4 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SMIMEA.php @@ -0,0 +1,75 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2016 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.2 + * + */ + +/** + * The SMIMEA RR is implemented exactly like the TLSA record, so + * for now we just extend the TLSA RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SMIMEA extends Net_DNS2_RR_TLSA +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SOA.php b/bundled-libs/Net/DNS2/RR/SOA.php new file mode 100644 index 00000000..0a3d6e03 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SOA.php @@ -0,0 +1,240 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * SOA Resource Record - RFC1035 section 3.3.13 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / MNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / RNAME / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | SERIAL | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | REFRESH | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | RETRY | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | EXPIRE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | MINIMUM | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SOA extends Net_DNS2_RR +{ + /* + * The master DNS server + */ + public $mname; + + /* + * mailbox of the responsible person + */ + public $rname; + + /* + * serial number + */ + public $serial; + + /* + * refresh time + */ + public $refresh; + + /* + * retry interval + */ + public $retry; + + /* + * expire time + */ + public $expire; + + /* + * minimum TTL for any RR in this zone + */ + public $minimum; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->mname) . '. ' . + $this->cleanString($this->rname) . '. ' . + $this->serial . ' ' . $this->refresh . ' ' . $this->retry . ' ' . + $this->expire . ' ' . $this->minimum; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->mname = $this->cleanString($rdata[0]); + $this->rname = $this->cleanString($rdata[1]); + + $this->serial = $rdata[2]; + $this->refresh = $rdata[3]; + $this->retry = $rdata[4]; + $this->expire = $rdata[5]; + $this->minimum = $rdata[6]; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the + // + $offset = $packet->offset; + + $this->mname = Net_DNS2_Packet::expand($packet, $offset); + $this->rname = Net_DNS2_Packet::expand($packet, $offset); + + // + // get the SOA values + // + $x = unpack( + '@' . $offset . '/Nserial/Nrefresh/Nretry/Nexpire/Nminimum/', + $packet->rdata + ); + + $this->serial = Net_DNS2::expandUint32($x['serial']); + $this->refresh = Net_DNS2::expandUint32($x['refresh']); + $this->retry = Net_DNS2::expandUint32($x['retry']); + $this->expire = Net_DNS2::expandUint32($x['expire']); + $this->minimum = Net_DNS2::expandUint32($x['minimum']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->mname) > 0) { + + $data = $packet->compress($this->mname, $packet->offset); + $data .= $packet->compress($this->rname, $packet->offset); + + $data .= pack( + 'N5', $this->serial, $this->refresh, $this->retry, + $this->expire, $this->minimum + ); + + $packet->offset += 20; + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SPF.php b/bundled-libs/Net/DNS2/RR/SPF.php new file mode 100644 index 00000000..fca44779 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SPF.php @@ -0,0 +1,75 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * The SPF RR is implemented exactly like the TXT record, so + * for now we just extend the TXT RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SPF extends Net_DNS2_RR_TXT +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SRV.php b/bundled-libs/Net/DNS2/RR/SRV.php new file mode 100644 index 00000000..37923810 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SRV.php @@ -0,0 +1,186 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * SRV Resource Record - RFC2782 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PRIORITY | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | WEIGHT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PORT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TARGET / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SRV extends Net_DNS2_RR +{ + /* + * The priority of this target host. + */ + public $priority; + + /* + * a relative weight for entries with the same priority + */ + public $weight; + + /* + * The port on this target host of this service. + */ + public $port; + + /* + * The domain name of the target host + */ + public $target; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->priority . ' ' . $this->weight . ' ' . + $this->port . ' ' . $this->cleanString($this->target) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->priority = $rdata[0]; + $this->weight = $rdata[1]; + $this->port = $rdata[2]; + + $this->target = $this->cleanString($rdata[3]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the priority, weight and port + // + $x = unpack('npriority/nweight/nport', $this->rdata); + + $this->priority = $x['priority']; + $this->weight = $x['weight']; + $this->port = $x['port']; + + $offset = $packet->offset + 6; + $this->target = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->target) > 0) { + + $data = pack('nnn', $this->priority, $this->weight, $this->port); + $packet->offset += 6; + + $data .= $packet->compress($this->target, $packet->offset); + + return $data; + } + + return null; + } +} + +?> diff --git a/bundled-libs/Net/DNS2/RR/SSHFP.php b/bundled-libs/Net/DNS2/RR/SSHFP.php new file mode 100644 index 00000000..c5de2d67 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SSHFP.php @@ -0,0 +1,250 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * SSHFP Resource Record - RFC4255 section 3.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | algorithm | fp type | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / / + * / fingerprint / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SSHFP extends Net_DNS2_RR +{ + /* + * the algorithm used + */ + public $algorithm; + + /* + * The finger print type + */ + public $fp_type; + + /* + * the finger print data + */ + public $fingerprint; + + /* + * Algorithms + */ + const SSHFP_ALGORITHM_RES = 0; + const SSHFP_ALGORITHM_RSA = 1; + const SSHFP_ALGORITHM_DSS = 2; + const SSHFP_ALGORITHM_ECDSA = 3; + + /* + * Fingerprint Types + */ + const SSHFP_FPTYPE_RES = 0; + const SSHFP_FPTYPE_SHA1 = 1; + const SSHFP_FPTYPE_SHA256 = 2; + + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->algorithm . ' ' . $this->fp_type . ' ' . $this->fingerprint; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // "The use of mnemonics instead of numbers is not allowed." + // + // RFC4255 section 3.2 + // + $algorithm = array_shift($rdata); + $fp_type = array_shift($rdata); + $fingerprint = strtolower(implode('', $rdata)); + + // + // There are only two algorithm's defined + // + if ( ($algorithm != self::SSHFP_ALGORITHM_RSA) + && ($algorithm != self::SSHFP_ALGORITHM_DSS) + && ($algorithm != self::SSHFP_ALGORITHM_ECDSA) + ) { + return false; + } + + // + // there are only two fingerprints defined + // + if ( ($fp_type != self::SSHFP_FPTYPE_SHA1) + && ($fp_type != self::SSHFP_FPTYPE_SHA256) + ) { + return false; + } + + $this->algorithm = $algorithm; + $this->fp_type = $fp_type; + $this->fingerprint = $fingerprint; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the algorithm and finger print type + // + $x = unpack('Calgorithm/Cfp_type', $this->rdata); + + $this->algorithm = $x['algorithm']; + $this->fp_type = $x['fp_type']; + + // + // There are only three algorithm's defined + // + if ( ($this->algorithm != self::SSHFP_ALGORITHM_RSA) + && ($this->algorithm != self::SSHFP_ALGORITHM_DSS) + && ($this->algorithm != self::SSHFP_ALGORITHM_ECDSA) + ) { + return false; + } + + // + // there are only two fingerprints defined + // + if ( ($this->fp_type != self::SSHFP_FPTYPE_SHA1) + && ($this->fp_type != self::SSHFP_FPTYPE_SHA256) + ) { + return false; + } + + // + // parse the finger print; this assumes SHA-1 + // + $fp = unpack('H*a', substr($this->rdata, 2)); + $this->fingerprint = strtolower($fp['a']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->fingerprint) > 0) { + + $data = pack( + 'CCH*', $this->algorithm, $this->fp_type, $this->fingerprint + ); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TA.php b/bundled-libs/Net/DNS2/RR/TA.php new file mode 100644 index 00000000..da59750c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TA.php @@ -0,0 +1,75 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2011 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * The TA RR is implemented exactly like the DS record, so + * for now we just extend the DS RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TA extends Net_DNS2_RR_DS +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TALINK.php b/bundled-libs/Net/DNS2/RR/TALINK.php new file mode 100644 index 00000000..dfb96735 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TALINK.php @@ -0,0 +1,171 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2011 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * TALINK Resource Record - DNSSEC Trust Anchor + * + * http://tools.ietf.org/id/draft-ietf-dnsop-dnssec-trust-history-00.txt + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / PREVIOUS / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / NEXT / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TALINK extends Net_DNS2_RR +{ + /* + * the previous domain name + */ + public $previous; + + /* + * the next domain name + */ + public $next; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->previous) . '. ' . + $this->cleanString($this->next) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->previous = $this->cleanString($rdata[0]); + $this->next = $this->cleanString($rdata[1]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + + $this->previous = Net_DNS2_Packet::label($packet, $offset); + $this->next = Net_DNS2_Packet::label($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ( (strlen($this->previous) > 0) || (strlen($this->next) > 0) ) { + + $data = chr(strlen($this->previous)) . $this->previous . + chr(strlen($this->next)) . $this->next; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TKEY.php b/bundled-libs/Net/DNS2/RR/TKEY.php new file mode 100644 index 00000000..31c08cd9 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TKEY.php @@ -0,0 +1,307 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * TKEY Resource Record - RFC 2930 section 2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / ALGORITHM / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | INCEPTION | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | EXPIRATION | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | MODE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ERROR | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | KEY SIZE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / KEY DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | OTHER SIZE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / OTHER DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TKEY extends Net_DNS2_RR +{ + public $algorithm; + public $inception; + public $expiration; + public $mode; + public $error; + public $key_size; + public $key_data; + public $other_size; + public $other_data; + + /* + * TSIG Modes + */ + const TSIG_MODE_RES = 0; + const TSIG_MODE_SERV_ASSIGN = 1; + const TSIG_MODE_DH = 2; + const TSIG_MODE_GSS_API = 3; + const TSIG_MODE_RESV_ASSIGN = 4; + const TSIG_MODE_KEY_DELE = 5; + + /* + * map the mod id's to names so we can validate + */ + public $tsgi_mode_id_to_name = array( + + self::TSIG_MODE_RES => 'Reserved', + self::TSIG_MODE_SERV_ASSIGN => 'Server Assignment', + self::TSIG_MODE_DH => 'Diffie-Hellman', + self::TSIG_MODE_GSS_API => 'GSS-API', + self::TSIG_MODE_RESV_ASSIGN => 'Resolver Assignment', + self::TSIG_MODE_KEY_DELE => 'Key Deletion' + ); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->cleanString($this->algorithm) . '. ' . $this->mode; + if ($this->key_size > 0) { + + $out .= ' ' . trim($this->key_data, '.') . '.'; + } else { + + $out .= ' .'; + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // data passed in is assumed: + // + $this->algorithm = $this->cleanString(array_shift($rdata)); + $this->mode = array_shift($rdata); + $this->key_data = trim(array_shift($rdata), '.'); + + // + // the rest of the data is set manually + // + $this->inception = time(); + $this->expiration = time() + 86400; // 1 day + $this->error = 0; + $this->key_size = strlen($this->key_data); + $this->other_size = 0; + $this->other_data = ''; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // expand the algorithm + // + $offset = $packet->offset; + $this->algorithm = Net_DNS2_Packet::expand($packet, $offset); + + // + // unpack inception, expiration, mode, error and key size + // + $x = unpack( + '@' . $offset . '/Ninception/Nexpiration/nmode/nerror/nkey_size', + $packet->rdata + ); + + $this->inception = Net_DNS2::expandUint32($x['inception']); + $this->expiration = Net_DNS2::expandUint32($x['expiration']); + $this->mode = $x['mode']; + $this->error = $x['error']; + $this->key_size = $x['key_size']; + + $offset += 14; + + // + // if key_size > 0, then copy out the key + // + if ($this->key_size > 0) { + + $this->key_data = substr($packet->rdata, $offset, $this->key_size); + $offset += $this->key_size; + } + + // + // unpack the other length + // + $x = unpack('@' . $offset . '/nother_size', $packet->rdata); + + $this->other_size = $x['other_size']; + $offset += 2; + + // + // if other_size > 0, then copy out the data + // + if ($this->other_size > 0) { + + $this->other_data = substr( + $packet->rdata, $offset, $this->other_size + ); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->algorithm) > 0) { + + // + // make sure the size values are correct + // + $this->key_size = strlen($this->key_data); + $this->other_size = strlen($this->other_data); + + // + // add the algorithm without compression + // + $data = Net_DNS2_Packet::pack($this->algorithm); + + // + // pack in the inception, expiration, mode, error and key size + // + $data .= pack( + 'NNnnn', $this->inception, $this->expiration, + $this->mode, 0, $this->key_size + ); + + // + // if the key_size > 0, then add the key + // + if ($this->key_size > 0) { + + $data .= $this->key_data; + } + + // + // pack in the other size + // + $data .= pack('n', $this->other_size); + if ($this->other_size > 0) { + + $data .= $this->other_data; + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TLSA.php b/bundled-libs/Net/DNS2/RR/TLSA.php new file mode 100644 index 00000000..d3ed74dc --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TLSA.php @@ -0,0 +1,194 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2012 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.5 + * + */ + +/** + * TLSA Resource Record - RFC 6698 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Cert. Usage | Selector | Matching Type | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / / + * / Certificate Association Data / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TLSA extends Net_DNS2_RR +{ + /* + * The Certificate Usage Field + */ + public $cert_usage; + + /* + * The Selector Field + */ + public $selector; + + /* + * The Matching Type Field + */ + public $matching_type; + + /* + * The Certificate Association Data Field + */ + public $certificate; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cert_usage . ' ' . $this->selector . ' ' . + $this->matching_type . ' ' . base64_encode($this->certificate); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->cert_usage = array_shift($rdata); + $this->selector = array_shift($rdata); + $this->matching_type = array_shift($rdata); + $this->certificate = base64_decode(implode('', $rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the format, keytag and algorithm + // + $x = unpack('Cusage/Cselector/Ctype', $this->rdata); + + $this->cert_usage = $x['usage']; + $this->selector = $x['selector']; + $this->matching_type = $x['type']; + + // + // copy the certificate + // + $this->certificate = substr($this->rdata, 3, $this->rdlength - 3); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->certificate) > 0) { + + $data = pack( + 'CCC', $this->cert_usage, $this->selector, $this->matching_type + ) . $this->certificate; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TSIG.php b/bundled-libs/Net/DNS2/RR/TSIG.php new file mode 100644 index 00000000..9366da86 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TSIG.php @@ -0,0 +1,504 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * TSIG Resource Record - RFC 2845 + * + * 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / algorithm / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | time signed | + * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | fudge | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | mac size | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / mac / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | original id | error | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | other length | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / other data / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TSIG extends Net_DNS2_RR +{ + /* + * TSIG Algorithm Identifiers + */ + const HMAC_MD5 = 'hmac-md5.sig-alg.reg.int'; // RFC 2845, required + const GSS_TSIG = 'gss-tsig'; // unsupported, optional + const HMAC_SHA1 = 'hmac-sha1'; // RFC 4635, required + const HMAC_SHA224 = 'hmac-sha224'; // RFC 4635, optional + const HMAC_SHA256 = 'hmac-sha256'; // RFC 4635, required + const HMAC_SHA384 = 'hmac-sha384'; // RFC 4635, optional + const HMAC_SHA512 = 'hmac-sha512'; // RFC 4635, optional + + /* + * the map of hash values to names + */ + public static $hash_algorithms = array( + + self::HMAC_MD5 => 'md5', + self::HMAC_SHA1 => 'sha1', + self::HMAC_SHA224 => 'sha224', + self::HMAC_SHA256 => 'sha256', + self::HMAC_SHA384 => 'sha384', + self::HMAC_SHA512 => 'sha512' + ); + + /* + * algorithm used; only supports HMAC-MD5 + */ + public $algorithm; + + /* + * The time it was signed + */ + public $time_signed; + + /* + * fudge- allowed offset from the time signed + */ + public $fudge; + + /* + * size of the digest + */ + public $mac_size; + + /* + * the digest data + */ + public $mac; + + /* + * the original id of the request + */ + public $original_id; + + /* + * additional error code + */ + public $error; + + /* + * length of the "other" data, should only ever be 0 when there is + * no error, or 6 when there is the error RCODE_BADTIME + */ + public $other_length; + + /* + * the other data; should only ever be a timestamp when there is the + * error RCODE_BADTIME + */ + public $other_data; + + /* + * the key to use for signing - passed in, not included in the rdata + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->cleanString($this->algorithm) . '. ' . + $this->time_signed . ' ' . + $this->fudge . ' ' . $this->mac_size . ' ' . + base64_encode($this->mac) . ' ' . $this->original_id . ' ' . + $this->error . ' '. $this->other_length; + + if ($this->other_length > 0) { + + $out .= ' ' . $this->other_data; + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // the only value passed in is the key- + // + // this assumes it's passed in base64 encoded. + // + $this->key = preg_replace('/\s+/', '', array_shift($rdata)); + + // + // the rest of the data is set to default + // + $this->algorithm = self::HMAC_MD5; + $this->time_signed = time(); + $this->fudge = 300; + $this->mac_size = 0; + $this->mac = ''; + $this->original_id = 0; + $this->error = 0; + $this->other_length = 0; + $this->other_data = ''; + + // + // per RFC 2845 section 2.3 + // + $this->class = 'ANY'; + $this->ttl = 0; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // expand the algorithm + // + $newoffset = $packet->offset; + $this->algorithm = Net_DNS2_Packet::expand($packet, $newoffset); + $offset = $newoffset - $packet->offset; + + // + // unpack time, fudge and mac_size + // + $x = unpack( + '@' . $offset . '/ntime_high/Ntime_low/nfudge/nmac_size', + $this->rdata + ); + + $this->time_signed = Net_DNS2::expandUint32($x['time_low']); + $this->fudge = $x['fudge']; + $this->mac_size = $x['mac_size']; + + $offset += 10; + + // + // copy out the mac + // + if ($this->mac_size > 0) { + + $this->mac = substr($this->rdata, $offset, $this->mac_size); + $offset += $this->mac_size; + } + + // + // unpack the original id, error, and other_length values + // + $x = unpack( + '@' . $offset . '/noriginal_id/nerror/nother_length', + $this->rdata + ); + + $this->original_id = $x['original_id']; + $this->error = $x['error']; + $this->other_length = $x['other_length']; + + // + // the only time there is actually any "other data", is when there's + // a BADTIME error code. + // + // The other length should be 6, and the other data field includes the + // servers current time - per RFC 2845 section 4.5.2 + // + if ($this->error == Net_DNS2_Lookups::RCODE_BADTIME) { + + if ($this->other_length != 6) { + + return false; + } + + // + // other data is a 48bit timestamp + // + $x = unpack( + 'nhigh/nlow', + substr($this->rdata, $offset + 6, $this->other_length) + ); + $this->other_data = $x['low']; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->key) > 0) { + + // + // create a new packet for the signature- + // + $new_packet = new Net_DNS2_Packet_Request('example.com', 'SOA', 'IN'); + + // + // copy the packet data over + // + $new_packet->copy($packet); + + // + // remove the TSIG object from the additional list + // + array_pop($new_packet->additional); + $new_packet->header->arcount = count($new_packet->additional); + + // + // copy out the data + // + $sig_data = $new_packet->get(); + + // + // add the name without compressing + // + $sig_data .= Net_DNS2_Packet::pack($this->name); + + // + // add the class and TTL + // + $sig_data .= pack( + 'nN', Net_DNS2_Lookups::$classes_by_name[$this->class], $this->ttl + ); + + // + // add the algorithm name without compression + // + $sig_data .= Net_DNS2_Packet::pack(strtolower($this->algorithm)); + + // + // add the rest of the values + // + $sig_data .= pack( + 'nNnnn', 0, $this->time_signed, $this->fudge, + $this->error, $this->other_length + ); + if ($this->other_length > 0) { + + $sig_data .= pack('nN', 0, $this->other_data); + } + + // + // sign the data + // + $this->mac = $this->_signHMAC( + $sig_data, base64_decode($this->key), $this->algorithm + ); + $this->mac_size = strlen($this->mac); + + // + // compress the algorithm + // + $data = Net_DNS2_Packet::pack(strtolower($this->algorithm)); + + // + // pack the time, fudge and mac size + // + $data .= pack( + 'nNnn', 0, $this->time_signed, $this->fudge, $this->mac_size + ); + $data .= $this->mac; + + // + // check the error and other_length + // + if ($this->error == Net_DNS2_Lookups::RCODE_BADTIME) { + + $this->other_length = strlen($this->other_data); + if ($this->other_length != 6) { + + return null; + } + } else { + + $this->other_length = 0; + $this->other_data = ''; + } + + // + // pack the id, error and other_length + // + $data .= pack( + 'nnn', $packet->header->id, $this->error, $this->other_length + ); + if ($this->other_length > 0) { + + $data .= pack('nN', 0, $this->other_data); + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } + + /** + * signs the given data with the given key, and returns the result + * + * @param string $data the data to sign + * @param string $key key to use for signing + * @param string $algorithm the algorithm to use; defaults to MD5 + * + * @return string the signed digest + * @throws Net_DNS2_Exception + * @access private + * + */ + private function _signHMAC($data, $key = null, $algorithm = self::HMAC_MD5) + { + // + // use the hash extension; this is included by default in >= 5.1.2 which + // is our dependent version anyway- so it's easy to switch to it. + // + if (extension_loaded('hash')) { + + if (!isset(self::$hash_algorithms[$algorithm])) { + + throw new Net_DNS2_Exception( + 'invalid or unsupported algorithm', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + return hash_hmac(self::$hash_algorithms[$algorithm], $data, $key, true); + } + + // + // if the hash extension isn't loaded, and they selected something other + // than MD5, throw an exception + // + if ($algorithm != self::HMAC_MD5) { + + throw new Net_DNS2_Exception( + 'only HMAC-MD5 supported. please install the php-extension ' . + '"hash" in order to use the sha-family', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + // + // otherwise, do it ourselves + // + if (is_null($key)) { + + return pack('H*', md5($data)); + } + + $key = str_pad($key, 64, chr(0x00)); + if (strlen($key) > 64) { + + $key = pack('H*', md5($key)); + } + + $k_ipad = $key ^ str_repeat(chr(0x36), 64); + $k_opad = $key ^ str_repeat(chr(0x5c), 64); + + return $this->_signHMAC( + $k_opad . pack('H*', md5($k_ipad . $data)), null, $algorithm + ); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TXT.php b/bundled-libs/Net/DNS2/RR/TXT.php new file mode 100644 index 00000000..bd106c03 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TXT.php @@ -0,0 +1,177 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * TXT Resource Record - RFC1035 section 3.3.14 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TXT-DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TXT extends Net_DNS2_RR +{ + /* + * an array of the text strings + */ + public $text = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + if (count($this->text) == 0) { + return '""'; + } + + $data = ''; + + foreach ($this->text as $t) { + + $data .= $this->formatString($t) . ' '; + } + + return trim($data); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) > 0) { + + $this->text = $data; + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $length = $packet->offset + $this->rdlength; + $offset = $packet->offset; + + while ($length > $offset) { + + $this->text[] = Net_DNS2_Packet::label($packet, $offset); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = null; + + foreach ($this->text as $t) { + + $data .= chr(strlen($t)) . $t; + } + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/URI.php b/bundled-libs/Net/DNS2/RR/URI.php new file mode 100644 index 00000000..7c21ec9a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/URI.php @@ -0,0 +1,183 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2011 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * URI Resource Record - http://tools.ietf.org/html/draft-faltstrom-uri-06 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PRIORITY | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | WEIGHT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TARGET / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_URI extends Net_DNS2_RR +{ + /* + * The priority of this target host. + */ + public $priority; + + /* + * a relative weight for entries with the same priority + */ + public $weight; + + /* + * The domain name of the target host + */ + public $target; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + // + // presentation format has double quotes (") around the target. + // + return $this->priority . ' ' . $this->weight . ' "' . + $this->cleanString($this->target) . '"'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->priority = $rdata[0]; + $this->weight = $rdata[1]; + + // + // make sure to trim the lead/trailing double quote if it's there. + // + $this->target = trim($this->cleanString($rdata[2]), '"'); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the priority and weight + // + $x = unpack('npriority/nweight', $this->rdata); + + $this->priority = $x['priority']; + $this->weight = $x['weight']; + + $offset = $packet->offset + 4; + $this->target = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->target) > 0) { + + $data = pack('nn', $this->priority, $this->weight); + $packet->offset += 4; + + $data .= $packet->compress(trim($this->target, '"'), $packet->offset); + + return $data; + } + + return null; + } +} + +?> diff --git a/bundled-libs/Net/DNS2/RR/WKS.php b/bundled-libs/Net/DNS2/RR/WKS.php new file mode 100644 index 00000000..a954368a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/WKS.php @@ -0,0 +1,235 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.1 + * + */ + +/** + * WKS Resource Record - RFC1035 section 3.4.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ADDRESS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PROTOCOL | | + * +--+--+--+--+--+--+--+--+ | + * | | + * / / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_WKS extends Net_DNS2_RR +{ + /* + * The IP address of the service + */ + public $address; + + /* + * The protocol of the service + */ + public $protocol; + + /* + * bitmap + */ + public $bitmap = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $data = $this->address . ' ' . $this->protocol; + + foreach ($this->bitmap as $port) { + $data .= ' ' . $port; + } + + return $data; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->address = strtolower(trim(array_shift($rdata), '.')); + $this->protocol = array_shift($rdata); + $this->bitmap = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // get the address and protocol value + // + $x = unpack('Naddress/Cprotocol', $this->rdata); + + $this->address = long2ip($x['address']); + $this->protocol = $x['protocol']; + + // + // unpack the port list bitmap + // + $port = 0; + foreach (unpack('@5/C*', $this->rdata) as $set) { + + $s = sprintf('%08b', $set); + + for ($i=0; $i<8; $i++, $port++) { + if ($s[$i] == '1') { + $this->bitmap[] = $port; + } + } + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->address) > 0) { + + $data = pack('NC', ip2long($this->address), $this->protocol); + + $ports = array(); + + $n = 0; + foreach ($this->bitmap as $port) { + $ports[$port] = 1; + + if ($port > $n) { + $n = $port; + } + } + for ($i=0; $ioffset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/X25.php b/bundled-libs/Net/DNS2/RR/X25.php new file mode 100644 index 00000000..4a239e2c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/X25.php @@ -0,0 +1,160 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * X25 Resource Record - RFC1183 section 3.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / PSDN-address / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_X25 extends Net_DNS2_RR +{ + /* + * The PSDN address + */ + public $psdnaddress; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->formatString($this->psdnaddress); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) == 1) { + + $this->psdnaddress = $data[0]; + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->psdnaddress = Net_DNS2_Packet::label($packet, $packet->offset); + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->psdnaddress) > 0) { + + $data = chr(strlen($this->psdnaddress)) . $this->psdnaddress; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Resolver.php b/bundled-libs/Net/DNS2/Resolver.php new file mode 100644 index 00000000..9c75ee49 --- /dev/null +++ b/bundled-libs/Net/DNS2/Resolver.php @@ -0,0 +1,332 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * This is the main resolver class, providing DNS query functions. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2 + * + */ +class Net_DNS2_Resolver extends Net_DNS2 +{ + /** + * Constructor - creates a new Net_DNS2_Resolver object + * + * @param mixed $options either an array with options or null + * + * @access public + * + */ + public function __construct(array $options = null) + { + parent::__construct($options); + } + + /** + * does a basic DNS lookup query + * + * @param string $name the DNS name to loookup + * @param string $type the name of the RR type to lookup + * @param string $class the name of the RR class to lookup + * + * @return Net_DNS2_RR object + * @throws Net_DNS2_Exception + * @access public + * + */ + public function query($name, $type = 'A', $class = 'IN') + { + // + // make sure we have some name servers set + // + $this->checkServers(Net_DNS2::RESOLV_CONF); + + // + // we dont' support incremental zone tranfers; so if it's requested, a full + // zone transfer can be returned + // + if ($type == 'IXFR') { + + $type = 'AXFR'; + } + + // + // if the name *looks* too short, then append the domain from the config + // + if ( (strpos($name, '.') === false) && ($type != 'PTR') ) { + + $name .= '.' . strtolower($this->domain); + } + + // + // create a new packet based on the input + // + $packet = new Net_DNS2_Packet_Request($name, $type, $class); + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $packet->additional[] = $this->auth_signature; + $packet->header->arcount = count($packet->additional); + } + + // + // check for the DNSSEC flag, and if it's true, then add an OPT + // RR to the additional section, and set the DO flag to 1. + // + if ($this->dnssec == true) { + + // + // create a new OPT RR + // + $opt = new Net_DNS2_RR_OPT(); + + // + // set the DO flag, and the other values + // + $opt->do = 1; + $opt->class = $this->dnssec_payload_size; + + // + // add the RR to the additional section. + // + $packet->additional[] = $opt; + $packet->header->arcount = count($packet->additional); + } + + // + // set the DNSSEC AD or CD bits + // + if ($this->dnssec_ad_flag == true) { + + $packet->header->ad = 1; + } + if ($this->dnssec_cd_flag == true) { + + $packet->header->cd = 1; + } + + // + // if caching is turned on, then check then hash the question, and + // do a cache lookup. + // + // don't use the cache for zone transfers + // + $packet_hash = ''; + + if ( ($this->use_cache == true) && ($this->cacheable($type) == true) ) { + + // + // open the cache + // + $this->cache->open( + $this->cache_file, $this->cache_size, $this->cache_serializer + ); + + // + // build the key and check for it in the cache. + // + $packet_hash = md5( + $packet->question[0]->qname . '|' . $packet->question[0]->qtype + ); + + if ($this->cache->has($packet_hash)) { + + return $this->cache->get($packet_hash); + } + } + + // + // set the RD (recursion desired) bit to 1 / 0 depending on the config + // setting. + // + if ($this->recurse == false) { + $packet->header->rd = 0; + } else { + $packet->header->rd = 1; + } + + // + // send the packet and get back the response + // + // *always* use TCP for zone transfers- does this cause any problems? + // + $response = $this->sendPacket( + $packet, ($type == 'AXFR') ? true : $this->use_tcp + ); + + // + // if strict mode is enabled, then make sure that the name that was + // looked up is *actually* in the response object. + // + // only do this is strict_query_mode is turned on, AND we've received + // some answers; no point doing any else if there were no answers. + // + if ( ($this->strict_query_mode == true) + && ($response->header->ancount > 0) + ) { + + $found = false; + + // + // look for the requested name/type/class + // + foreach ($response->answer as $index => $object) { + + if ( (strcasecmp(trim($object->name, '.'), trim($packet->question[0]->qname, '.')) == 0) + && ($object->type == $packet->question[0]->qtype) + && ($object->class == $packet->question[0]->qclass) + ) { + $found = true; + break; + } + } + + // + // if it's not found, then unset the answer section; it's not correct to + // throw an exception here; if the hostname didn't exist, then + // sendPacket() would have already thrown an NXDOMAIN error- so the host + // *exists*, but just not the request type/class. + // + // the correct response in this case, is an empty answer section; the + // authority section may still have usual information, like a SOA record. + // + if ($found == false) { + + $response->answer = array(); + $response->header->ancount = 0; + } + } + + // + // cache the response object + // + if ( ($this->use_cache == true) && ($this->cacheable($type) == true) ) { + + $this->cache->put($packet_hash, $response); + } + + return $response; + } + + /** + * does an inverse query for the given RR; most DNS servers do not implement + * inverse queries, but they should be able to return "not implemented" + * + * @param Net_DNS2_RR $rr the RR object to lookup + * + * @return Net_DNS2_RR object + * @throws Net_DNS2_Exception + * @access public + * + */ + public function iquery(Net_DNS2_RR $rr) + { + // + // make sure we have some name servers set + // + $this->checkServers(Net_DNS2::RESOLV_CONF); + + // + // create an empty packet + // + $packet = new Net_DNS2_Packet_Request($rr->name, 'A', 'IN'); + + // + // unset the question + // + $packet->question = array(); + $packet->header->qdcount = 0; + + // + // set the opcode to IQUERY + // + $packet->header->opcode = Net_DNS2_Lookups::OPCODE_IQUERY; + + // + // add the given RR as the answer + // + $packet->answer[] = $rr; + $packet->header->ancount = 1; + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $packet->additional[] = $this->auth_signature; + $packet->header->arcount = count($packet->additional); + } + + // + // send the packet and get back the response + // + return $this->sendPacket($packet, $this->use_tcp); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Socket.php b/bundled-libs/Net/DNS2/Socket.php new file mode 100644 index 00000000..0e4255c8 --- /dev/null +++ b/bundled-libs/Net/DNS2/Socket.php @@ -0,0 +1,190 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/* + * check to see if the socket defines exist; if they don't, then define them + */ +if (defined('SOCK_STREAM') == false) { + define('SOCK_STREAM', 1); +} +if (defined('SOCK_DGRAM') == false) { + define('SOCK_DGRAM', 2); +} + +/** + * This is the abstract base class for the two sockets classes; this simply + * provides the class definition for the two sockets classes. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Socket_Sockets, Net_DNS2_Socket_Streams + * + */ +abstract class Net_DNS2_Socket +{ + protected $sock; + protected $type; + protected $host; + protected $port; + protected $timeout; + + protected $local_host; + protected $local_port; + + public $last_error; + + /* + * type of sockets + */ + const SOCK_STREAM = SOCK_STREAM; + const SOCK_DGRAM = SOCK_DGRAM; + + /** + * constructor - set the port details + * + * @param integer $type the socket type + * @param string $host the IP address of the DNS server to connect to + * @param integer $port the port of the DNS server to connect to + * @param integer $timeout the timeout value to use for socket functions + * + * @access public + * + */ + public function __construct($type, $host, $port, $timeout) + { + $this->type = $type; + $this->host = $host; + $this->port = $port; + $this->timeout = $timeout; + } + + /** + * destructor + * + * @access public + */ + public function __destruct() + { + $this->close(); + } + + /** + * sets the local address/port for the socket to bind to + * + * @param string $address the local IP address to bind to + * @param mixed $port the local port to bind to, or 0 to let the socket + * function select a port + * + * @return boolean + * @access public + * + */ + public function bindAddress($address, $port = 0) + { + $this->local_host = $address; + $this->local_port = $port; + + return true; + } + + /** + * opens a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + abstract public function open(); + + /** + * closes a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + abstract public function close(); + + /** + * writes the given string to the DNS server socket + * + * @param string $data a binary packed DNS packet + * + * @return boolean + * @access public + * + */ + abstract public function write($data); + + /** + * reads a response from a DNS server + * + * @param integer &$size the size of the DNS packet read is passed back + * @param integer $max_size the max data size returned. + * + * @return mixed returns the data on success and false on error + * @access public + * + */ + abstract public function read(&$size, $max_size); +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Socket/Sockets.php b/bundled-libs/Net/DNS2/Socket/Sockets.php new file mode 100644 index 00000000..707b6532 --- /dev/null +++ b/bundled-libs/Net/DNS2/Socket/Sockets.php @@ -0,0 +1,364 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * Socket handling class using the PHP sockets extension + * + * The sockets extension is faster than the stream functions in PHP, but it's + * not standard. So if the extension is loaded, then this class is used, if + * it's not, then the Net_DNS2_Socket_Streams class is used. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Socket + * + */ +class Net_DNS2_Socket_Sockets extends Net_DNS2_Socket +{ + /** + * opens a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function open() + { + // + // create the socket + // + if (Net_DNS2::isIPv4($this->host) == true) { + + $this->sock = @socket_create( + AF_INET, $this->type, + ($this->type == Net_DNS2_Socket::SOCK_STREAM) ? SOL_TCP : SOL_UDP + ); + + } else if (Net_DNS2::isIPv6($this->host) == true) { + + $this->sock = @socket_create( + AF_INET6, $this->type, + ($this->type == Net_DNS2_Socket::SOCK_STREAM) ? SOL_TCP : SOL_UDP + ); + + } else { + + $this->last_error = 'invalid address type: ' . $this->host; + return false; + } + + if ($this->sock === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + @socket_set_option($this->sock, SOL_SOCKET, SO_REUSEADDR, 1); + + // + // bind to a local IP/port if it's set + // + if (strlen($this->local_host) > 0) { + + $result = @socket_bind( + $this->sock, $this->local_host, + ($this->local_port > 0) ? $this->local_port : null + ); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + } + + // + // mark the socket as non-blocking + // + if (@socket_set_nonblock($this->sock) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + // + // connect to the socket; don't check for status here, we'll check it on the + // socket_select() call so we can handle timeouts properly + // + @socket_connect($this->sock, $this->host, $this->port); + + $read = null; + $write = array($this->sock); + $except = null; + + // + // select on write to check if the call to connect worked + // + $result = @socket_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on write select for connect()'; + return false; + } + + return true; + } + + /** + * closes a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function close() + { + if (is_resource($this->sock) === true) { + + @socket_close($this->sock); + } + return true; + } + + /** + * writes the given string to the DNS server socket + * + * @param string $data a binary packed DNS packet + * + * @return boolean + * @access public + * + */ + public function write($data) + { + $length = strlen($data); + if ($length == 0) { + + $this->last_error = 'empty data on write()'; + return false; + } + + $read = null; + $write = array($this->sock); + $except = null; + + // + // select on write + // + $result = @socket_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on write select()'; + return false; + } + + // + // if it's a TCP socket, then we need to packet and send the length of the + // data as the first 16bit of data. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + $s = chr($length >> 8) . chr($length); + + if (@socket_write($this->sock, $s) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + } + + // + // write the data to the socket + // + $size = @socket_write($this->sock, $data); + if ( ($size === false) || ($size != $length) ) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + return true; + } + + /** + * reads a response from a DNS server + * + * @param integer &$size the size of the DNS packet read is passed back + * + * @return mixed returns the data on success and false on error + * @access public + * + */ + public function read(&$size, $max_size) + { + $read = array($this->sock); + $write = null; + $except = null; + + // + // make sure our socket is non-blocking + // + if (@socket_set_nonblock($this->sock) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + // + // select on read + // + $result = @socket_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on read select()'; + return false; + } + + $data = ''; + $length = $max_size; + + // + // if it's a TCP socket, then the first two bytes is the length of the DNS + // packet- we need to read that off first, then use that value for the + // packet read. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + if (($size = @socket_recv($this->sock, $data, 2, 0)) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + $length = ord($data[0]) << 8 | ord($data[1]); + if ($length < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + return false; + } + } + + // + // at this point, we know that there is data on the socket to be read, + // because we've already extracted the length from the first two bytes. + // + // so the easiest thing to do, is just turn off socket blocking, and + // wait for the data. + // + if (@socket_set_block($this->sock) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + // + // read the data from the socket + // + // loop while reading since some OS's (specifically Win < 2003) don't support + // MSG_WAITALL properly, so they may return with less data than is available. + // + // According to M$, XP and below don't support MSG_WAITALL at all; and there + // also seems to be some issue in 2003 and 2008 where the MSG_WAITALL is + // defined as 0, but if you actually pass 8 (which is the correct defined + // value), it works as it's supposed to- so in these cases, it's just the + // define that's incorrect- this is likely a PHP issue. + // + $data = ''; + $size = 0; + + while (1) { + + $chunk_size = @socket_recv($this->sock, $chunk, $length, MSG_WAITALL); + if ($chunk_size === false) { + + $size = $chunk_size; + $this->last_error = socket_strerror(socket_last_error()); + + return false; + } + + $data .= $chunk; + $size += $chunk_size; + + $length -= $chunk_size; + if ( ($length <= 0) || ($this->type == Net_DNS2_Socket::SOCK_DGRAM) ) { + break; + } + } + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Socket/Streams.php b/bundled-libs/Net/DNS2/Socket/Streams.php new file mode 100644 index 00000000..4cd11fd5 --- /dev/null +++ b/bundled-libs/Net/DNS2/Socket/Streams.php @@ -0,0 +1,389 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * Socket handling class using the PHP Streams + * + * The sockets extension is faster than the stream functions in PHP, but it's + * not standard. So if the extension is loaded, then the Net_DNS2_Socket_Sockets + * class it used, otherwise, this class it used. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Socket + * + */ +class Net_DNS2_Socket_Streams extends Net_DNS2_Socket +{ + private $_context; + + /** + * opens a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function open() + { + // + // create a list of options for the context + // + $opts = array('socket' => array()); + + // + // bind to a local IP/port if it's set + // + if (strlen($this->local_host) > 0) { + + $opts['socket']['bindto'] = $this->local_host; + if ($this->local_port > 0) { + + $opts['socket']['bindto'] .= ':' . $this->local_port; + } + } + + // + // create the context + // + $this->_context = @stream_context_create($opts); + + // + // create socket + // + $errno; + $errstr; + + switch($this->type) { + case Net_DNS2_Socket::SOCK_STREAM: + + if (Net_DNS2::isIPv4($this->host) == true) { + + $this->sock = @stream_socket_client( + 'tcp://' . $this->host . ':' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else if (Net_DNS2::isIPv6($this->host) == true) { + + $this->sock = @stream_socket_client( + 'tcp://[' . $this->host . ']:' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else { + + $this->last_error = 'invalid address type: ' . $this->host; + return false; + } + + break; + + case Net_DNS2_Socket::SOCK_DGRAM: + + if (Net_DNS2::isIPv4($this->host) == true) { + + $this->sock = @stream_socket_client( + 'udp://' . $this->host . ':' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else if (Net_DNS2::isIPv6($this->host) == true) { + + $this->sock = @stream_socket_client( + 'udp://[' . $this->host . ']:' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else { + + $this->last_error = 'invalid address type: ' . $this->host; + return false; + } + + break; + + default: + $this->last_error = 'Invalid socket type: ' . $this->type; + return false; + } + + if ($this->sock === false) { + + $this->last_error = $errstr; + return false; + } + + // + // set it to non-blocking and set the timeout + // + @stream_set_blocking($this->sock, 0); + @stream_set_timeout($this->sock, $this->timeout); + + return true; + } + + /** + * closes a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function close() + { + if (is_resource($this->sock) === true) { + + @fclose($this->sock); + } + return true; + } + + /** + * writes the given string to the DNS server socket + * + * @param string $data a binary packed DNS packet + * + * @return boolean + * @access public + * + */ + public function write($data) + { + $length = strlen($data); + if ($length == 0) { + + $this->last_error = 'empty data on write()'; + return false; + } + + $read = null; + $write = array($this->sock); + $except = null; + + // + // select on write + // + $result = stream_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = 'failed on write select()'; + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on write select()'; + return false; + } + + // + // if it's a TCP socket, then we need to packet and send the length of the + // data as the first 16bit of data. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + $s = chr($length >> 8) . chr($length); + + if (@fwrite($this->sock, $s) === false) { + + $this->last_error = 'failed to fwrite() 16bit length'; + return false; + } + } + + // + // write the data to the socket + // + $size = @fwrite($this->sock, $data); + if ( ($size === false) || ($size != $length) ) { + + $this->last_error = 'failed to fwrite() packet'; + return false; + } + + return true; + } + + /** + * reads a response from a DNS server + * + * @param integer &$size the size of the DNS packet read is passed back + * + * @return mixed returns the data on success and false on error + * @access public + * + */ + public function read(&$size, $max_size) + { + $read = array($this->sock); + $write = null; + $except = null; + + // + // make sure our socket is non-blocking + // + @stream_set_blocking($this->sock, 0); + + // + // select on read + // + $result = stream_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = 'error on read select()'; + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on read select()'; + return false; + } + + $data = ''; + $length = $max_size; + + // + // if it's a TCP socket, then the first two bytes is the length of the DNS + // packet- we need to read that off first, then use that value for the + // packet read. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + if (($data = fread($this->sock, 2)) === false) { + + $this->last_error = 'failed on fread() for data length'; + return false; + } + + $length = ord($data[0]) << 8 | ord($data[1]); + if ($length < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + return false; + } + } + + // + // at this point, we know that there is data on the socket to be read, + // because we've already extracted the length from the first two bytes. + // + // so the easiest thing to do, is just turn off socket blocking, and + // wait for the data. + // + @stream_set_blocking($this->sock, 1); + + // + // read the data from the socket + // + $data = ''; + + // + // the streams socket is weird for TCP sockets; it doesn't seem to always + // return all the data properly; but the looping code I added broke UDP + // packets- my fault- + // + // the sockets library works much better. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + $chunk = ''; + $chunk_size = $length; + + // + // loop so we make sure we read all the data + // + while (1) { + + $chunk = fread($this->sock, $chunk_size); + if ($chunk === false) { + + $this->last_error = 'failed on fread() for data'; + return false; + } + + $data .= $chunk; + $chunk_size -= strlen($chunk); + + if (strlen($data) >= $length) { + break; + } + } + + } else { + + // + // if it's UDP, it's a single fixed-size frame, and the streams library + // doesn't seem to have a problem reading it. + // + $data = fread($this->sock, $length); + if ($length === false) { + + $this->last_error = 'failed on fread() for data'; + return false; + } + } + + $size = strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Updater.php b/bundled-libs/Net/DNS2/Updater.php new file mode 100644 index 00000000..7d1b2cf0 --- /dev/null +++ b/bundled-libs/Net/DNS2/Updater.php @@ -0,0 +1,654 @@ +. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @copyright 2010 Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * The main dynamic DNS updater class. + * + * This class provices functions to handle all defined dynamic DNS update + * requests as defined by RFC 2136. + * + * This is separate from the Net_DNS2_Resolver class, as while the underlying + * protocol is the same, the functionality is completely different. + * + * Generally, query (recursive) lookups are done against caching server, while + * update requests are done against authoratative servers. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2 + * + */ +class Net_DNS2_Updater extends Net_DNS2 +{ + /* + * a Net_DNS2_Packet_Request object used for the update request + */ + private $_packet; + + /** + * Constructor - builds a new Net_DNS2_Updater objected used for doing + * dynamic DNS updates + * + * @param string $zone the domain name to use for DNS updates + * @param mixed $options an array of config options or null + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($zone, array $options = null) + { + parent::__construct($options); + + // + // create the packet + // + $this->_packet = new Net_DNS2_Packet_Request( + strtolower(trim($zone, " \n\r\t.")), 'SOA', 'IN' + ); + + // + // make sure the opcode on the packet is set to UPDATE + // + $this->_packet->header->opcode = Net_DNS2_Lookups::OPCODE_UPDATE; + } + + /** + * checks that the given name matches the name for the zone we're updating + * + * @param string $name The name to be checked. + * + * @return boolean + * @throws Net_DNS2_Exception + * @access private + * + */ + private function _checkName($name) + { + if (!preg_match('/' . $this->_packet->question[0]->qname . '$/', $name)) { + + throw new Net_DNS2_Exception( + 'name provided (' . $name . ') does not match zone name (' . + $this->_packet->question[0]->qname . ')', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + return true; + } + + /** + * add a signature to the request for authentication + * + * @param string $keyname the key name to use for the TSIG RR + * @param string $signature the key to sign the request. + * + * @return boolean + * @access public + * @see Net_DNS2::signTSIG() + * @deprecated function deprecated in 1.1.0 + * + */ + public function signature($keyname, $signature) + { + return $this->signTSIG($keyname, $signature); + } + + /** + * 2.5.1 - Add To An RRset + * + * RRs are added to the Update Section whose NAME, TYPE, TTL, RDLENGTH + * and RDATA are those being added, and CLASS is the same as the zone + * class. Any duplicate RRs will be silently ignored by the primary + * master. + * + * @param Net_DNS2_RR $rr the Net_DNS2_RR object to be added to the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function add(Net_DNS2_RR $rr) + { + $this->_checkName($rr->name); + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.5.4 - Delete An RR From An RRset + * + * RRs to be deleted are added to the Update Section. The NAME, TYPE, + * RDLENGTH and RDATA must match the RR being deleted. TTL must be + * specified as zero (0) and will otherwise be ignored by the primary + * master. CLASS must be specified as NONE to distinguish this from an + * RR addition. If no such RRs exist, then this Update RR will be + * silently ignored by the primary master. + * + * @param Net_DNS2_RR $rr the Net_DNS2_RR object to be deleted from the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function delete(Net_DNS2_RR $rr) + { + $this->_checkName($rr->name); + + $rr->ttl = 0; + $rr->class = 'NONE'; + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.5.2 - Delete An RRset + * + * One RR is added to the Update Section whose NAME and TYPE are those + * of the RRset to be deleted. TTL must be specified as zero (0) and is + * otherwise not used by the primary master. CLASS must be specified as + * ANY. RDLENGTH must be zero (0) and RDATA must therefore be empty. + * If no such RRset exists, then this Update RR will be silently ignored + * by the primary master + * + * @param string $name the RR name to be removed from the zone + * @param string $type the RR type to be removed from the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function deleteAny($name, $type) + { + $this->_checkName($name); + + $class = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + if (!isset($class)) { + + throw new Net_DNS2_Exception( + 'unknown or un-supported resource record type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + $rr = new $class; + + $rr->name = $name; + $rr->ttl = 0; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.5.3 - Delete All RRsets From A Name + * + * One RR is added to the Update Section whose NAME is that of the name + * to be cleansed of RRsets. TYPE must be specified as ANY. TTL must + * be specified as zero (0) and is otherwise not used by the primary + * master. CLASS must be specified as ANY. RDLENGTH must be zero (0) + * and RDATA must therefore be empty. If no such RRsets exist, then + * this Update RR will be silently ignored by the primary master. + * + * @param string $name the RR name to be removed from the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function deleteAll($name) + { + $this->_checkName($name); + + // + // the Net_DNS2_RR_ANY class is just an empty stub class used for these + // cases only + // + $rr = new Net_DNS2_RR_ANY; + + $rr->name = $name; + $rr->ttl = 0; + $rr->type = 'ANY'; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.4.1 - RRset Exists (Value Independent) + * + * At least one RR with a specified NAME and TYPE (in the zone and class + * specified in the Zone Section) must exist. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME and TYPE are equal to that of the zone RRset whose + * existence is required. RDLENGTH is zero and RDATA is therefore + * empty. CLASS must be specified as ANY to differentiate this + * condition from that of an actual RR whose RDLENGTH is naturally zero + * (0) (e.g., NULL). TTL is specified as zero (0). + * + * @param string $name the RR name for the prerequisite + * @param string $type the RR type for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkExists($name, $type) + { + $this->_checkName($name); + + $class = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + if (!isset($class)) { + + throw new Net_DNS2_Exception( + 'unknown or un-supported resource record type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + $rr = new $class; + + $rr->name = $name; + $rr->ttl = 0; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.2 - RRset Exists (Value Dependent) + * + * A set of RRs with a specified NAME and TYPE exists and has the same + * members with the same RDATAs as the RRset specified here in this + * section. While RRset ordering is undefined and therefore not + * significant to this comparison, the sets be identical in their + * extent. + * + * For this prerequisite, a requestor adds to the section an entire + * RRset whose preexistence is required. NAME and TYPE are that of the + * RRset being denoted. CLASS is that of the zone. TTL must be + * specified as zero (0) and is ignored when comparing RRsets for + * identity. + * + * @param Net_DNS2_RR $rr the RR object to be used as a prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkValueExists(Net_DNS2_RR $rr) + { + $this->_checkName($rr->name); + + $rr->ttl = 0; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.3 - RRset Does Not Exist + * + * No RRs with a specified NAME and TYPE (in the zone and class denoted + * by the Zone Section) can exist. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME and TYPE are equal to that of the RRset whose nonexistence + * is required. The RDLENGTH of this record is zero (0), and RDATA + * field is therefore empty. CLASS must be specified as NONE in order + * to distinguish this condition from a valid RR whose RDLENGTH is + * naturally zero (0) (for example, the NULL RR). TTL must be specified + * as zero (0). + * + * @param string $name the RR name for the prerequisite + * @param string $type the RR type for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkNotExists($name, $type) + { + $this->_checkName($name); + + $class = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + if (!isset($class)) { + + throw new Net_DNS2_Exception( + 'unknown or un-supported resource record type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + $rr = new $class; + + $rr->name = $name; + $rr->ttl = 0; + $rr->class = 'NONE'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.4 - Name Is In Use + * + * Name is in use. At least one RR with a specified NAME (in the zone + * and class specified by the Zone Section) must exist. Note that this + * prerequisite is NOT satisfied by empty nonterminals. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME is equal to that of the name whose ownership of an RR is + * required. RDLENGTH is zero and RDATA is therefore empty. CLASS must + * be specified as ANY to differentiate this condition from that of an + * actual RR whose RDLENGTH is naturally zero (0) (e.g., NULL). TYPE + * must be specified as ANY to differentiate this case from that of an + * RRset existence test. TTL is specified as zero (0). + * + * @param string $name the RR name for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkNameInUse($name) + { + $this->_checkName($name); + + // + // the Net_DNS2_RR_ANY class is just an empty stub class used for these + // cases only + // + $rr = new Net_DNS2_RR_ANY; + + $rr->name = $name; + $rr->ttl = 0; + $rr->type = 'ANY'; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.5 - Name Is Not In Use + * + * Name is not in use. No RR of any type is owned by a specified NAME. + * Note that this prerequisite IS satisfied by empty nonterminals. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME is equal to that of the name whose nonownership of any RRs + * is required. RDLENGTH is zero and RDATA is therefore empty. CLASS + * must be specified as NONE. TYPE must be specified as ANY. TTL must + * be specified as zero (0). + * + * @param string $name the RR name for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkNameNotInUse($name) + { + $this->_checkName($name); + + // + // the Net_DNS2_RR_ANY class is just an empty stub class used for these + // cases only + // + $rr = new Net_DNS2_RR_ANY; + + $rr->name = $name; + $rr->ttl = 0; + $rr->type = 'ANY'; + $rr->class = 'NONE'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * returns the current internal packet object. + * + * @return Net_DNS2_Packet_Request + * @access public + # + */ + public function packet() + { + // + // take a copy + // + $p = $this->_packet; + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $p->additional[] = $this->auth_signature; + } + + // + // update the counts + // + $p->header->qdcount = count($p->question); + $p->header->ancount = count($p->answer); + $p->header->nscount = count($p->authority); + $p->header->arcount = count($p->additional); + + return $p; + } + + /** + * executes the update request with the object informaton + * + * @param Net_DNS2_Packet_Response &$response ref to the response object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function update(&$response = null) + { + // + // make sure we have some name servers set + // + $this->checkServers(Net_DNS2::RESOLV_CONF); + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $this->_packet->additional[] = $this->auth_signature; + } + + // + // update the counts + // + $this->_packet->header->qdcount = count($this->_packet->question); + $this->_packet->header->ancount = count($this->_packet->answer); + $this->_packet->header->nscount = count($this->_packet->authority); + $this->_packet->header->arcount = count($this->_packet->additional); + + // + // make sure we have some data to send + // + if ( ($this->_packet->header->qdcount == 0) + || ($this->_packet->header->nscount == 0) + ) { + throw new Net_DNS2_Exception( + 'empty headers- nothing to send!', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + // + // send the packet and get back the response + // + $response = $this->sendPacket($this->_packet, $this->use_tcp); + + // + // clear the internal packet so if we make another request, we don't have + // old data being sent. + // + $this->_packet->reset(); + + // + // for updates, we just need to know it worked- we don't actualy need to + // return the response object + // + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNSBL.php b/bundled-libs/Net/DNSBL.php index 3091dab3..72573956 100644 --- a/bundled-libs/Net/DNSBL.php +++ b/bundled-libs/Net/DNSBL.php @@ -1,22 +1,6 @@ | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at the following url: | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Sebastian Nohn | -// +----------------------------------------------------------------------+ -// -// $Id: DNSBL.php,v 1.4 2004/12/02 14:23:51 nohn Exp $ /** * PEAR::Net_DNSBL @@ -24,17 +8,49 @@ * This class acts as interface to generic Realtime Blocking Lists * (RBL) * - * Net_RBL looks up an supplied host if it's listed in 1-n supplied + * PHP versions 5 + * + * LICENSE: This source file is subject to version 3.01 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_01.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * Net_DNSBL looks up an supplied host if it's listed in 1-n supplied * Blacklists * - * @author Sebastian Nohn - * @package Net_DNSBL - * @license http://www.php.net/license/3_0.txt - * @version 0.5.3 + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn + * @author Ammar Ibrahim + * @copyright 2004-2012 Sebastian Nohn + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version CVS: $Id: DNSBL.php 325344 2012-04-20 04:31:30Z nohn $ + * @link http://pear.php.net/package/Net_DNSBL + * @see Net_DNS + * @since File available since Release 1.0.0 */ -require_once dirname(__FILE__) . '/CheckIP.php'; -class Net_DNSBL { +require_once 'Net/DNS2.php'; + +/** + * PEAR::Net_DNSBL + * + * This class acts as interface to DNSBLs + * + * Net_DNSBL looks up an supplied IP if it's listed in a + * DNS Blacklist. + * + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version Release: 1.3.7 + * @link http://pear.php.net/package/net_dnsbl Package Home + */ + +class Net_DNSBL +{ /** * Array of blacklists. @@ -44,17 +60,26 @@ class Net_DNSBL { * @var array * @access protected */ - var $blacklists = array('sbl-xbl.spamhaus.net', - 'bl.spamcop.net'); + protected $blacklists = array('sbl-xbl.spamhaus.org', + 'bl.spamcop.net'); + + /** + * Array of Results + * + * @var array + * @access protected + */ + protected $results = array(); /** * Set the blacklist to a desired blacklist. * - * @param array Array of blacklists to use. May contain only one element. + * @param array $blacklists Array of blacklists to use. + * * @access public * @return bool true if the operation was successful */ - function setBlacklists($blacklists) + public function setBlacklists($blacklists) { if (is_array($blacklists)) { $this->blacklists = $blacklists; @@ -70,32 +95,181 @@ class Net_DNSBL { * @access public * @return array Currently set blacklists. */ - function getBlacklists() + public function getBlacklists() { return $this->blacklists; } + /** + * Returns Blacklist and Reply from the Blacklist, a host is listed in. + * + * @param string $host Host to check + * + * @access public + * @return array result. $result['dnsbl'] contains DNSBL, + * $result['record'] contains returned DNS record. + */ + public function getDetails($host) + { + if (isset($this->results[$host])) { + return $this->results[$host]; + } else { + return false; + } + } // function + + /** + * Returns Blacklist, host is listed in. + * + * @param string $host Host to check + * + * @access public + * @return bl, a host is listed in or false + */ + public function getListingBl($host) + { + if (isset($this->results[$host]['dnsbl'])) { + return $this->results[$host]['dnsbl']; + } + + if (isset($this->results[$host]) && is_array($this->results[$host])) { + $result = array_keys($this->results[$host]); + if ($result == null) { + return false; + } + + return 'multiple ('.implode(', ', $result).')'; + } + return false; + } // function + + /** + * Returns Blacklists, host is listed in. isListed() must have + * been called with checkall = true + * + * @param string $host Host to check + * + * @access public + * @return array blacklists, a host is listed in or false + */ + public function getListingBls($host) + { + if (isset($this->results[$host]) && is_array($this->results[$host])) { + $result = array_keys($this->results[$host]); + if ($result == null) { + return false; + } + + return $result; + } + + return false; + + } // function + + /** + * Returns result, when a host is listed. + * + * @param string $host Host to check + * + * @access public + * @return bl, a host is listed in or false + */ + public function getListingRecord($host) + { + if (isset($this->results[$host]['record'])) { + return $this->results[$host]['record']; + } else { + return false; + } + } // function + + /** + * Returns TXT-Records, when a host is listed. + * + * @param string $host Host to check + * + * @access public + * @return array TXT-Records for this host + */ + public function getTxt($host) + { + if (isset($this->results[$host]['txt'])) { + return $this->results[$host]['txt']; + } else { + return false; + } + } // function + /** * Checks if the supplied Host is listed in one or more of the * RBLs. * - * @param string Host to check for being listed. + * @param string $host Host to check for being listed. + * @param boolean $checkall Iterate through all blacklists and + * return all A records or stop after + * the first hit? + * * @access public * @return boolean true if the checked host is listed in a blacklist. */ - function isListed($host) + public function isListed($host, $checkall = false) { - $isListed = false; - + $resolver = new Net_DNS2_Resolver; + + if (!is_string($host)) { + return false; + } + foreach ($this->blacklists as $blacklist) { - $result = gethostbyname($this->getHostForLookup($host, $blacklist)); - if ($result != $this->getHostForLookup($host, $blacklist)) { + $response = null; + try { + $response = $resolver->query($this->getHostForLookup($host, $blacklist)); + } catch (Net_DNS2_Exception $e) { + $response = null; + } + if ($response) { $isListed = true; - - //if the Host was listed we don't need to check other RBLs, - break; - + if ($checkall) { + $this->results[$host][$blacklist] = array(); + foreach ($response->answer as $answer) { + $this->results[$host][$blacklist]['record'][] + = $answer->address; + } + $response_txt + = $resolver->query( + $this->getHostForLookup( + $host, + $blacklist + ), + 'TXT' + ); + if (isset($response_txt->answer)) { + foreach ($response_txt->answer as $txt) { + $this->results[$host][$blacklist]['txt'][] + = $txt->text[0]; + } + } + } else { + $this->results[$host]['dnsbl'] = $blacklist; + $this->results[$host]['record'] = $response->answer[0]->address; + $response_txt + = $resolver->query( + $this->getHostForLookup( + $host, + $blacklist + ), + 'TXT' + ); + if ((isset($response_txt)) && ($response_txt != false)) { + foreach ($response_txt->answer as $txt) { + $this->results[$host]['txt'][] = $txt->text[0]; + } + } + // if the Host was listed we don't need to check other RBLs, + break; + } } // if } // foreach @@ -106,18 +280,25 @@ class Net_DNSBL { * Get host to lookup. Lookup a host if neccessary and get the * complete FQDN to lookup. * - * @param string Host OR IP to use for building the lookup. - * @param string Blacklist to use for building the lookup. + * @param string $host Host OR IP to use for building the lookup. + * @param string $blacklist Blacklist to use for building the lookup. + * * @access protected * @return string Ready to use host to lookup */ - function getHostForLookup($host, $blacklist) + protected function getHostForLookup($host, $blacklist) { // Currently only works for v4 addresses. - if (!Net_CheckIP::check_ip($host)) { - $ip = gethostbyname($host); + if (filter_var($host, FILTER_VALIDATE_IP)) { + $ip = $host; } else { - $ip = $host; + $resolver = new Net_DNS2_Resolver; + $response = $resolver->query($host); + $ip = isset($response->answer[0]->address) ? + $response->answer[0]->address : null; + } + if (!$ip || !filter_var($ip, FILTER_VALIDATE_IP)) { + return; } return $this->buildLookUpHost($ip, $blacklist); @@ -126,12 +307,13 @@ class Net_DNSBL { /** * Build the host to lookup from an IP. * - * @param string IP to use for building the lookup. - * @param string Blacklist to use for building the lookup. + * @param string $ip IP to use for building the lookup. + * @param string $blacklist Blacklist to use for building the lookup. + * * @access protected * @return string Ready to use host to lookup */ - function buildLookUpHost($ip, $blacklist) + protected function buildLookUpHost($ip, $blacklist) { return $this->reverseIp($ip).'.'.$blacklist; } // function @@ -140,14 +322,14 @@ class Net_DNSBL { * Reverse the order of an IP. 127.0.0.1 -> 1.0.0.127. Currently * only works for v4-adresses * - * @param string IP to reverse. + * @param string $ip IP address to reverse. + * * @access protected * @return string Reversed IP */ - function reverseIp($ip) + protected function reverseIp($ip) { return implode('.', array_reverse(explode('.', $ip))); } // function - } // class -?> \ No newline at end of file +?> diff --git a/bundled-libs/Net/DNSBL/SURBL.php b/bundled-libs/Net/DNSBL/SURBL.php index 9fe4b448..4b874741 100644 --- a/bundled-libs/Net/DNSBL/SURBL.php +++ b/bundled-libs/Net/DNSBL/SURBL.php @@ -1,22 +1,39 @@ | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at the following url: | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Sebastian Nohn | -// +----------------------------------------------------------------------+ -// -// $Id: SURBL.php,v 1.4 2004/12/02 14:23:51 nohn Exp $ + +/** + * PEAR::Net_DNSBL + * + * This class acts as interface to generic Realtime Blocking Lists + * (RBL) + * + * PHP versions 5 + * + * LICENSE: This source file is subject to version 3.01 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_01.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * Net_DNSBL looks up an supplied host if it's listed in 1-n supplied + * Blacklists + * + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn + * @author Ammar Ibrahim + * @copyright 2004-2012 Sebastian Nohn + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version CVS: $Id: SURBL.php 325344 2012-04-20 04:31:30Z nohn $ + * @link http://pear.php.net/package/Net_DNSBL + * @see Net_DNS2 + * @since File available since Release 1.0.0 + */ + +require_once 'Cache/Lite.php'; +require_once 'HTTP/Request2.php'; +require_once 'Net/DNSBL.php'; +require_once 'PEAR.php'; /** * PEAR::Net_DNSBL_SURBL @@ -26,17 +43,16 @@ * Services_SURBL looks up an supplied URI if it's listed in a * Spam URI Realtime Blocklists. * - * @author Sebastian Nohn - * @package Net_DNSBL - * @license http://www.php.net/license/3_0.txt - * @version 0.5.4 + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version Release: 1.3.7 + * @link http://pear.php.net/package/net_dnsbl Package Home */ -require_once dirname(__FILE__) . '/../../Cache/Lite.php'; -require_once dirname(__FILE__) . '/../../HTTP/Request.php'; -require_once dirname(__FILE__) . '/../CheckIP.php'; -require_once dirname(__FILE__) . '/../DNSBL.php'; -class Net_DNSBL_SURBL extends Net_DNSBL { +class Net_DNSBL_SURBL extends Net_DNSBL +{ /** * Array of blacklists. @@ -46,7 +62,7 @@ class Net_DNSBL_SURBL extends Net_DNSBL { * @var string[] * @access protected */ - var $blacklists = array('multi.surbl.org'); + protected $blacklists = array('multi.surbl.org'); /** * File containing whitelisted hosts. @@ -59,41 +75,33 @@ class Net_DNSBL_SURBL extends Net_DNSBL { * @see $twoLevelCcTld * @access protected */ - var $doubleCcTldFile = 'http://spamcheck.freeapp.net/two-level-tlds'; - - /** - * Array of whitelisted hosts. - * - * @var array - * @see $twoLevelCcTldFile - * @access private - */ - var $twoLevelCcTld = array(); + protected $doubleCcTldFile = 'http://george.surbl.org/two-level-tlds'; /** * Check if the last two parts of the FQDN are whitelisted. * - * @param string Host to check if it is whitelisted + * @param string $fqdn Host to check if it is whitelisted. + * * @access protected * @return boolean True if the host is whitelisted */ - function isDoubleCcTld($fqdn) + protected function isDoubleCcTld($fqdn) { // 30 Days should be way enough $options = array( 'lifeTime' => '2592000', 'automaticSerialization' => true ); - $id = md5($this->doubleCcTldFile); + $id = md5($this->doubleCcTldFile); $cache = new Cache_Lite($options); if ($data = $cache->get($id)) { // Cache hit } else { // Cache miss - $http = new HTTP_Request($this->doubleCcTldFile); - if (!PEAR::isError($http->sendRequest())) { - $data = $http->getResponseBody(); + $http = new HTTP_Request2($this->doubleCcTldFile); + if (!PEAR::isError($http->send())) { + $data = $http->getBody(); } $data = explode("\n", $data); $data = array_flip($data); @@ -119,18 +127,25 @@ class Net_DNSBL_SURBL extends Net_DNSBL { * (3b2) IS_NOT_2LEVEL: we want the last two names * (4) return the FQDN to query. * - * @param string URL to check. + * @param string $uri URL to check. + * @param string $blacklist Blacklist to check against. + * * @access protected * @return string Host to lookup */ - function getHostForLookup($uri, $blacklist) + protected function getHostForLookup($uri, $blacklist) { - $host = ''; // (1) Extract the hostname from the given URI + $host = ''; $parsed_uri = parse_url($uri); - $host = $parsed_uri['host']; + + if (empty($parsed_uri['host'])) { + return false; + } + + $host = urldecode($parsed_uri['host']); // (2) Check if the "hostname" is an ip - if (Net_CheckIP::check_ip($host)) { + if (filter_var($host, FILTER_VALIDATE_IP)) { // (3a) IS_IP Reverse the IP (1.2.3.4 -> 4.3.2.1) $host = $this->reverseIp($host); } else { @@ -139,13 +154,13 @@ class Net_DNSBL_SURBL extends Net_DNSBL { array_shift($host_elements); } // while $host_3_elements = implode('.', $host_elements); - + $host_elements = explode('.', $host); while (count($host_elements) > 2) { array_shift($host_elements); } // while $host_2_elements = implode('.', $host_elements); - + // (3b) IS_FQDN Check if is in "CC-2-level-TLD" if ($this->isDoubleCcTld($host_2_elements)) { // (3b1) IS_IN_2LEVEL: we want the last three names @@ -156,9 +171,9 @@ class Net_DNSBL_SURBL extends Net_DNSBL { } // if } // if // (4) return the FQDN to query - $host .= '.'.$blacklist; + $host .= '.'.$blacklist; return $host; } // function - + } // class -?> \ No newline at end of file +?> diff --git a/bundled-libs/Onyx/RSS.php b/bundled-libs/Onyx/RSS.php index 827d4290..901a548e 100644 --- a/bundled-libs/Onyx/RSS.php +++ b/bundled-libs/Onyx/RSS.php @@ -123,19 +123,28 @@ class ONYX_RSS { clearstatcache(); - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($uri, array('allowRedirects' => true, 'maxRedirects' => 5)); - $res = $req->sendRequest(); + $options = array('follow_redirects' => true, 'max_redirects' => 5); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_GET, $options); + try { + $res = $req->send(); - if (PEAR::isError($res) || $req->getResponseCode() != '200') - { + if ($res->getStatus() != '200') { + throw new HTTP_Request2_Exception('unable to fetch feed: status code != 200'); + } + + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); - $this->raiseError((__LINE__-2), ONYX_ERR_INVALID_URI . ' (#' . $req->getResponseCode() . ')'); + $this->raiseError((__LINE__-2), ONYX_ERR_INVALID_URI . ' (#' . $res->getStatus() . ')'); return false; } - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); if (@preg_match('@]*encoding="([^"]+)"@i', $fContent, $xml_encoding)) { $this->rss['encoding'] = strtolower($xml_encoding[1]); @@ -342,16 +351,26 @@ class ONYX_RSS { if (function_exists('version_compare') && version_compare(phpversion(), '4.3.0') >= 0) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($uri); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not fetch url: status code != 200'); + } + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); return false; } - $fHeader = $req->getResponseHeader(); + $fHeader = $response->getHeader(); if (isset($fHeader['last-modified'])) { $modtime = $fHeader['last-modified']; } diff --git a/bundled-libs/PEAR.php b/bundled-libs/PEAR.php index 0487cb16..d661cc21 100644 --- a/bundled-libs/PEAR.php +++ b/bundled-libs/PEAR.php @@ -14,17 +14,10 @@ * @author Greg Beaver * @copyright 1997-2010 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id$ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ -// Serendipity-Patch -if (defined('PEAR_ERROR_RETURN')) { - return false; -} -// Serendipity-Patch end - /**#@+ * ERROR constants */ @@ -39,8 +32,6 @@ define('PEAR_ERROR_CALLBACK', 16); */ define('PEAR_ERROR_EXCEPTION', 32); /**#@-*/ -define('PEAR_ZE2', (function_exists('version_compare') && - version_compare(zend_version(), "2-dev", "ge"))); if (substr(PHP_OS, 0, 3) == 'WIN') { define('OS_WINDOWS', true); @@ -84,7 +75,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array(); * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.5 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @see PEAR_Error * @since Class available since PHP 4.0.2 @@ -142,6 +133,18 @@ class PEAR */ var $_expected_errors = array(); + /** + * List of methods that can be called both statically and non-statically. + * @var array + */ + protected static $bivalentMethods = array( + 'setErrorHandling' => true, + 'raiseError' => true, + 'throwError' => true, + 'pushErrorHandling' => true, + 'popErrorHandling' => true, + ); + /** * Constructor. Registers this object in * $_PEAR_destructor_object_list for destructor emulation if a @@ -152,7 +155,7 @@ class PEAR * @access public * @return void */ - function PEAR($error_class = null) + function __construct($error_class = null) { $classname = strtolower(get_class($this)); if ($this->_debug) { @@ -179,6 +182,18 @@ class PEAR } } + /** + * Only here for backwards compatibility. + * E.g. Archive_Tar calls $this->PEAR() in its constructor. + * + * @param string $error_class Which class to use for error objects, + * defaults to PEAR_Error. + */ + public function PEAR($error_class = null) + { + self::__construct($error_class); + } + /** * Destructor (the emulated type of...). Does nothing right now, * but is included for forward compatibility, so subclass @@ -196,19 +211,44 @@ class PEAR } } + public function __call($method, $arguments) + { + if (!isset(self::$bivalentMethods[$method])) { + trigger_error( + 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR + ); + } + return call_user_func_array( + array(get_class(), '_' . $method), + array_merge(array($this), $arguments) + ); + } + + public static function __callStatic($method, $arguments) + { + if (!isset(self::$bivalentMethods[$method])) { + trigger_error( + 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR + ); + } + return call_user_func_array( + array(get_class(), '_' . $method), + array_merge(array(null), $arguments) + ); + } + /** * If you have a class that's mostly/entirely static, and you need static * properties, you can use this method to simulate them. Eg. in your method(s) * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); * You MUST use a reference, or they will not persist! * - * @access public * @param string $class The calling classname, to prevent clashes * @param string $var The variable to retrieve. * @return mixed A reference to the variable. If not set it will be * auto initialised to NULL. */ - function &getStaticProperty($class, $var) + public static function &getStaticProperty($class, $var) { static $properties; if (!isset($properties[$class])) { @@ -226,12 +266,12 @@ class PEAR * Use this function to register a shutdown method for static * classes. * - * @access public * @param mixed $func The function name (or array of class/method) to call * @param mixed $args The arguments to pass to the function + * * @return void */ - function registerShutdownFunc($func, $args = array()) + public static function registerShutdownFunc($func, $args = array()) { // if we are called statically, there is a potential // that no shutdown func is registered. Bug #6445 @@ -250,10 +290,10 @@ class PEAR * only if $code is a string and * $obj->getMessage() == $code or * $code is an integer and $obj->getCode() == $code - * @access public + * * @return bool true if parameter is an error */ - static function isError($data, $code = null) + public static function isError($data, $code = null) { if (!is_a($data, 'PEAR_Error')) { return false; @@ -275,6 +315,9 @@ class PEAR * PEAR objects. If called in an object, setErrorHandling sets * the default behaviour for that object. * + * @param object $object + * Object the method was called on (non-static mode) + * * @param int $mode * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, @@ -306,11 +349,12 @@ class PEAR * * @since PHP 4.0.5 */ - function setErrorHandling($mode = null, $options = null) - { - if (isset($this) && is_a($this, 'PEAR')) { - $setmode = &$this->_default_error_mode; - $setoptions = &$this->_default_error_options; + protected static function _setErrorHandling( + $object, $mode = null, $options = null + ) { + if ($object !== null) { + $setmode = &$object->_default_error_mode; + $setoptions = &$object->_default_error_options; } else { $setmode = &$GLOBALS['_PEAR_default_error_mode']; $setoptions = &$GLOBALS['_PEAR_default_error_options']; @@ -470,12 +514,12 @@ class PEAR * @param bool $skipmsg If true, raiseError will only pass error codes, * the error message parameter will be dropped. * - * @access public * @return object a PEAR error object * @see PEAR::setErrorHandling * @since PHP 4.0.5 */ - static function &raiseError($message = null, + protected static function _raiseError($object, + $message = null, $code = null, $mode = null, $options = null, @@ -493,10 +537,10 @@ class PEAR } if ( - isset($this) && - isset($this->_expected_errors) && - count($this->_expected_errors) > 0 && - count($exp = end($this->_expected_errors)) + $object !== null && + isset($object->_expected_errors) && + count($object->_expected_errors) > 0 && + count($exp = end($object->_expected_errors)) ) { if ($exp[0] == "*" || (is_int(reset($exp)) && in_array($code, $exp)) || @@ -509,9 +553,9 @@ class PEAR // No mode given, try global ones if ($mode === null) { // Class error handler - if (isset($this) && isset($this->_default_error_mode)) { - $mode = $this->_default_error_mode; - $options = $this->_default_error_options; + if ($object !== null && isset($object->_default_error_mode)) { + $mode = $object->_default_error_mode; + $options = $object->_default_error_options; // Global error handler } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) { $mode = $GLOBALS['_PEAR_default_error_mode']; @@ -521,18 +565,12 @@ class PEAR if ($error_class !== null) { $ec = $error_class; - } elseif (isset($this) && isset($this->_error_class)) { - $ec = $this->_error_class; + } elseif ($object !== null && isset($object->_error_class)) { + $ec = $object->_error_class; } else { $ec = 'PEAR_Error'; } - if (intval(PHP_VERSION) < 5) { - // little non-eval hack to fix bug #12147 - include 'PEAR/FixPHP5PEARWarnings.php'; - return $a; - } - if ($skipmsg) { $a = new $ec($code, $mode, $options, $userinfo); } else { @@ -554,14 +592,13 @@ class PEAR * @param string $userinfo If you need to pass along for example debug * information, this parameter is meant for that. * - * @access public * @return object a PEAR error object * @see PEAR::raiseError */ - function &throwError($message = null, $code = null, $userinfo = null) + protected static function _throwError($object, $message = null, $code = null, $userinfo = null) { - if (isset($this) && is_a($this, 'PEAR')) { - $a = &$this->raiseError($message, $code, null, null, $userinfo); + if ($object !== null) { + $a = &$object->raiseError($message, $code, null, null, $userinfo); return $a; } @@ -569,7 +606,7 @@ class PEAR return $a; } - function staticPushErrorHandling($mode, $options = null) + public static function staticPushErrorHandling($mode, $options = null) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; $def_mode = &$GLOBALS['_PEAR_default_error_mode']; @@ -604,7 +641,7 @@ class PEAR return true; } - function staticPopErrorHandling() + public static function staticPopErrorHandling() { $stack = &$GLOBALS['_PEAR_error_handler_stack']; $setmode = &$GLOBALS['_PEAR_default_error_mode']; @@ -652,20 +689,20 @@ class PEAR * * @see PEAR::setErrorHandling */ - function pushErrorHandling($mode, $options = null) + protected static function _pushErrorHandling($object, $mode, $options = null) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; - if (isset($this) && is_a($this, 'PEAR')) { - $def_mode = &$this->_default_error_mode; - $def_options = &$this->_default_error_options; + if ($object !== null) { + $def_mode = &$object->_default_error_mode; + $def_options = &$object->_default_error_options; } else { $def_mode = &$GLOBALS['_PEAR_default_error_mode']; $def_options = &$GLOBALS['_PEAR_default_error_options']; } $stack[] = array($def_mode, $def_options); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); + if ($object !== null) { + $object->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); } @@ -680,14 +717,14 @@ class PEAR * * @see PEAR::pushErrorHandling */ - function popErrorHandling() + protected static function _popErrorHandling($object) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; array_pop($stack); list($mode, $options) = $stack[sizeof($stack) - 1]; array_pop($stack); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); + if ($object !== null) { + $object->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); } @@ -701,7 +738,7 @@ class PEAR * @param string $ext The extension name * @return bool Success or not on the dl() call */ - function loadExtension($ext) + public static function loadExtension($ext) { if (extension_loaded($ext)) { return true; @@ -710,8 +747,7 @@ class PEAR // if either returns true dl() will produce a FATAL error, stop that if ( function_exists('dl') === false || - ini_get('enable_dl') != 1 || - ini_get('safe_mode') == 1 + ini_get('enable_dl') != 1 ) { return false; } @@ -732,10 +768,6 @@ class PEAR } } -if (PEAR_ZE2) { - include_once S9Y_PEAR_PATH . 'PEAR5.php'; -} - function _PEAR_call_destructors() { global $_PEAR_destructor_object_list; @@ -743,11 +775,8 @@ function _PEAR_call_destructors() sizeof($_PEAR_destructor_object_list)) { reset($_PEAR_destructor_object_list); - if (PEAR_ZE2) { - $destructLifoExists = PEAR5::getStaticProperty('PEAR', 'destructlifo'); - } else { - $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo'); - } + + $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo'); if ($destructLifoExists) { $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); @@ -794,7 +823,7 @@ function _PEAR_call_destructors() * @author Gregory Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.5 + * @version Release: 1.10.1 * @link http://pear.php.net/manual/en/core.pear.pear-error.php * @see PEAR::raiseError(), PEAR::throwError() * @since Class available since PHP 4.0.2 @@ -829,7 +858,7 @@ class PEAR_Error * @access public * */ - function PEAR_Error($message = 'unknown error', $code = null, + function __construct($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null) { if ($mode === null) { @@ -840,11 +869,7 @@ class PEAR_Error $this->mode = $mode; $this->userinfo = $userinfo; - if (PEAR_ZE2) { - $skiptrace = PEAR5::getStaticProperty('PEAR_Error', 'skiptrace'); - } else { - $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); - } + $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); if (!$skiptrace) { $this->backtrace = debug_backtrace(); @@ -902,6 +927,24 @@ class PEAR_Error } } + /** + * Only here for backwards compatibility. + * + * Class "Cache_Error" still uses it, among others. + * + * @param string $message Message + * @param int $code Error code + * @param int $mode Error mode + * @param mixed $options See __construct() + * @param string $userinfo Additional user/debug info + */ + public function PEAR_Error( + $message = 'unknown error', $code = null, $mode = null, + $options = null, $userinfo = null + ) { + self::__construct($message, $code, $mode, $options, $userinfo); + } + /** * Get the error mode from an error object. * diff --git a/bundled-libs/PEAR/Exception.php b/bundled-libs/PEAR/Exception.php index 4a0e7b86..5abf4f84 100644 --- a/bundled-libs/PEAR/Exception.php +++ b/bundled-libs/PEAR/Exception.php @@ -3,19 +3,18 @@ /** * PEAR_Exception * - * PHP versions 4 and 5 + * PHP version 5 * - * @category pear - * @package PEAR - * @author Tomas V. V. Cox - * @author Hans Lellelid - * @author Bertrand Mansion - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Exception.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.3.3 + * @category PEAR + * @package PEAR_Exception + * @author Tomas V. V. Cox + * @author Hans Lellelid + * @author Bertrand Mansion + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR_Exception + * @since File available since Release 1.0.0 */ @@ -81,18 +80,17 @@ * } * * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox - * @author Hans Lellelid - * @author Bertrand Mansion - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.3.3 - * + * @category PEAR + * @package PEAR_Exception + * @author Tomas V.V.Cox + * @author Hans Lellelid + * @author Bertrand Mansion + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: @package_version@ + * @link http://pear.php.net/package/PEAR_Exception + * @since Class available since Release 1.0.0 */ class PEAR_Exception extends Exception { @@ -114,9 +112,10 @@ class PEAR_Exception extends Exception * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); * - PEAR_Exception(string $message, array $causes); * - PEAR_Exception(string $message, array $causes, int $code); - * @param string exception message - * @param int|Exception|PEAR_Error|array|null exception cause - * @param int|null exception code or null + * + * @param string $message exception message + * @param int|Exception|PEAR_Error|array|null $p2 exception cause + * @param int|null $p3 exception code or null */ public function __construct($message, $p2 = null, $p3 = null) { @@ -127,8 +126,10 @@ class PEAR_Exception extends Exception // using is_object allows both Exception and PEAR_Error if (is_object($p2) && !($p2 instanceof Exception)) { if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { - throw new PEAR_Exception('exception cause must be Exception, ' . - 'array, or PEAR_Error'); + throw new PEAR_Exception( + 'exception cause must be Exception, ' . + 'array, or PEAR_Error' + ); } } $code = $p3; @@ -146,24 +147,37 @@ class PEAR_Exception extends Exception } /** - * @param mixed $callback - A valid php callback, see php func is_callable() + * Add an exception observer + * + * @param mixed $callback - A valid php callback, see php func is_callable() * - A PEAR_Exception::OBSERVER_* constant * - An array(const PEAR_Exception::OBSERVER_*, * mixed $options) * @param string $label The name of the observer. Use this if you want * to remove it later with removeObserver() + * + * @return void */ public static function addObserver($callback, $label = 'default') { self::$_observers[$label] = $callback; } + /** + * Remove an exception observer + * + * @param string $label Name of the observer + * + * @return void + */ public static function removeObserver($label = 'default') { unset(self::$_observers[$label]); } /** + * Generate a unique ID for an observer + * * @return int unique identifier for an observer */ public static function getUniqueId() @@ -171,7 +185,12 @@ class PEAR_Exception extends Exception return self::$_uniqueid++; } - private function signal() + /** + * Send a signal to all observers + * + * @return void + */ + protected function signal() { foreach (self::$_observers as $func) { if (is_callable($func)) { @@ -180,20 +199,20 @@ class PEAR_Exception extends Exception } settype($func, 'array'); switch ($func[0]) { - case self::OBSERVER_PRINT : - $f = (isset($func[1])) ? $func[1] : '%s'; - printf($f, $this->getMessage()); - break; - case self::OBSERVER_TRIGGER : - $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; - trigger_error($this->getMessage(), $f); - break; - case self::OBSERVER_DIE : - $f = (isset($func[1])) ? $func[1] : '%s'; - die(printf($f, $this->getMessage())); - break; - default: - trigger_error('invalid observer type', E_USER_WARNING); + case self::OBSERVER_PRINT : + $f = (isset($func[1])) ? $func[1] : '%s'; + printf($f, $this->getMessage()); + break; + case self::OBSERVER_TRIGGER : + $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; + trigger_error($this->getMessage(), $f); + break; + case self::OBSERVER_DIE : + $f = (isset($func[1])) ? $func[1] : '%s'; + die(printf($f, $this->getMessage())); + break; + default: + trigger_error('invalid observer type', E_USER_WARNING); } } } @@ -210,6 +229,7 @@ class PEAR_Exception extends Exception *
      * array('name' => $name, 'context' => array(...))
      * 
+ * * @return array */ public function getErrorData() @@ -219,7 +239,7 @@ class PEAR_Exception extends Exception /** * Returns the exception that caused this exception to be thrown - * @access public + * * @return Exception|array The context of the exception */ public function getCause() @@ -229,7 +249,10 @@ class PEAR_Exception extends Exception /** * Function must be public to call on caused exceptions - * @param array + * + * @param array $causes Array that gets filled. + * + * @return void */ public function getCauseMessage(&$causes) { @@ -266,7 +289,9 @@ class PEAR_Exception extends Exception 'message' => $cause->getMessage(), 'file' => $cause->getFile(), 'line' => $cause->getLine()); - } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) { + } elseif (class_exists('PEAR_Error') + && $cause instanceof PEAR_Error + ) { $causes[] = array('class' => get_class($cause), 'message' => $cause->getMessage(), 'file' => 'unknown', @@ -288,6 +313,11 @@ class PEAR_Exception extends Exception } } + /** + * Build a backtrace and return it + * + * @return array Backtrace + */ public function getTraceSafe() { if (!isset($this->_trace)) { @@ -300,18 +330,36 @@ class PEAR_Exception extends Exception return $this->_trace; } + /** + * Gets the first class of the backtrace + * + * @return string Class name + */ public function getErrorClass() { $trace = $this->getTraceSafe(); return $trace[0]['class']; } + /** + * Gets the first method of the backtrace + * + * @return string Method/function name + */ public function getErrorMethod() { $trace = $this->getTraceSafe(); return $trace[0]['function']; } + /** + * Converts the exception to a string (HTML or plain text) + * + * @return string String representation + * + * @see toHtml() + * @see toText() + */ public function __toString() { if (isset($_SERVER['REQUEST_URI'])) { @@ -320,6 +368,11 @@ class PEAR_Exception extends Exception return $this->toText(); } + /** + * Generates a HTML representation of the exception + * + * @return string HTML code + */ public function toHtml() { $trace = $this->getTraceSafe(); @@ -329,7 +382,8 @@ class PEAR_Exception extends Exception foreach ($causes as $i => $cause) { $html .= '' . str_repeat('-', $i) . ' ' . $cause['class'] . ': ' - . htmlspecialchars($cause['message']) . ' in ' . $cause['file'] . ' ' + . htmlspecialchars($cause['message']) + . ' in ' . $cause['file'] . ' ' . 'on line ' . $cause['line'] . '' . "\n"; } @@ -348,20 +402,27 @@ class PEAR_Exception extends Exception $args = array(); if (!empty($v['args'])) { foreach ($v['args'] as $arg) { - if (is_null($arg)) $args[] = 'null'; - elseif (is_array($arg)) $args[] = 'Array'; - elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')'; - elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false'; - elseif (is_int($arg) || is_double($arg)) $args[] = $arg; - else { + if (is_null($arg)) { + $args[] = 'null'; + } else if (is_array($arg)) { + $args[] = 'Array'; + } else if (is_object($arg)) { + $args[] = 'Object('.get_class($arg).')'; + } else if (is_bool($arg)) { + $args[] = $arg ? 'true' : 'false'; + } else if (is_int($arg) || is_double($arg)) { + $args[] = $arg; + } else { $arg = (string)$arg; $str = htmlspecialchars(substr($arg, 0, 16)); - if (strlen($arg) > 16) $str .= '…'; + if (strlen($arg) > 16) { + $str .= '…'; + } $args[] = "'" . $str . "'"; } } } - $html .= '(' . implode(', ',$args) . ')' + $html .= '(' . implode(', ', $args) . ')' . '' . '' . (isset($v['file']) ? $v['file'] : 'unknown') . ':' . (isset($v['line']) ? $v['line'] : 'unknown') @@ -374,6 +435,11 @@ class PEAR_Exception extends Exception return $html; } + /** + * Generates text representation of the exception and stack trace + * + * @return string + */ public function toText() { $causes = array(); @@ -386,4 +452,5 @@ class PEAR_Exception extends Exception } return $causeMsg . $this->getTraceAsString(); } -} \ No newline at end of file +} +?> diff --git a/comment.php b/comment.php index fd4e96f7..9c324b34 100644 --- a/comment.php +++ b/comment.php @@ -1,4 +1,4 @@ - +?> \ No newline at end of file diff --git a/deployment/exit.php b/deployment/exit.php index 9746d103..8f14f817 100644 --- a/deployment/exit.php +++ b/deployment/exit.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/deployment/index.php b/deployment/index.php index c3d46a68..009e7982 100644 --- a/deployment/index.php +++ b/deployment/index.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/deployment/rss.php b/deployment/rss.php index e97447e1..1a700509 100644 --- a/deployment/rss.php +++ b/deployment/rss.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/deployment/serendipity.css.php b/deployment/serendipity.css.php index 806a762a..d5f0de20 100644 --- a/deployment/serendipity.css.php +++ b/deployment/serendipity.css.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/deployment/serendipity_admin.php b/deployment/serendipity_admin.php index 749b5bf8..02220cd3 100644 --- a/deployment/serendipity_admin.php +++ b/deployment/serendipity_admin.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/deployment/serendipity_admin_image_selector.php b/deployment/serendipity_admin_image_selector.php index 677c1dbe..435cf181 100644 --- a/deployment/serendipity_admin_image_selector.php +++ b/deployment/serendipity_admin_image_selector.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/deployment/serendipity_config.inc.php b/deployment/serendipity_config.inc.php index 506f4cf1..74a4e807 100644 --- a/deployment/serendipity_config.inc.php +++ b/deployment/serendipity_config.inc.php @@ -1,4 +1,4 @@ - +?> \ No newline at end of file diff --git a/deployment/serendipity_xmlrpc.php b/deployment/serendipity_xmlrpc.php index 483d502d..f4789c13 100644 --- a/deployment/serendipity_xmlrpc.php +++ b/deployment/serendipity_xmlrpc.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/deployment/wfwcomment.php b/deployment/wfwcomment.php index 9293ef3b..0b6bd339 100644 --- a/deployment/wfwcomment.php +++ b/deployment/wfwcomment.php @@ -1,8 +1,9 @@ - +?> \ No newline at end of file diff --git a/docs/INSTALL b/docs/INSTALL index c840f517..e0ee6e30 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -1,6 +1,5 @@ -########################### -# INSTALLING SERENDIPITY # -########################### +INSTALLING SERENDIPITY +---------------------- -Please go to http://www.s9y.org/36.html to view a step-by-step -installation guide. +Please go to http://docs.s9y.org/docs/users/getting-started/index.html to view +a step-by-step installation guide. \ No newline at end of file diff --git a/docs/NEWS b/docs/NEWS index afa865d9..8964e75a 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -1,10 +1,186 @@ -Version 2.1 () +Version 2.x.x (major) () ------------------------------------------------------------------------ + + * Adapt .htacess default rules to exclude rewriting documentation + (Issue #521) + + * Add backend_view_entry hook, that is executed for every entry + in the backend entry list + + * Updated entryproperties plugin to support a custom property for + multiple ownership of an article + + * Emit and detect rel=trackback element to find trackback + url, to have a reliable alternative to RDF used so far + + * Merge and rename the two configuration variables to limit + displayed entries in the dashboard (#493): + + $serendipity['dashboardLimit'] and + $serendipity['dashboardDraftLimit'] are now merged into + $serendipity['dashboardEntriesLimit'] - please change your + serendipity_config_local.inc.php accordingly if you used + the former variables. + + The dashboard will now show as many future entries as + configured in "dashboardEntriesLimit"; if there are less + future entries, it will display drafts until + "dashboardEntriesLimit" is reached. + + * Fix a regression in Net/DNSBL regarding + serendipity_event_spamblock_rbl and + serendipity_event_spamblock_surbl by adding Net/DNS2 1.4.3 as a + bundled library to core and patching Net/DNSBL (#497) + + * Add a "delete" button to the backend entry form (#491, #494) + + * Change Spartacus default mirror to github (#489) + +Version 2.1.1 (April 9th, 2017) +------------------------------------------------------------------------ + + * Fixed a regression issue where configuration variables could not + properly be stored when they were set to false. + +Version 2.1.0 (April 8th, 2017) +------------------------------------------------------------------------ + + * Some more PHP7 error catching + + * Fix missing token when updating plugin + + * Fix missing variable name in regular expression match, Issue #442 + +Version 2.1-rc1 (January 26th, 2017) +------------------------------------------------------------------------ + + * Fix issue #437 - Remove the hardcoded media filter only_filename + input field and re-allow the $order_fields['i.name']. + + * Issue #430, fix proper name of new feedShowMail configuration var + in rss.php for showing mail addresses + + * [Security] Enhance CSRF-Tokens for toggling/moderating comments + + * Allow to set a default category for authors (personal preferences) + + * Changed how the hidden password element is displayed to prevent + browsers from autofilling it into the entryproperties plugin + + * [Security] Enhanced media upload check to also check redirects + for local files, thanks to Xu Yue (again!) + + * [Security] Prevent XSS in adding category and directory names, + thanks to Edric Teo @smarterbitbybit. + + * [Security] For multi-deletion of entries, secure the HTTP referrer + output to prevent XSS (Issue #435) + + * [Security] Reject %0D/%0A in exit tracking and other places + (Issue #434) + + * [Security] Redirection of comment.php now checks the referrer + and only allows the blog's host (thanks to Lee Sheldon Victor) + + * [Security] Fix missing integer casting for inserting new categories + (thanks to cdxy) + + * Disabled Selenium test files unless enabled + +Version 2.1-beta2 (September 26th, 2016) +------------------------------------------------------------------------ + * Improved backend accessibility by hiding iconfont icons for + screenreaders (using aria-hidden). + + * Replaced the JS-based equal height solution in the backend with + a modern CSS-only solution based on Flexbox for browsers that + support it. (Browsers that do not support Flexbox or that only + support outdated versions of Flexbox get the old JS solution as + a fallback.) + + * [Security] Prevent moving files by using their directory name. + [Security] Possible SQL injection for entry category assignment + [Security] Possible SQL injection for removing&adding a plugin + + All issues require a valid backend login. + Thanks to Hendrik Buchwald for finding this via their + RIPS source code analyzer (www.ripstech.com) + + * [Security] Add new configuration option to enable fetching + local files for the media uploader. By default this is now + disabled to prevent Server Side Request Forgery (SSRF). + Thanks to Xu Yue for pointing this out! + + * Added new API wrapper serendipity_request_url() to request URLs. + Currently uses HTTP_Request2, might change to curl or others in + the future, but irrelevant to plugins using this function. + + * Removed outdated themes blue, carl_contest, kubrick and wp. They + live on Spartacus now. + + * Added new theme "Skeleton". Skeleton is a responsive, mobile first + HTML5/CSS3 theme built on the Skeleton framework. + + * Fix comaptibility bug preventing Internet Explorer (+Edge) to + clear the entry editor cache when saving an entry + + * Remove backend js from preview_iframe.tpls, makeing entry previews + faster, more accurate and more reliable + + * Introduce new plugin api function + $plugin->getFile($filename, $key = 'serendipityPath'). Other + than parseTemplate($filename) it will not parse the found file + via smarty, and it allows directories inside $filename. Intended + use is finding files like images via the fallback chain, giving + themes the chance to serve custom versions instead. + + * Give theme authors the option to force using a template file from + the frontend, {getFile file=... frontend=true} + + * Fix entry preview by making sure it always uses the correct + template files to generate preview, replacing internal magic + with direct parameters + + * Rewrite and simplification of the file fallback chain in + serendipity_getTemplateFile. Removes templates/default/ from + from the chain, as it was replaced by templates/2k11/ + +Version 2.1-beta1 (June 8th, 2016) +------------------------------------------------------------------------ + + * Added new theme "Timeline". Timeline is a fully responsive, + mobile first HTML5/CSS3 theme built on the Bootstrap + framework. + + * Add new config variable $serendipity['cors'] to allow to set + Access-Control-Allow-Origin: * headers for sensible places + (RSS feeds), to i.e. allow JavaScript's XMLHTTPRequest to read + those feeds. + + * Introduce a section with modern recommended themes in the + themes backend menu. Themes can be included there by setting + Recommended: Yes in their info.txt + + * Merge sidebar and event upgrade pages in one single page + button + + * Add colorpicker as possible plugin option item type, set + type to 'color' to use it + + * Comments made via the backend on own articles don't trigger + the comment notification (thanks to xoxys) + + * Fix missing perm checks for "standard user" in MediaLibrary + + * Fix show Dashboard entries by authors entries + + * Fix show Dashboard comments by authors entries (#385) + * Use CDATA encoded body for ATOM feed * Fix: Ajax upload to ML now also works for non-images - * Added new theme "Clean-Blog". Clean Blog is a fully responsive, + * Added new theme "Clean-Blog". Clean Blog is a fully responsive, mobile first HTML5/CSS3 theme built on the Bootstrap framework. @@ -118,9 +294,9 @@ Version 2.0.3 (January 4th, 2016) * Fix XSS in backend comment editing form for logged-in authors, thanks to Onur Yilmaz and Robert Abela from Netsparker.com - + * Fix some backend entry form related event messages - + Version 2.0.2 (July 24th, 2015) ------------------------------------------------------------------------ @@ -132,7 +308,7 @@ Version 2.0.2 (July 24th, 2015) you have possible untrustworthy authors) - Add proper escaping for comment approval tokens to prevent SQL injection (authenticated authors only) - - Add proper escaping of comment's author names in the + - Add proper escaping of comment's author names in the comment reply form to prevent XSS (2k11 template, javascript based) @@ -164,7 +340,7 @@ Version 2.0.2 (July 24th, 2015) PLEASE NOTE: - 2.0.1 brought in an automatted include of a themes "user.css" + 2.0.1 brought in an automated include of a themes "user.css" file. If you don't want to use such file any more (and you have one), you will have to delete or rename it by hand! @@ -327,7 +503,7 @@ Version 2.0-rc2 (December 23rd, 2014) ------------------------------------------------------------------------ * Fixes escaping of comments in the new backend pane to prevent - XSS. Thanks to Steffen Röemann for reporting! + XSS. Thanks to Steffen R�emann for reporting! * Fix wrong parameter count in serendipity_entity_decode @@ -913,7 +1089,7 @@ Version 1.7 (May 11th, 2013) add that to .tpl files. (garvinhicking) - * Patch by Markus Brükner: Properly handle files that have no + * Patch by Markus Br�kner: Properly handle files that have no extension in media database * Made Spartacus recognize github.com mirror (garvinhicking) diff --git a/docs/README b/docs/README index 610e8aac..36fcf47e 100644 --- a/docs/README +++ b/docs/README @@ -1,6 +1,5 @@ -####################################################################### -# README # -####################################################################### +README +------ -For the most up-to-date information on documentation, creating styles, -plugins and so on, please visit our wiki on http://www.s9y.org +For the most up-to-date information on documentation, creating styles, plugins +and so on, please visit our website on https://s9y.org \ No newline at end of file diff --git a/docs/RELEASE b/docs/RELEASE index d3391ebc..be245ae1 100644 --- a/docs/RELEASE +++ b/docs/RELEASE @@ -1,2 +1,2 @@ -stable:2.0.3 -beta:2.0.3 +stable:2.1.1 +beta:2.1.1 diff --git a/htmlarea/ckeditor_s9y_config.js b/htmlarea/ckeditor_s9y_config.js index 59af1846..b973bbe9 100644 --- a/htmlarea/ckeditor_s9y_config.js +++ b/htmlarea/ckeditor_s9y_config.js @@ -154,7 +154,7 @@ CKEDITOR.editorConfig = function( config ) { /** SECTION: Certain Plugin Buttons We cheat ckeditor instances by adding all available button names (in s9ypluginbuttons) to "both" toolbar instances, in case of having two textareas. - The instanciation will only take the ones being currently initiated in wysiwyg_init.tpl output, in the source code. + The instantiation will only take the ones being currently initiated in wysiwyg_init.tpl output, in the source code. The hooked and added extraPlugins in wysiwyg_init become not automatically true for preset toolbars (Basic, Standard, Full) like this, but do for the fallback toolbarGroups later on. */ // concat button arrays diff --git a/htmlarea/ckeditor_s9y_plugin.js b/htmlarea/ckeditor_s9y_plugin.js index 1632ec1d..476a6931 100644 --- a/htmlarea/ckeditor_s9y_plugin.js +++ b/htmlarea/ckeditor_s9y_plugin.js @@ -12,7 +12,7 @@ var s9ymediabuttons = []; // Init CKEDITOR added plugins - // Seperate by comma, no whitespace allowed, and keep last comma, since later on concatenated with Serendipity hooked plugins, eg MediaLibrary! + // Separate by comma, no whitespace allowed, and keep last comma, since later on concatenated with Serendipity hooked plugins, eg MediaLibrary! // For some CKEDITOR plugin you need the widget plugin, which is added here. // Plugin Dependencies: widget Add-on Dependencies: Line Utilities and Clipboard // mediaembed is a fast and simple YouTube code CKEditor-Plugin: v. 0.5+ (https://github.com/frozeman/MediaEmbed, 2013-09-12) to avoid ACF restrictions @@ -66,7 +66,7 @@ element.attributes.style = element.attributes.style.replace( /(?:^|\s)height\s*:\s*(\d+)px;?/i , '' ); //element.attributes.height = height; // Do not add to element attribute height, since then the height will be automatically (re-) added to style again by ckeditor or image js - // The current result is now: img alt class src style{width}. That is the only working state to get arround this issue in a relative simple way! + // The current result is now: img alt class src style{width}. That is the only working state to get around this issue in a relative simple way! // Remember: Turning ACF OFF, will leave code alone, but still removes the height="" attribute! (workaround in extraAllowedContent added img[height]!) } } diff --git a/include/admin/comments.inc.php b/include/admin/comments.inc.php index dab1942f..f4c75bc7 100644 --- a/include/admin/comments.inc.php +++ b/include/admin/comments.inc.php @@ -4,32 +4,28 @@ if (IN_serendipity !== true) { die ("Don't hack!"); } -if (!serendipity_checkPermission('adminComments')) { - return; -} - $data = array(); $commentsPerPage = (int)(!empty($serendipity['GET']['filter']['perpage']) ? $serendipity['GET']['filter']['perpage'] : 10); $summaryLength = 200; -$errormsg = ''; -$msg = ''; +$errormsg = array(); +$msg = array(); if ($serendipity['POST']['formAction'] == 'multiDelete' && sizeof($serendipity['POST']['delete']) != 0 && serendipity_checkFormToken()) { if ($serendipity['POST']['togglemoderate'] != '') { foreach ( $serendipity['POST']['delete'] as $k => $v ) { $ac = serendipity_approveComment((int)$k, (int)$v, false, 'flip'); if ($ac > 0) { - $msg .= DONE . ': '. sprintf(COMMENT_APPROVED, (int)$k); + $msg[] = DONE . ': '. sprintf(COMMENT_APPROVED, (int)$k); } else { - $msg .= DONE . ': '. sprintf(COMMENT_MODERATED, (int)$k); + $msg[] = DONE . ': '. sprintf(COMMENT_MODERATED, (int)$k); } } } else { foreach ( $serendipity['POST']['delete'] as $k => $v ) { serendipity_deleteComment($k, $v); - $msg .= DONE . ': '. sprintf(COMMENT_DELETED, (int)$k); + $msg[] = DONE . ': '. sprintf(COMMENT_DELETED, (int)$k); } } } @@ -48,7 +44,7 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio entry_id = " . (int)$serendipity['POST']['entry_id']; serendipity_db_query($sql); serendipity_plugin_api::hook_event('backend_updatecomment', $serendipity['POST'], $serendipity['GET']['id']); - $msg .= COMMENT_EDITED; + $msg[] = COMMENT_EDITED; } /* Submit a new comment */ @@ -60,17 +56,18 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio $comment['email'] = $serendipity['POST']['email']; $comment['subscribe'] = $serendipity['POST']['subscribe']; $comment['parent_id'] = $serendipity['POST']['replyTo']; + if (!empty($comment['comment'])) { if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) { $data['commentReplied'] = true; echo serendipity_smarty_show('admin/comments.inc.tpl', $data); return true; } else { - $errormsg .= COMMENT_NOT_ADDED; + $errormsg[] = COMMENT_NOT_ADDED; $serendipity['GET']['adminAction'] = 'reply'; } } else { - $errormsg .= COMMENT_NOT_ADDED; + $errormsg[] = COMMENT_NOT_ADDED; $serendipity['GET']['adminAction'] = 'reply'; } } @@ -85,10 +82,10 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio $rs = serendipity_db_query($sql, true); if ($rs === false) { - $errormsg .= ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); + $errormsg[] = ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); } else { serendipity_approveComment((int)$serendipity['GET']['id'], (int)$rs['entry_id']); - $msg .= DONE . ': '. sprintf(COMMENT_APPROVED, (int)$serendipity['GET']['id']); + $msg[] = DONE . ': '. sprintf(COMMENT_APPROVED, (int)$serendipity['GET']['id']); } } @@ -101,17 +98,17 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio $rs = serendipity_db_query($sql, true); if ($rs === false) { - $errormsg .= ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); + $errormsg[] = ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); } else { serendipity_approveComment((int)$serendipity['GET']['id'], (int)$rs['entry_id'], true, true); - $msg .= DONE . ': '. sprintf(COMMENT_MODERATED, (int)$serendipity['GET']['id']); + $msg[] = DONE . ': '. sprintf(COMMENT_MODERATED, (int)$serendipity['GET']['id']); } } /* We are asked to delete a comment */ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminAction'] == 'delete' && serendipity_checkFormToken()) { serendipity_deleteComment($serendipity['GET']['id'], $serendipity['GET']['entry_id']); - $msg .= DONE . ': '. sprintf(COMMENT_DELETED, (int)$serendipity['GET']['id']); + $msg[] = DONE . ': '. sprintf(COMMENT_DELETED, (int)$serendipity['GET']['id']); } /* We are either in edit mode, or preview mode */ @@ -274,17 +271,19 @@ if ($commentsPerPage == COMMENTS_FILTER_ALL) { $limit = serendipity_db_limit_sql(serendipity_db_limit(($page-1)*(int)$commentsPerPage, (int)$commentsPerPage)); } -$sql = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c - LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) - WHERE 1 = 1 " . ($c_type !== null ? " AND c.type = '$c_type' " : '') . $and - . (!serendipity_checkPermission('adminEntriesMaintainOthers') ? 'AND e.authorid = ' . (int)$serendipity['authorid'] : '') . " +$sql = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c + LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) + WHERE 1 = 1 " . ($c_type !== null ? " AND c.type = '$c_type' " : '') . $and + . (!serendipity_checkPermission('adminEntriesMaintainOthers') ? 'AND e.authorid = ' . (int)$serendipity['authorid'] : '') . " ORDER BY c.id DESC $limit"); -ob_start(); -# This event has to get send here so the spamblock-plugin can block an author now and the comment_page show that on this pageload -serendipity_plugin_api::hook_event('backend_comments_top', $sql); -$data['backend_comments_top'] = ob_get_contents(); -ob_end_clean(); +if (serendipity_checkPermission('adminComments')) { + ob_start(); + # This event has to get send here so the spamblock-plugin can block an author now and the comment_page show that on this pageload + serendipity_plugin_api::hook_event('backend_comments_top', $sql); + $data['backend_comments_top'] = ob_get_contents(); + ob_end_clean(); +} $data['commentsPerPage'] = $commentsPerPage; $data['totalComments'] = $totalComments; diff --git a/include/admin/configuration.inc.php b/include/admin/configuration.inc.php index c656b654..c87d9e5e 100644 --- a/include/admin/configuration.inc.php +++ b/include/admin/configuration.inc.php @@ -1,4 +1,4 @@ - 0) { $term = str_replace('&', '&', $term); - $filter[] = "( + $filter[] = "( to_tsvector('english', title) @@to_tsquery('$term') OR to_tsvector('english', body) @@to_tsquery('$term') OR to_tsvector('english', extended) @@to_tsquery('$term') @@ -354,7 +354,8 @@ switch($serendipity['GET']['adminAction']) { } } - $smartentries[] = array( + + $smartentry = array( 'id' => $ey['id'], 'title' => serendipity_specialchars($ey['title']), 'timestamp' => (int)$ey['timestamp'], @@ -368,6 +369,8 @@ switch($serendipity['GET']['adminAction']) { 'archive_link' => serendipity_archiveURL($ey['id'], $ey['title'], 'serendipityHTTPPath', true, array('timestamp' => $ey['timestamp'])), 'preview_link' => '?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=preview&' . serendipity_setFormToken('url') . '&serendipity[id]=' . $ey['id'] ); + serendipity_plugin_api::hook_event('backend_view_entry', $smartentry); + $smartentries[] = $smartentry; } @@ -402,7 +405,7 @@ switch($serendipity['GET']['adminAction']) { return; // blank content page, but default token check parameter is presenting a XSRF message when false } if (!is_array($serendipity['POST']['multiDelete'])) { - echo '
' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '
'."\n"; + echo '
' . sprintf(MULTICHECK_NO_ITEM, serendipity_specialchars($_SERVER['HTTP_REFERER'])) . '
'."\n"; break; } @@ -445,4 +448,4 @@ if (!isset($data['formtoken'])) $data['formtoken'] = serendipity_setFormToken(); echo serendipity_smarty_show('admin/entries.inc.tpl', $data); -/* vim: set sts=4 ts=4 expandtab : */ +/* vim: set sts=4 ts=4 expandtab : */ \ No newline at end of file diff --git a/include/admin/entries_overview.inc.php b/include/admin/entries_overview.inc.php index 4a15cea9..9bdc9723 100644 --- a/include/admin/entries_overview.inc.php +++ b/include/admin/entries_overview.inc.php @@ -1,4 +1,4 @@ - ' . RIP_ENTRY . "\n", $serendipity['GET']['fid']); + $messages[] = sprintf(' ' . RIP_ENTRY . "\n", $serendipity['GET']['fid']); $data['messages'] = $messages; unset($messages); @@ -93,7 +93,7 @@ switch ($serendipity['GET']['adminAction']) { if ($id > 0) { $image = serendipity_fetchImageFromDatabase($id); $messages[] = serendipity_deleteImage((int)$id); - $messages[] = sprintf(' ' . RIP_ENTRY . "\n", $image['id'] . ' - ' . serendipity_specialchars($image['realname'])); + $messages[] = sprintf(' ' . RIP_ENTRY . "\n", $image['id'] . ' - ' . serendipity_specialchars($image['realname'])); } } $data['showML'] = showMediaLibrary(); @@ -120,37 +120,33 @@ switch ($serendipity['GET']['adminAction']) { break; case 'multidelete': - if (!serendipity_checkFormToken()) { + if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDirectories')) { return; // blank content page, but default token check parameter is presenting a XSRF message when false } if (!is_array($serendipity['POST']['multiDelete']) && isset($_POST['toggle_move'])) { - echo '
' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '
'."\n"; + echo '
' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '
'."\n"; break; } - if (is_array($serendipity['POST']['multiDelete']) && isset($serendipity['POST']['oldDir']) && empty($serendipity['POST']['newDir']) && isset($_POST['toggle_move'])) { - echo '
' . sprintf(MULTICHECK_NO_DIR, $_SERVER['HTTP_REFERER']) . '
'."\n"; + if (is_array($serendipity['POST']['multiDelete']) && isset($serendipity['POST']['oldDir']) && (! isset($serendipity['POST']['newDir'])) && isset($_POST['toggle_move'])) { + echo '
' . sprintf(MULTICHECK_NO_DIR, $_SERVER['HTTP_REFERER']) . '
'."\n"; break; } // case bulk multimove (leave the fake oldDir being send as an empty dir) - if (isset($serendipity['POST']['oldDir']) && !empty($serendipity['POST']['newDir'])) { + if (isset($serendipity['POST']['newDir'])) { $messages = array(); $multiMoveImages = $serendipity['POST']['multiDelete']; // The 'multiDelete' key name should better be renamed to 'multiCheck', but this would need to change 2k11/admin/serendipity_editor.js, images.inc.tpl, media_items.tpl, media_pane.tpl and this file unset($serendipity['POST']['multiDelete']); - $oDir = ''; // oldDir is relative to Uploads/, since we can not specify a directory of a ML bulk move directly - $nDir = serendipity_specialchars((string)$serendipity['POST']['newDir']); // relative to Uploads/ + $nDir = serendipity_specialchars(serendipity_dirSlash('end', (string)$serendipity['POST']['newDir'])); // relative to Uploads/ - if ($oDir != $nDir) { - foreach($multiMoveImages AS $mkey => $move_id) { - $file = serendipity_fetchImageFromDatabase((int)$move_id); - $oDir = $file['path']; // this now is the exact oldDir path of this ID - if (serendipity_moveMediaDirectory($oDir, $nDir, 'file', (int)$move_id, $file)) { - $messages[] = sprintf(' ' . MEDIA_DIRECTORY_MOVED . "\n", $nDir); - } else { - $messages[] = sprintf(' ' . MEDIA_DIRECTORY_MOVE_ERROR . "\n", $nDir); - } + foreach($multiMoveImages AS $mkey => $move_id) { + if (serendipity_moveMediaDirectory('', $nDir, 'file', (int)$move_id)) { + $messages[] = sprintf(' ' . MEDIA_DIRECTORY_MOVED . "\n", $nDir); + } else { + $messages[] = sprintf(' ' . MEDIA_DIRECTORY_MOVE_ERROR . "\n", $nDir); } } + $data['messages'] = $messages; unset($messages); // remember to return to last selected media library directory @@ -182,21 +178,10 @@ switch ($serendipity['GET']['adminAction']) { case 'rename': $serendipity['GET']['fid'] = (int)$serendipity['GET']['fid']; - $file = serendipity_fetchImageFromDatabase($serendipity['GET']['fid']); - - if (LANG_CHARSET == 'UTF-8') { - // yeah, turn on content to be a real utf-8 string, which it isn't at this point! Else serendipity_makeFilename() can not work! - $serendipity['GET']['newname'] = utf8_encode($serendipity['GET']['newname']); - } - $serendipity['GET']['newname'] = str_replace(' ', '_', $serendipity['GET']['newname']); // keep serendipity_uploadSecure(URL) whitespace convert behaviour, when using serendipity_makeFilename() - $serendipity['GET']['newname'] = serendipity_uploadSecure(serendipity_makeFilename($serendipity['GET']['newname']), true); - - if (!is_array($file) || !serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete') || - (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) { + if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete')) { return; } - // since this is a javascript action only, all event success/error action messages have moved into js - serendipity_moveMediaDirectory(null, $serendipity['GET']['newname'], 'file', $serendipity['GET']['fid'], $file); + serendipity_renameFile($serendipity['GET']['fid'], $serendipity['GET']['newname']); break; case 'properties': @@ -218,11 +203,11 @@ switch ($serendipity['GET']['adminAction']) { $created_thumbnail = true; //?? $data['showML'] = showMediaLibrary(true); // in this case we do not need the location.href (removed) $propdone = sprintf(MEDIA_PROPERTIES_DONE, $image_id); - $data['messages'] = ' '.DONE.'! ' . $propdone . "\n"; + $data['messages'] = ' '.DONE.'! ' . $propdone . "\n"; break; } - $messages[] = ' ' . ADDING_IMAGE . "\n"; + $messages[] = ' ' . ADDING_IMAGE . "\n"; $authorid = 0; // Only use access-control based on media directories, not images themselves @@ -249,7 +234,7 @@ switch ($serendipity['GET']['adminAction']) { $tfile = serendipity_uploadSecure(serendipity_makeFilename($tfile)); if (serendipity_isActiveFile($tfile)) { - $messages[] = sprintf(' ' . ERROR_FILE_FORBIDDEN . "\n", $tfile); + $messages[] = sprintf(' ' . ERROR_FILE_FORBIDDEN . "\n", $tfile); break; } @@ -257,70 +242,86 @@ switch ($serendipity['GET']['adminAction']) { $target = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex] . $tfile; if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$tindex])) { - $messages[] = ' ' . PERM_DENIED . "\n"; + $messages[] = ' ' . PERM_DENIED . "\n"; return; } $realname = $tfile; if (file_exists($target)) { - $messages[] = ' ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "\n"; + $messages[] = ' ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "\n"; $realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex]); } - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); serendipity_plugin_api::hook_event('backend_http_request', $options, 'image'); serendipity_request_start(); - $req = new HTTP_Request($serendipity['POST']['imageurl'], $options); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } - // Try to get the URL - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { - $messages[] = sprintf(' ' . REMOTE_FILE_NOT_FOUND . "\n", $serendipity['POST']['imageurl']); + if (!serendipity_url_allowed($serendipity['POST']['imageurl'])) { + $messages[] = sprintf(' ' . REMOTE_FILE_INVALID . "\n", $serendipity['POST']['imageurl']); } else { - // Fetch file - $fContent = $req->getResponseBody(); + $req = new HTTP_Request2($serendipity['POST']['imageurl'], HTTP_Request2::METHOD_GET, $options); - if ($serendipity['POST']['imageimporttype'] == 'hotlink') { - $tempfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . '/hotlink_' . time(); - $fp = fopen($tempfile, 'w'); - fwrite($fp, $fContent); - fclose($fp); - - $image_id = @serendipity_insertHotlinkedImageInDatabase($tfile, $serendipity['POST']['imageurl'], $authorid, null, $tempfile); - $messages[] = sprintf(' ' . HOTLINK_DONE . "\n", $serendipity['POST']['imageurl'] , $tfile .''); - serendipity_plugin_api::hook_event('backend_image_addHotlink', $tempfile); - } else { - $fp = fopen($target, 'w'); - fwrite($fp, $fContent); - fclose($fp); - - $messages[] = sprintf(' ' . FILE_FETCHED . "\n", $serendipity['POST']['imageurl'] , $tfile . ''); - - if (serendipity_checkMediaSize($target)) { - $thumbs = array(array( - 'thumbSize' => $serendipity['thumbSize'], - 'thumb' => $serendipity['thumbSuffix'] - )); - serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs); - - foreach($thumbs as $thumb) { - // Create thumbnail - if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$tindex], $thumb['thumbSize'], $thumb['thumb']) ) { - $messages[] = ' ' . THUMB_CREATED_DONE . "\n"; - } - } - - // Insert into database - $image_id = serendipity_insertImageInDatabase($tfile, $serendipity['POST']['target_directory'][$tindex], $authorid, null, $realname); - serendipity_plugin_api::hook_event('backend_image_add', $target); - $new_media[] = array( - 'image_id' => $image_id, - 'target' => $target, - 'created_thumbnail' => $created_thumbnail - ); + // Try to get the URL + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not fetch image: status != 200'); } + // Fetch file + $fContent = $response->getBody(); + + $fUrl = $response->getEffectiveUrl(); + if (!serendipity_url_allowed($fUrl)) { + $messages[] = sprintf(' ' . REMOTE_FILE_INVALID . "\n", $fUrl); + } elseif ($serendipity['POST']['imageimporttype'] == 'hotlink') { + $tempfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . '/hotlink_' . time(); + $fp = fopen($tempfile, 'w'); + fwrite($fp, $fContent); + fclose($fp); + + $image_id = @serendipity_insertHotlinkedImageInDatabase($tfile, $serendipity['POST']['imageurl'], $authorid, null, $tempfile); + $messages[] = sprintf(' ' . HOTLINK_DONE . "\n", $serendipity['POST']['imageurl'] , $tfile .''); + serendipity_plugin_api::hook_event('backend_image_addHotlink', $tempfile); + } else { + $fp = fopen($target, 'w'); + fwrite($fp, $fContent); + fclose($fp); + + $messages[] = sprintf(' ' . FILE_FETCHED . "\n", $serendipity['POST']['imageurl'] , $tfile . ''); + + if (serendipity_checkMediaSize($target)) { + $thumbs = array(array( + 'thumbSize' => $serendipity['thumbSize'], + 'thumb' => $serendipity['thumbSuffix'] + )); + serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs, $tfile); + + foreach($thumbs as $thumb) { + // Create thumbnail + if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$tindex], $thumb['thumbSize'], $thumb['thumb']) ) { + $messages[] = ' ' . THUMB_CREATED_DONE . "\n"; + } + } + + // Insert into database + $image_id = serendipity_insertImageInDatabase($tfile, $serendipity['POST']['target_directory'][$tindex], $authorid, null, $realname); + serendipity_plugin_api::hook_event('backend_image_add', $target); + $new_media[] = array( + 'image_id' => $image_id, + 'target' => $target, + 'created_thumbnail' => $created_thumbnail + ); + } + } + serendipity_request_end(); + } catch (HTTP_Request2_Exception $e) { + $messages[] = sprintf(' ' . REMOTE_FILE_NOT_FOUND . "\n", $serendipity['POST']['imageurl']); } - serendipity_request_end(); } } else { if (!is_array($_FILES['serendipity']['name']['userfile'])) { @@ -352,14 +353,14 @@ switch ($serendipity['GET']['adminAction']) { $tfile = serendipity_uploadSecure(serendipity_makeFilename($tfile)); if (serendipity_isActiveFile($tfile)) { - $messages[] = ' ' . ERROR_FILE_FORBIDDEN .' '. $tfile . "\n"; + $messages[] = ' ' . ERROR_FILE_FORBIDDEN .' '. $tfile . "\n"; continue; } $serendipity['POST']['target_directory'][$idx] = serendipity_uploadSecure($serendipity['POST']['target_directory'][$idx], true, true); if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$idx])) { - $messages[] = ' ' . PERM_DENIED . "\n"; + $messages[] = ' ' . PERM_DENIED . "\n"; continue; } @@ -367,13 +368,13 @@ switch ($serendipity['GET']['adminAction']) { $realname = $tfile; if (file_exists($target)) { - $messages[] = ' ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "\n"; + $messages[] = ' ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "\n"; $realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$idx]); } // Accept file if (is_uploaded_file($uploadtmp) && serendipity_checkMediaSize($uploadtmp) && move_uploaded_file($uploadtmp, $target)) { - $messages[] = sprintf(' ' . FILE_UPLOADED . "\n", $uploadfile , $target); + $messages[] = sprintf(' ' . FILE_UPLOADED . "\n", $uploadfile , $target); @umask(0000); @chmod($target, 0664); @@ -381,12 +382,12 @@ switch ($serendipity['GET']['adminAction']) { 'thumbSize' => $serendipity['thumbSize'], 'thumb' => $serendipity['thumbSuffix'] )); - serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs); + serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs, $target); foreach($thumbs as $thumb) { // Create thumbnail if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$idx], $thumb['thumbSize'], $thumb['thumb']) ) { - $messages[] = ' ' . THUMB_CREATED_DONE . "\n"; + $messages[] = ' ' . THUMB_CREATED_DONE . "\n"; } } @@ -401,7 +402,7 @@ switch ($serendipity['GET']['adminAction']) { } else { // necessary for the ajax-uplaoder to show upload errors header("Internal Server Error", true, 500); - $messages[] = ' ' . ERROR_UNKNOWN_NOUPLOAD . "\n"; + $messages[] = ' ' . ERROR_UNKNOWN_NOUPLOAD . "\n"; } } } @@ -476,7 +477,7 @@ switch ($serendipity['GET']['adminAction']) { if ($oldDir != $newDir) { //is this possible? Ian: YES! Change an already set directory. ob_start(); - serendipity_moveMediaDirectory($oldDir, $newDir); + serendipity_renameDir($oldDir, $newDir); $data['messages'] = ob_get_contents(); ob_end_clean(); $use_dir = $newDir; @@ -534,7 +535,7 @@ switch ($serendipity['GET']['adminAction']) { /* TODO: check if directory already exist */ if (is_dir($nd) || @mkdir($nd)) { - $data['print_DIRECTORY_CREATED'] = sprintf(DIRECTORY_CREATED, $serendipity['POST']['name']); + $data['print_DIRECTORY_CREATED'] = sprintf(DIRECTORY_CREATED, $new_dir); @umask(0000); @chmod($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $new_dir, 0777); @@ -635,7 +636,8 @@ switch ($serendipity['GET']['adminAction']) { 'maxImgHeight' => $serendipity['maxImgHeight'], 'maxImgWidth' => $serendipity['maxImgWidth'], 'extraParems' => serendipity_generateImageSelectorParems(), - 'manage' => isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true + 'manage' => isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true, + 'multiperm' => serendipity_checkPermission('adminImagesDirectories') ); // ToDo later: merge $data and $media $serendipity['smarty']->assign('media', $mediaFiles); @@ -685,7 +687,7 @@ switch ($serendipity['GET']['adminAction']) { $data['case_scale'] = true; // this allows to use the showML fallback too if ($serendipity['GET']['width'] == $file['dimensions_width'] && $serendipity['GET']['height'] == $file['dimensions_height']) { - $data['messages'] = ' ' . MEDIA_RESIZE_EXISTS . ''; + $data['messages'] = ' ' . MEDIA_RESIZE_EXISTS . ''; } else { $data['print_SCALING_IMAGE'] = sprintf( SCALING_IMAGE, @@ -710,7 +712,7 @@ switch ($serendipity['GET']['adminAction']) { if (!is_array($file) || !serendipity_checkPermission('adminImagesDelete') || (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) { return; } - + $data['extraParems'] = serendipity_generateImageSelectorParems('form'); $data['case_scaleSelect'] = true; $s = getimagesize($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $file['name'] . ($file['extension'] ? '.'. $file['extension'] : "")); @@ -771,4 +773,4 @@ $data['get']['only_path'] = $serendipity['GET']['only_path']; echo serendipity_smarty_show('admin/images.inc.tpl', $data); -/* vim: set sts=4 ts=4 expandtab : */ +/* vim: set sts=4 ts=4 expandtab : */ \ No newline at end of file diff --git a/include/admin/import.inc.php b/include/admin/import.inc.php index 61e517cf..943c5988 100644 --- a/include/admin/import.inc.php +++ b/include/admin/import.inc.php @@ -162,8 +162,8 @@ class Serendipity_Import { * * @access public * @param string SQL Query - * @param ressource DB connection resource - * @return ressource SQL response + * @param resource DB connection resource + * @return resource SQL response */ function &nativeQuery($query, $db = false) { global $serendipity; diff --git a/include/admin/importers/b2evolution.inc.php b/include/admin/importers/b2evolution.inc.php index bb261bc6..c58e73a5 100644 --- a/include/admin/importers/b2evolution.inc.php +++ b/include/admin/importers/b2evolution.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_b2evolution extends Serendipity_Import { return ''; } - function Serendipity_Import_b2evolution($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/bblog.inc.php b/include/admin/importers/bblog.inc.php index f660c56a..7e2d802f 100644 --- a/include/admin/importers/bblog.inc.php +++ b/include/admin/importers/bblog.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_bblog extends Serendipity_Import { var $inputFields = array(); var $categories = array(); - function Serendipity_Import_bblog($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/blogger.inc.php b/include/admin/importers/blogger.inc.php index 18b3d8a3..e095bece 100644 --- a/include/admin/importers/blogger.inc.php +++ b/include/admin/importers/blogger.inc.php @@ -6,14 +6,14 @@ * Blogger Importer v0.2, by Jawish Hameed (jawish.org) * ****************************************************************/ -require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; +require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; class Serendipity_Import_Blogger extends Serendipity_Import { var $info = array('software' => 'Blogger.com [using API]'); var $data = array(); var $inputFields = array(); - function Serendipity_Import_Blogger($data) { + function __construct($data) { global $serendipity; $this->data = $data; @@ -56,17 +56,22 @@ class Serendipity_Import_Blogger extends Serendipity_Import { if (!empty($_REQUEST['token'])) { // Prepare session token request - $req = new HTTP_Request('https://www.google.com/accounts/AuthSubSessionToken'); - $req->addHeader('Authorization', 'AuthSub token="'. $_REQUEST['token'] .'"'); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2('https://www.google.com/accounts/AuthSubSessionToken', HTTP_Request2::METHOD_GET, $options); + $req->setHeader('Authorization', 'AuthSub token="'. $_REQUEST['token'] .'"'); // Request token - $req->sendRequest(); + $response = $req->send(); - // Handle token reponse - if ($req->getResponseCode() != '200') return; + // Handle token response + if ($response->getStatus() != '200') return; // Extract Auth token - preg_match_all('/^(.+)=(.+)$/m', $req->getResponseBody(), $matches); + preg_match_all('/^(.+)=(.+)$/m', $response->getBody(), $matches); $tokens = array_combine($matches[1], $matches[2]); unset($matches); @@ -77,18 +82,18 @@ class Serendipity_Import_Blogger extends Serendipity_Import { 'default' => $tokens['Token'])); // Prepare blog list request - $req = new HTTP_Request('http://www.blogger.com/feeds/default/blogs'); - $req->addHeader('GData-Version', 2); - $req->addHeader('Authorization', 'AuthSub token="'. $tokens['Token'] .'"'); + $req = new HTTP_Request2('http://www.blogger.com/feeds/default/blogs'); + $req->setHeader('GData-Version', 2); + $req->setHeader('Authorization', 'AuthSub token="'. $tokens['Token'] .'"'); // Fetch blog list - $req->sendRequest(); + $response = $req->send(); // Handle errors - if ($req->getResponseCode() != '200') return false; + if ($response->getStatus() != '200') return false; // Load list - $bXml = simplexml_load_string($req->getResponseBody()); + $bXml = simplexml_load_string($response->getBody()); // Generate list of the blogs under the authenticated account $bList = array(); @@ -139,16 +144,16 @@ class Serendipity_Import_Blogger extends Serendipity_Import { $this->getTransTable(); // Prepare export request - $req = new HTTP_Request('http://www.blogger.com/feeds/'. $this->data['bId'] .'/archive'); - $req->addHeader('GData-Version', 2); - $req->addHeader('Authorization', 'AuthSub token="'. $this->data['bAuthToken'] .'"'); + $req = new HTTP_Request2('http://www.blogger.com/feeds/'. $this->data['bId'] .'/archive'); + $req->setHeader('GData-Version', 2); + $req->setHeader('Authorization', 'AuthSub token="'. $this->data['bAuthToken'] .'"'); // Attempt fetch blog export - $req->sendRequest(); + $response = $req->send(); // Handle errors - if ($req->getResponseCode() != '200') { - echo "Error occured while trying to export the blog."; + if ($response->getStatus() != '200') { + echo "Error occurred while trying to export the blog."; return false; } @@ -164,7 +169,7 @@ class Serendipity_Import_Blogger extends Serendipity_Import { unset($s9y_users); // Load export - $bXml = simplexml_load_string($req->getResponseBody()); + $bXml = simplexml_load_string($response->getBody()); // Process entries $entryList = $entryFailList = array(); diff --git a/include/admin/importers/bmachine.inc.php b/include/admin/importers/bmachine.inc.php index 2aed03da..4e3d61be 100644 --- a/include/admin/importers/bmachine.inc.php +++ b/include/admin/importers/bmachine.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_bmachine extends Serendipity_Import { return ''; } - function Serendipity_Import_bmachine($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/geeklog.inc.php b/include/admin/importers/geeklog.inc.php index bd21bb93..cbb144df 100644 --- a/include/admin/importers/geeklog.inc.php +++ b/include/admin/importers/geeklog.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_geeklog extends Serendipity_Import { return 'GeekLog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.'; } - function Serendipity_Import_geeklog($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/generic.inc.php b/include/admin/importers/generic.inc.php index 27aeaedd..bfaa2f6c 100644 --- a/include/admin/importers/generic.inc.php +++ b/include/admin/importers/generic.inc.php @@ -10,7 +10,7 @@ class Serendipity_Import_Generic extends Serendipity_Import { var $inputFields = array(); var $force_recode = false; - function Serendipity_Import_Generic($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => RSS . ' ' . URL, 'type' => 'input', @@ -139,18 +139,26 @@ class Serendipity_Import_Generic extends Serendipity_Import { $serendipity['noautodiscovery'] = 1; $uri = $this->data['url']; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($uri, array('allowRedirects' => true, 'maxRedirects' => 5)); - $res = $req->sendRequest(); - - if (PEAR::isError($res) || $req->getResponseCode() != '200') { + $options = array('follow_redirects' => true, 'max_redirects' => 5); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_GET, $options); + try { + $res = $req->send(); + if ($res->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not fetch url: status != 200'); + } + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); echo '' . IMPORT_FAILED . ': ' . serendipity_specialchars($this->data['url']) . ''; return false; } - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); echo '' . strlen($fContent) . " Bytes"; diff --git a/include/admin/importers/lifetype.inc.php b/include/admin/importers/lifetype.inc.php index 2ea1cef4..10a4c85c 100644 --- a/include/admin/importers/lifetype.inc.php +++ b/include/admin/importers/lifetype.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_lifetype extends Serendipity_Import { return ''; } - function Serendipity_Import_lifetype($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/livejournal.inc.php b/include/admin/importers/livejournal.inc.php index a2fd6468..a8b7e088 100644 --- a/include/admin/importers/livejournal.inc.php +++ b/include/admin/importers/livejournal.inc.php @@ -11,7 +11,7 @@ class Serendipity_Import_LiveJournalXML extends Serendipity_Import { var $inputFields = array(); var $force_recode = false; - function Serendipity_Import_LiveJournalXML($data) { + function __construct($data) { global $serendipity; $this->data = $data; $this->inputFields = array(array('text' => 'LiveJournal XML', diff --git a/include/admin/importers/movabletype.inc.php b/include/admin/importers/movabletype.inc.php index 6cad6633..f79ce0c3 100644 --- a/include/admin/importers/movabletype.inc.php +++ b/include/admin/importers/movabletype.inc.php @@ -24,7 +24,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import { var $data = array(); var $inputFields = array(); - function Serendipity_Import_MovableType($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => MT_DATA_FILE, 'type' => 'file', diff --git a/include/admin/importers/nucleus.inc.php b/include/admin/importers/nucleus.inc.php index aefff762..2598e058 100644 --- a/include/admin/importers/nucleus.inc.php +++ b/include/admin/importers/nucleus.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_Nucleus extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_Nucleus($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/nuke.inc.php b/include/admin/importers/nuke.inc.php index 47648f3e..c34058ad 100644 --- a/include/admin/importers/nuke.inc.php +++ b/include/admin/importers/nuke.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_nuke extends Serendipity_Import { return ''; } - function Serendipity_Import_nuke($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/old_blogger.inc.php b/include/admin/importers/old_blogger.inc.php index b0099a54..d8f59e98 100644 --- a/include/admin/importers/old_blogger.inc.php +++ b/include/admin/importers/old_blogger.inc.php @@ -7,7 +7,7 @@ class Serendipity_Import_OldBlogger extends Serendipity_Import { var $data = array(); var $inputFields = array(); - function Serendipity_Import_OldBlogger($data) { + function __construct($data) { global $serendipity; $this->data = $data; diff --git a/include/admin/importers/phpbb.inc.php b/include/admin/importers/phpbb.inc.php index 5c8a35b4..0505930b 100644 --- a/include/admin/importers/phpbb.inc.php +++ b/include/admin/importers/phpbb.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_phpbb extends Serendipity_Import { var $inputFields = array(); var $categories = array(); - function Serendipity_Import_phpbb($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/pivot.inc.php b/include/admin/importers/pivot.inc.php index cb6a6166..b087062b 100644 --- a/include/admin/importers/pivot.inc.php +++ b/include/admin/importers/pivot.inc.php @@ -10,7 +10,7 @@ class Serendipity_Import_Pivot extends Serendipity_Import { var $data = array(); var $inputFields = array(); - function Serendipity_Import_Pivot($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => PARENT_DIRECTORY, 'type' => 'input', diff --git a/include/admin/importers/pmachine.inc.php b/include/admin/importers/pmachine.inc.php index 751dbcc1..692a9d01 100644 --- a/include/admin/importers/pmachine.inc.php +++ b/include/admin/importers/pmachine.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_pMachine extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_pMachine($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/serendipity.inc.php b/include/admin/importers/serendipity.inc.php index 871b48b2..1be32319 100644 --- a/include/admin/importers/serendipity.inc.php +++ b/include/admin/importers/serendipity.inc.php @@ -24,7 +24,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {

After these precautions: The importer code generally works very well for me and my purposes. Your mileage may vary.

'; } - function Serendipity_Import_Serendipity ($data) { + function __construct($data) { global $serendipity; $this->data = $data; diff --git a/include/admin/importers/smf.inc.php b/include/admin/importers/smf.inc.php index e2690467..28afcede 100644 --- a/include/admin/importers/smf.inc.php +++ b/include/admin/importers/smf.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_smf extends Serendipity_Import { return '

SMF uses salted MD5 passwords that Serendipity cannot import. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to a random string. You need to modify the passwords manually for each user, we are sorry for that inconvenience.

'; } - function Serendipity_Import_smf($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/sunlog.inc.php b/include/admin/importers/sunlog.inc.php index 8a843128..03309d3c 100644 --- a/include/admin/importers/sunlog.inc.php +++ b/include/admin/importers/sunlog.inc.php @@ -17,7 +17,7 @@ class Serendipity_Import_sunlog extends Serendipity_Import { . '

Sunlog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.

'; } - function Serendipity_Import_sunlog($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/textpattern.inc.php b/include/admin/importers/textpattern.inc.php index cf7f9dfe..73220eec 100644 --- a/include/admin/importers/textpattern.inc.php +++ b/include/admin/importers/textpattern.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_textpattern extends Serendipity_Import { return '

Textpattern uses MySQLs native PASSWORD() function to save passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to "txp". You need to modify the passwords manually for each user, we are sorry for that inconvenience.

'; } - function Serendipity_Import_textpattern($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/voodoopad.inc.php b/include/admin/importers/voodoopad.inc.php index c5cf82d0..919be871 100755 --- a/include/admin/importers/voodoopad.inc.php +++ b/include/admin/importers/voodoopad.inc.php @@ -41,7 +41,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import { var $inputFields = array(); var $force_recode = false; - function Serendipity_Import_VoodooPad($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array( array('text' => IMPORTER_VOODOO_FILEPROMPT, diff --git a/include/admin/importers/wordpress-pg.inc.php b/include/admin/importers/wordpress-pg.inc.php index 5610b8e9..8aa6d368 100644 --- a/include/admin/importers/wordpress-pg.inc.php +++ b/include/admin/importers/wordpress-pg.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_WordPress_PG extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_WordPress_PG($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/wordpress.inc.php b/include/admin/importers/wordpress.inc.php index bd1b663c..dfcd32c2 100644 --- a/include/admin/importers/wordpress.inc.php +++ b/include/admin/importers/wordpress.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_WordPress($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/installer.inc.php b/include/admin/installer.inc.php index 9011ca5c..1edd4b26 100644 --- a/include/admin/installer.inc.php +++ b/include/admin/installer.inc.php @@ -33,7 +33,7 @@ $data['templatePath'] = $serendipity['templatePath']; $data['installerHTTPPath'] = str_replace('//', '/', dirname($_SERVER['PHP_SELF']) . '/'); // since different OS handlers for enddir /** - * Checks a return code constant if it's successfull or an error and return HTML code + * Checks a return code constant if it's successful or an error and return HTML code * * The diagnosis checks return codes of several PHP checks. Depending * on the input, a specially formatted string is returned. @@ -46,7 +46,7 @@ $data['installerHTTPPath'] = str_replace('//', '/', dirname($_SERVER['PHP_SELF'] function serendipity_installerResultDiagnose($result, $s) { global $errorCount, $data; if ( $result === S9Y_I_SUCCESS ) { - $data['i_success'] = true; // we dont need data here explicitely, but we keep it for possible future purposes + $data['i_success'] = true; // we don't need data here explicitly, but we keep it for possible future purposes return ''. $s .''; } if ( $result === S9Y_I_WARNING ) { @@ -69,7 +69,7 @@ if (!empty($serendipity['POST']['getstep']) && is_numeric($serendipity['POST'][' /* From configuration to install */ if ( sizeof($_POST) > 1 && $serendipity['GET']['step'] == '3' ) { - /* One problem, if the user chose to do an easy install, not all config vars has been transfered + /* One problem, if the user chose to do an easy install, not all config vars has been transferred Therefore we fetch all config vars with their default values, and merge them with our POST data */ $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE); diff --git a/include/admin/overview.inc.php b/include/admin/overview.inc.php index 1b5a7235..6eff4ce7 100644 --- a/include/admin/overview.inc.php +++ b/include/admin/overview.inc.php @@ -52,20 +52,17 @@ $data['update'] = version_compare($data['usedVersion'], $data['curVersion' serendipity_plugin_api::hook_event('plugin_dashboard_updater', $output, $data['curVersion']); $data['updateButton'] = $output; -// Can be set through serendipity_config_local.inc.php -if (!isset($serendipity['dashboardCommentsLimit'])) { - $serendipity['dashboardCommentsLimit'] = 5; -} -if (!isset($serendipity['dashboardLimit'])) { - $serendipity['dashboardLimit'] = 5; -} -if (!isset($serendipity['dashboardDraftLimit'])) { - $serendipity['dashboardDraftLimit'] = 5; -} +$cjoin = ($serendipity['serendipityUserlevel'] == USERLEVEL_EDITOR) ? " + LEFT JOIN {$serendipity['dbPrefix']}authors a ON (e.authorid = a.authorid) + WHERE e.authorid = " . (int)$serendipity['authorid'] + : ''; +$cquery = "SELECT c.*, e.title, e.authorid + FROM {$serendipity['dbPrefix']}comments c + LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) + " . $cjoin ." + ORDER BY c.id DESC LIMIT " . (int)$serendipity['dashboardCommentsLimit']; +$comments = serendipity_db_query($cquery); -$comments = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c - LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) - ORDER BY c.id DESC LIMIT " . (int)$serendipity['dashboardCommentsLimit']); if (is_array($comments) && count($comments) > 0) { foreach ($comments as &$comment) { $comment['entrylink'] = serendipity_archiveURL($comment['entry_id'], 'comments', 'serendipityHTTPPath', true) . '#c' . $comment['id']; @@ -85,28 +82,31 @@ if (is_array($comments) && count($comments) > 0) { $data['comments'] = $comments; - +$efilter = ($serendipity['serendipityUserlevel'] == USERLEVEL_EDITOR) ? ' AND e.authorid = ' . (int)$serendipity['authorid'] : ''; $entries = serendipity_fetchEntries( false, false, - (int)$serendipity['dashboardLimit'], + (int)$serendipity['dashboardEntriesLimit'], true, false, 'timestamp DESC', - 'e.timestamp >= ' . serendipity_serverOffsetHour() + 'e.timestamp >= ' . serendipity_serverOffsetHour() . $efilter ); -$entriesAmount = count($entries); -if ($entriesAmount < (int)$serendipity['dashboardDraftLimit']) { +$entriesAmount = 0; +if (is_array($entries)) { + $entriesAmount = count($entries); +}; +if ($entriesAmount < (int)$serendipity['dashboardEntriesLimit']) { // there is still space for drafts $drafts = serendipity_fetchEntries( false, false, - (int)$serendipity['dashboardDraftLimit'] - $entriesAmount, + (int)$serendipity['dashboardEntriesLimit'] - $entriesAmount, true, false, 'timestamp DESC', - "isdraft = 'true' AND e.timestamp <= " . serendipity_serverOffsetHour() + "isdraft = 'true' AND e.timestamp <= " . serendipity_serverOffsetHour() . $efilter ); if (is_array($entries) && is_array($drafts)) { $entries = array_merge($entries, $drafts); diff --git a/include/admin/personal.inc.php b/include/admin/personal.inc.php index 338a4592..5e2555cf 100644 --- a/include/admin/personal.inc.php +++ b/include/admin/personal.inc.php @@ -46,7 +46,7 @@ if ($serendipity['GET']['adminAction'] == 'save' && serendipity_checkFormToken() if (in_array('groups', $item['flags'])) { if (serendipity_checkPermission('adminUsersMaintainOthers')) { - // Void, no fixing neccessarry + // Void, no fixing necessarry } elseif (serendipity_checkPermission('adminUsersMaintainSame')) { if (!is_array($_POST[$item['var']])) { diff --git a/include/admin/plugins.inc.php b/include/admin/plugins.inc.php index 36f03bdb..ee2f7885 100644 --- a/include/admin/plugins.inc.php +++ b/include/admin/plugins.inc.php @@ -38,7 +38,7 @@ if (isset($_GET['serendipity']['plugin_to_move']) && isset($_GET['submit']) && s } /* If idx_to_move is still -1 then we never found it (shouldn't happen under normal conditions) - Also make sure the swaping idx is around */ + Also make sure the swapping idx is around */ if ($idx_to_move >= 0 && (($_GET['submit'] == 'move down' && $idx_to_move < (count($plugins)-1)) || ($_GET['submit'] == 'move up' && $idx_to_move > 0))) { /* Swap the one were moving with the one that's in the spot we're moving to */ @@ -150,8 +150,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { $data['license'] = $license; $data['config'] = serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups); -} elseif ( $serendipity['GET']['adminAction'] == 'addnew' ) { - +} elseif ( $serendipity['GET']['adminAction'] == 'addnew' && serendipity_checkFormToken()) { + $serendipity['GET']['type'] = $serendipity['GET']['type'] ?: 'sidebar'; $data['adminAction'] = 'addnew'; $data['type'] = $serendipity['GET']['type']; @@ -159,9 +159,26 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { serendipity_plugin_api::hook_event('backend_plugins_fetchlist', $foreignPlugins); $pluginstack = array_merge((array)$foreignPlugins['pluginstack'], $pluginstack); $errorstack = array_merge((array)$foreignPlugins['errorstack'], $errorstack); + if ($serendipity['GET']['only_group'] == 'UPGRADE') { + // for upgrades, the distinction in sidebar and event-plugins is not useful. We will fetch both and mix the lists + if ($serendipity['GET']['type'] == 'event') { + $serendipity['GET']['type'] = 'sidebar'; + } else { + $serendipity['GET']['type'] = 'event'; + } + $foreignPluginsTemp = array(); + serendipity_plugin_api::hook_event('backend_plugins_fetchlist', $foreignPluginsTemp); + $pluginstack = array_merge((array)$foreignPluginsTemp['pluginstack'], $pluginstack); + $errorstack = array_merge((array)$foreignPluginsTemp['errorstack'], $errorstack); + $foreignPlugins = array_merge($foreignPlugins, $foreignPluginsTemp); + } $plugins = serendipity_plugin_api::get_installed_plugins(); $classes = serendipity_plugin_api::enum_plugin_classes(($serendipity['GET']['type'] === 'event')); + if ($serendipity['GET']['only_group'] == 'UPGRADE') { + $classes = array_merge($classes, serendipity_plugin_api::enum_plugin_classes(!($serendipity['GET']['type'] === 'event'))); + $data['type'] = 'both'; + } usort($classes, 'serendipity_pluginListSort'); $counter = 0; @@ -192,13 +209,20 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { if (is_array($props)) { if (version_compare($props['version'], $props['upgrade_version'], '<')) { $props['upgradable'] = true; - $props['customURI'] .= $foreignPlugins['baseURI'] . $foreignPlugins['upgradeURI']; + // since we merged sidebar and event plugins before, we can no longer rely on spartacus' $foreignPlugins['baseURI'] + // NOTE: This is not nice and it would be better to move it into the plugins array instead, but that collides with the cache + if (strpos($class_data['name'], 'serendipity_plugin') !== false) { + $baseURI = "&serendipity[spartacus_fetch]=sidebar"; + } else { + $baseURI = "&serendipity[spartacus_fetch]=event"; + } + $props['customURI'] .= $baseURI . $foreignPlugins['upgradeURI']; } $props['installable'] = !($props['stackable'] === false && in_array($class_data['true_name'], $plugins)); $props['requirements'] = unserialize($props['requirements']); - if (empty($props['changelog']) && @file_exists(dirname($plugin->pluginFile) . '/ChangeLog')) { + if (empty($props['changelog']) && @file_exists(dirname($props['plugin_file']) . '/ChangeLog')) { $props['changelog'] = 'plugins/' . $props['pluginPath'] . '/ChangeLog'; } @@ -284,9 +308,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { } } - $data['requirements_failues'] = $requirement_failures; - } elseif ( $serendipity['GET']['adminAction'] == 'renderOverlay' ) { $data['adminAction'] = 'overlay'; } else { @@ -336,7 +358,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { } } - if (isset($serendipity['GET']['install_plugin'])) { + if (isset($serendipity['GET']['install_plugin']) && serendipity_checkFormToken()) { $authorid = $serendipity['authorid']; if (serendipity_checkPermission('adminPluginsMaintainOthers')) { $authorid = '0'; @@ -450,6 +472,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { $data['updateAllMsg'] = isset($serendipity['GET']['updateAllMsg']); } +$data['urltoken'] = serendipity_setFormToken('url'); echo serendipity_smarty_show('admin/plugins.inc.tpl', $data); diff --git a/include/admin/templates.inc.php b/include/admin/templates.inc.php index 03483d56..9e792cca 100644 --- a/include/admin/templates.inc.php +++ b/include/admin/templates.inc.php @@ -10,22 +10,26 @@ if (!serendipity_checkPermission('adminTemplates')) { return; } -class template_option { +class template_option +{ var $config = null; var $values = null; var $keys = null; - function introspect_config_item($item, &$bag) { + function introspect_config_item($item, &$bag) + { foreach($this->config[$item] AS $key => $val) { $bag->add($key, $val); } } - function get_config($item) { + function get_config($item) + { return $this->values[$item]; } - function set_config($item, $value) { + function set_config($item, $value) + { global $serendipity; serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options @@ -48,12 +52,14 @@ class template_option { return true; } - function import(&$config) { + function import(&$config) + { foreach($config AS $key => $item) { $this->config[$item['var']] = $item; $this->keys[$item['var']] = $item['var']; } } + } $data = array(); @@ -62,7 +68,7 @@ if ($serendipity['GET']['adminAction'] == 'editConfiguration') { $data["adminAction"] = "editConfiguration"; } -if ($serendipity['GET']['adminAction'] == 'install' || $serendipity['GET']['adminAction'] == 'install-frontend' || $serendipity['GET']['adminAction'] == 'install-backend') { +if (($serendipity['GET']['adminAction'] == 'install' || $serendipity['GET']['adminAction'] == 'install-frontend' || $serendipity['GET']['adminAction'] == 'install-backend') && serendipity_checkFormToken()) { serendipity_plugin_api::hook_event('backend_templates_fetchtemplate', $serendipity); $themeInfo = serendipity_fetchTemplateInfo(serendipity_specialchars($serendipity['GET']['theme'])); @@ -98,7 +104,7 @@ $data["cur_template"] = $serendipity['template']; $data["cur_template_backend"] = $serendipity['template_backend']; $data['cur_template_info'] = serendipity_fetchTemplateInfo($serendipity['template']); -// NOTE: config.inc.php currently only applies to frontend configuration. Backend configuration is not planned yet, and would preferrably use a "config_backend.inc.php" file! +// NOTE: config.inc.php currently only applies to frontend configuration. Backend configuration is not planned yet, and would preferably use a "config_backend.inc.php" file! if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $data['cur_template_info']['custom_config_engine'] . '/config.inc.php')) { serendipity_smarty_init(); $old_template_config_groups = $template_config_groups; @@ -169,13 +175,13 @@ $stack = array(); serendipity_plugin_api::hook_event('backend_templates_fetchlist', $stack); $themes = serendipity_fetchTemplates(); $data['templates'] = array(); +$data['recommended_templates'] = array(); foreach($themes AS $theme) { $stack[$theme] = serendipity_fetchTemplateInfo($theme); } ksort($stack); - foreach ($stack as $theme => $info) { /* Sorry, but we don't display engines */ if ( strtolower($info['engine']) == 'yes') { @@ -187,7 +193,7 @@ foreach ($stack as $theme => $info) { if (file_exists($serendipity["serendipityPath"] . $serendipity["templatePath"] . $theme . "/preview${backendId}_fullsize.jpg")) { $data["templates"][$theme]["fullsize${backendId}_preview"] = $serendipity["baseURL"] . $serendipity["templatePath"] . $theme . "/preview${backendId}_fullsize.jpg"; - } elseif (!empty($info["preview{$backendId}_fullsizeURL"])) { // preview{$backendId}_fullsizeURL is not actually set yet in spartacus + } elseif (!empty($info["preview{$backendId}_fullsizeURL"])) { // preview{$backendId}_fullsizeURL is not actually set in spartacus yet if (file_exists($serendipity["serendipityPath"] . "/templates_c/template_cache/". $theme ."{$backendId}.jpg")) { $data["templates"][$theme]["fullsize${backendId}_preview"] = $serendipity["baseURL"] . "templates_c/template_cache/". $theme ."{$backendId}.jpg"; } else { @@ -216,12 +222,29 @@ foreach ($stack as $theme => $info) { $unmetRequirements[] = 'Serendipity '. $info['require serendipity']; $data['templates'][$theme]['unmetRequirements'] = sprintf(UNMET_REQUIREMENTS, implode(', ', $unmetRequirements)); } + + if ($info['recommended']) { + $data['recommended_templates'][$theme] = $data['templates'][$theme]; + if ($theme != $serendipity['template'] && $theme != $serendipity['template_backend']) { + unset($data['templates'][$theme]); + } + } } +uasort($data['templates'], function($a, $b) { + return strnatcasecmp($a['info']['name'], $b['info']['name']); +}); -$data['cur_tpl'] = $data['templates'][$data['cur_template']]; -$data['cur_tpl_backend'] = $data['templates'][$data['cur_template_backend']]; +$data['cur_tpl'] = $data['templates'][$serendipity['template']]; +$data['cur_tpl_backend'] = $data['templates'][$serendipity['template_backend']]; +$data['urltoken'] = serendipity_setFormToken('url'); -unset($data['templates'][$data['cur_template']]); +unset($data['templates'][$serendipity['template']]); +if ($serendipity['template'] != $serendipity['template_backend'] && isset($data['recommended_templates'][$serendipity['template_backend']]) && isset($data['templates'][$serendipity['template_backend']])) { + // when we could not unset a template because it is a backend template, and when that template is also a recommended template, then it will now + // be in recommended and in the normal tmeplate list. We just detected that and have to remove it + unset($data['templates'][$serendipity['template_backend']]); +} +unset($data['recommended_templates'][$serendipity['template']]); echo serendipity_smarty_show('admin/templates.inc.tpl', $data); diff --git a/include/admin/upgrader.inc.php b/include/admin/upgrader.inc.php index c6070f89..8c083215 100644 --- a/include/admin/upgrader.inc.php +++ b/include/admin/upgrader.inc.php @@ -12,7 +12,7 @@ define('S9Y_U_WARNING', 0); define('S9Y_U_SUCCESS', 1); /** - * Checks a return code constant if it's successfull or an error and return HTML code + * Checks a return code constant if it's successful or an error and return HTML code * * The diagnosis checks return codes of several PHP checks. Depending * on the input, a specially formatted string is returned. @@ -26,7 +26,7 @@ function serendipity_upgraderResultDiagnose($result, $s) { global $errorCount, $data; if ( $result === S9Y_U_SUCCESS ) { - $data['u_success'] = true; // we dont need data here explicitely, but we keep it for possible future purposes + $data['u_success'] = true; // we don't need data here explicitly, but we keep it for possible future purposes return ''. $s .''; } @@ -266,6 +266,10 @@ $tasks = array(array('version' => '0.5.1', 'arguments' => array(substr($serendipity['serendipityPath'], 0, -1), $dead_files_202, array('internals'), true), 'desc' => 'The following old dead files will be removed from your system.
' . implode(', ', $dead_files_202) . '
'), + array('version' => '2.2.0-beta2', + 'function' => 'serendipity_installFiles', + 'title' => 'Update .htaccess file', + 'desc' => 'Adds a new "documentation.*.html" rewrite rule exception to allow calling plugin documentation URLs.'), ); /* Fetch SQL files which needs to be run */ diff --git a/include/admin/users.inc.php b/include/admin/users.inc.php index 829bf457..59c1c068 100644 --- a/include/admin/users.inc.php +++ b/include/admin/users.inc.php @@ -51,7 +51,7 @@ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) { if (in_array('groups', $item['flags'])) { if (serendipity_checkPermission('adminUsersMaintainOthers')) { - // Void, no fixing neccessarry + // Void, no fixing necessarry } elseif (serendipity_checkPermission('adminUsersMaintainSame')) { // Check that no user may assign groups he's not allowed to. @@ -115,7 +115,7 @@ if (isset($_POST['SAVE_EDIT']) && serendipity_checkFormToken()) { if (in_array('groups', $item['flags'])) { if (serendipity_checkPermission('adminUsersMaintainOthers')) { - // Void, no fixing neccessarry + // Void, no fixing necessarry } elseif (serendipity_checkPermission('adminUsersMaintainSame')) { diff --git a/include/compat.inc.php b/include/compat.inc.php index d5466f3f..0d61f097 100644 --- a/include/compat.inc.php +++ b/include/compat.inc.php @@ -110,7 +110,7 @@ function debug_ErrorLevelType($type) /** - * Set our own exeption handler to convert all errors into exeptions automatically + * Set our own exception handler to convert all errors into exceptions automatically * function_exists() avoids 'cannot redeclare previously declared' fatal errors in XML feed context. * * See Notes about returning false @@ -122,17 +122,22 @@ function debug_ErrorLevelType($type) if (!function_exists('errorToExceptionHandler')) { function errorToExceptionHandler($errNo, $errStr, $errFile = '', $errLine = NULL, $errContext = array()) { global $serendipity; + + // By default, we will continue our process flow, unless: $exit = false; - switch ( $errNo ) { + + switch ($errNo) { case E_ERROR: case E_USER_ERROR: $type = 'Fatal Error'; $exit = true; break; + case E_USER_WARNING: case E_WARNING: $type = 'Warning'; break; + case E_USER_NOTICE: case E_NOTICE: case @E_STRICT: @@ -140,64 +145,82 @@ if (!function_exists('errorToExceptionHandler')) { case @E_USER_DEPRECATED: $type = 'Notice'; break; + case @E_RECOVERABLE_ERROR: $type = 'Catchable'; break; + default: $type = 'Unknown Error'; $exit = true; break; } - $rep = ini_get('error_reporting'); - $args = func_get_args(); - // respect user has set php error_reporting to not display any errors at all - if (!($rep & $errStr)) { return false; } - // user used @ to specify ignoring all errors or $php_errormsg messages returned with error_reporting = 0 - if ($rep == 0) { return false; } - // if not using Serendipity testing and user or ISP has set PHPs display_errors to show no errors at all, respect - if ($serendipity['production'] === true && ini_get('display_errors') == 0) { return false; } + // NOTE: We do NOT use ini_get('error_reporting'), because that would return the global error reporting, + // and not the one in our current content. @-silenced errors would otherwise never be caught on. + $rep = error_reporting(); + + // Bypass error processing because it's @-silenced. + if ($rep == 0) { + return false; + } + + // if not using Serendipity testing and user or ISP has set PHPs display_errors to show no errors at all, respect this: + if ($serendipity['production'] === true && ini_get('display_errors') == 0) { + return false; + } + // Several plugins might not adapt to proper style. This should not completely kill our execution. if ($serendipity['production'] !== 'debug' && preg_match('@Declaration.*should be compatible with@i', $args[1])) { #if (!headers_sent()) echo "Compatibility warning: Please upgrade file old '{$args[2]}', it contains incompatible signatures.
Details: {$args[1]}
"; return false; } - // any other errors go here - throw errors as exception - if ($serendipity['production'] === 'debug') { - // We don't want the notices - but everything else ! - echo " == FULL DEBUG ERROR MODE == \n"; - echo '
';
-            // trying to be as detailled as possible - but avoid using args containing sensibel data like passwords
-            if (function_exists('debug_backtrace') && version_compare(PHP_VERSION, '5.3.6') >= 0) {
-                if ( version_compare(PHP_VERSION, '5.4') >= 0 ) {
-                    $debugbacktrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8);
-                } else {
-                    $debugbacktrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
-                }
-                print_r($debugbacktrace);
-            }
-            //print_r($args); // debugging [Use with care! Not to public, since holding password and credentials!!!]
-            // debugbacktrace is nice, but additional it is good to have the verbosity of SPL EXCEPTIONS, except for db connect errors
-        }
-        if ($serendipity['production'] === false) {
-            echo " == TESTING ERROR MODE == \n";
-        }
-        if ($serendipity['production'] !== true) {
-            if (!$serendipity['dbConn'] || $exit) {
-                echo '

' . $type.': '.$errStr . ' in ' . $errFile . ' on line ' . $errLine . '

'; - } else { - echo '
';
-                throw new \ErrorException($type.': '.$errStr, 0, $errNo, $errFile, $errLine); // tracepath = all, if not ini_set('display_errors', 0);
-                echo '
'; // if using throw new ... this ending tag will not be send and displayed, but it still looks better and browsers don't really care - } - if (!$serendipity['dbConn'] || $exit) exit; // make sure to exit in case of database connection errors. + $args = func_get_args(); + + /* + * $serendipity['production'] can be: + * + * (bool) TRUE: Live-blog, conceal error messages + * (bool) FALSE Beta/alpha builds + * (string) 'debug' Developer build, specifically enabled. + */ + + if ($serendipity['production'] !== 'debug') { + $debug_note = '
For more details set $serendipity[\'production\'] = \'debug\' in serendipity_config_local.inc.php to receive a stack-trace.'; } else { - if( $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN ) { - // ToDo: enhance for more special serendipity error needs + $debug_note = ''; + } + + // Debug environments shall be verbose... + if ($serendipity['production'] === 'debug') { + echo " == ERROR-REPORT (DEBUGGING ENABLED) ==
\n"; + echo " == (When you copy this debug output to a forum or other places, make sure to remove your username/passwords, as they may be contained within function calls) == \n"; + echo '
';
+            debug_print_backtrace(); // Unlimited output, debugging shall show us everything.
+            echo "
"; + $debug_note = ''; + } elseif ($serendipity['production'] === false) { + echo " == ERROR-REPORT (BETA/ALPHA-BUILDS) == \n"; + } + + if ($serendipity['production'] !== true) { + // Display error (production: FALSE and production: 'debug') + echo '

' . $type . ': '.$errStr . ' in ' . $errFile . ' on line ' . $errLine . '.' . $debug_note . '

'; + + echo '
';
+            throw new \ErrorException($type . ': ' . $errStr, 0, $errNo, $errFile, $errLine); // tracepath = all, if not ini_set('display_errors', 0);
+
+            if (!$serendipity['dbConn'] || $exit) {
+                exit; // make sure to exit in case of database connection errors or fatal errors.
+            }
+        } else {
+            // Only display error (production blog) if an admin is logged in, else we discard the error.
+
+            if ($serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN) {
                 $str  = " == SERENDIPITY ERROR == ";
-                $str .= '

' . $errStr . ' in ' . $errFile . ' on line ' . $errLine . '

'; - #var_dump(headers_list()); + $str .= '

' . $type . ': '.$errStr . ' in ' . $errFile . ' on line ' . $errLine . '.' . $debug_note . '

'; + if (headers_sent()) { serendipity_die($str); // case HTTP headers: needs to halt with die() here, else it will path through and gets written underneath blog content, or into streamed js files, which hardly isn't seen by many users } else { @@ -216,6 +239,22 @@ document.body.insertBefore(fragment, document.body.childNodes[0]); } } +if (!function_exists('fatalErrorShutdownHandler')) { + /** + * Make fatal Errors readable + * + * @access public + * + * @return string constant error string as Exception + */ + function fatalErrorShutdownHandler() { + $last_error = error_get_last(); + if ($last_error['type'] === E_ERROR) { + // fatal error send to + errorToExceptionHandler(E_ERROR, $last_error['message'], $last_error['file'], $last_error['line']); + } + } +} if (!function_exists('file_get_contents')) { function file_get_contents($filename, $use_include_path = 0) { @@ -333,7 +372,6 @@ if (ini_get('magic_quotes_gpc')) { } } - // Merge get and post into the serendipity array $serendipity['GET'] = &$_GET['serendipity']; $serendipity['POST'] = &$_POST['serendipity']; diff --git a/include/db/generic.inc.php b/include/db/generic.inc.php index 693fa1f4..e95c9b1b 100644 --- a/include/db/generic.inc.php +++ b/include/db/generic.inc.php @@ -98,7 +98,7 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re /** * Perform a sql-query with the now possible ? syntax for parameters * @param string SQL query to exectue, for example "SELECT * from X where Y = ? - * @param array Paramters to insert into the sql-query + * @param array Parameters to insert into the sql-query * @result mixed Returns the result of the SQL query, depending on the input parameters */ function serendipity_db_query2($sql, $parameters = array()) { @@ -172,7 +172,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -203,7 +203,7 @@ function serendipity_db_limit_sql($limitstring) { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -240,7 +240,7 @@ function serendipity_db_reconnect() { * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { global $serendipity; diff --git a/include/db/mysql.inc.php b/include/db/mysql.inc.php index bc9ec6eb..c9c8b6d0 100644 --- a/include/db/mysql.inc.php +++ b/include/db/mysql.inc.php @@ -226,7 +226,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -252,7 +252,7 @@ function serendipity_db_limit_sql($limitstring) { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -290,7 +290,7 @@ function serendipity_db_reconnect() { * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', diff --git a/include/db/mysqli.inc.php b/include/db/mysqli.inc.php index eb163095..547d2ada 100644 --- a/include/db/mysqli.inc.php +++ b/include/db/mysqli.inc.php @@ -193,7 +193,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -219,7 +219,7 @@ function serendipity_db_limit_sql($limitstring) { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -260,7 +260,7 @@ function serendipity_db_reconnect() { * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', diff --git a/include/db/pdo-postgres.inc.php b/include/db/pdo-postgres.inc.php index aa47c50d..7d6b1dc3 100644 --- a/include/db/pdo-postgres.inc.php +++ b/include/db/pdo-postgres.inc.php @@ -45,7 +45,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -90,7 +90,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -267,7 +267,7 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', '{UNSIGNED}', diff --git a/include/db/pdo-sqlite.inc.php b/include/db/pdo-sqlite.inc.php index f391080c..55cfd601 100644 --- a/include/db/pdo-sqlite.inc.php +++ b/include/db/pdo-sqlite.inc.php @@ -14,9 +14,9 @@ function serendipity_db_logmsg($msgstr) { * Yeah. This sucks. Don't tell me! * * @access private - * @param ressource The row ressource handle + * @param resource The row resource handle * @param int Bitmask to tell whether to fetch numerical/associative arrays - * @return array Propper array containing the ressource results + * @return array Propper array containing the resource results */ function serendipity_db_sqlite_fetch_array($row, $type = PDO::FETCH_ASSOC) { @@ -95,7 +95,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -123,7 +123,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -286,7 +286,7 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', '{UNSIGNED}', '{FULLTEXT}', '{BOOLEAN}', '{UTF_8}', '{TEXT}'); diff --git a/include/db/postgres.inc.php b/include/db/postgres.inc.php index 8b2a9297..ec32b383 100644 --- a/include/db/postgres.inc.php +++ b/include/db/postgres.inc.php @@ -1,4 +1,4 @@ - true, 'max_redirects' => 5); + + if (is_array($extra_options)) { + foreach($extra_options AS $okey => $oval) { + $options[$okey] = $oval; + } + } + serendipity_plugin_api::hook_event('backend_http_request', $options, $addData); + serendipity_request_start(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + + switch(strtoupper($method)) { + case 'GET': + $http_method = HTTP_Request2::METHOD_GET; + break; + + case 'PUT': + $http_method = HTTP_Request2::METHOD_PUT; + break; + + case 'OPTIONS': + $http_method = HTTP_Request2::METHOD_OPTIONS; + break; + + case 'HEAD': + $http_method = HTTP_Request2::METHOD_HEAD; + break; + + case 'DELETE': + $http_method = HTTP_Request2::METHOD_DELETE; + break; + + case 'TRACE': + $http_method = HTTP_Request2::METHOD_TRACE; + break; + + case 'CONNECT': + $http_method = HTTP_Request2::METHOD_CONNECT; + break; + + default: + case 'POST': + $http_method = HTTP_Request2::METHOD_POST; + break; + + } + + $req = new HTTP_Request2($uri, $http_method, $options); + if (isset($contenttype) && $contenttype !== null) { + $req->setHeader('Content-Type', $contenttype); + } + + if (is_array($auth)) { + $req->setAuth($auth['user'], $auth['pass']); + } + + if ($data != null) { + if (is_array($data)) { + $req->addPostParameter($data); + } else { + $req->setBody($data); + } + } + + try { + $res = $req->send(); + } catch (HTTP_Request2_Exception $e) { + serendipity_request_end(); + return false; + } + + + $fContent = $res->getBody(); + $serendipity['last_http_request'] = array( + 'responseCode' => $res->getStatus(), + 'effectiveUrl' => $res->getEffectiveUrl(), + 'reasonPhrase' => $res->getReasonPhrase(), + 'isRedirect' => $res->isRedirect(), + 'cookies' => $res->getCookies(), + 'version' => $res->getVersion(), + 'header' => $res->getHeader(), + + 'object' => $res // forward compatibility for possible other checks + ); + + serendipity_request_end(); + return $fContent; +} + + if (!function_exists('microtime_float')) { /** * Get current timestamp as microseconds @@ -1160,7 +1271,8 @@ function serendipity_build_query(&$array, $array_prefix = null, $comb_char = '&a return implode($comb_char, $ret); } -/* Picks a specified key from an array and returns it +/** + * Picks a specified key from an array and returns it * * @access public * @param array The input array @@ -1188,7 +1300,8 @@ function &serendipity_pickKey(&$array, $key, $default) { return $default; } -/* Retrieves the current timestamp but only deals with minutes to optimize Database caching +/** + * Retrieves the current timestamp but only deals with minutes to optimize Database caching * @access public * @return timestamp * @author Matthew Groeninger @@ -1205,23 +1318,61 @@ function serendipity_db_time() { return $ts; } -/* Inits the logger. +/** + * Inits the logger. * @return null */ function serendipity_initLog() { global $serendipity; if (isset($serendipity['logLevel']) && $serendipity['logLevel'] !== 'Off') { - if ($serendipity['logLevel'] == 'debug') { - $log_level = Psr\Log\LogLevel::DEBUG; - } else { - $log_level = Psr\Log\LogLevel::ERROR; - } - - $serendipity['logger'] = new Katzgrau\KLogger\Logger($serendipity['serendipityPath'] . '/templates_c/logs', $log_level); + if ($serendipity['logLevel'] == 'debug') { + $log_level = Psr\Log\LogLevel::DEBUG; + } else { + $log_level = Psr\Log\LogLevel::ERROR; + } + $serendipity['logger'] = new Katzgrau\KLogger\Logger($serendipity['serendipityPath'] . '/templates_c/logs', $log_level); } } - + +/** + * Check whether a given URL is valid to be locally requested + * @return boolean + */ +function serendipity_url_allowed($url) { + global $serendipity; + + if ($serendipity['allowLocalURL']) { + return true; + } + + $parts = @parse_url($url); + if (!is_array($parts) || empty($parts['host'])) { + return false; + } + + $host = trim($parts['host'], '.'); + if (preg_match('@^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$@imsU', $host)) { + $ip = $host; + } else { + $ip = gethostbyname($host); + if ($ip === $host) { + $ip = false; + } + } + + if ($ip) { + $ipparts = array_map('intval', explode('.', $ip)); + if ( 127 === $ipparts[0] || 10 === $ipparts[0] || 0 === $ipparts[0] + || ( 172 === $ipparts[0] && 16 <= $ipparts[1] && 31 >= $ipparts[1] ) + || ( 192 === $ipparts[0] && 168 === $ipparts[1]) + ) { + return false; + } + } + + return true; +} define("serendipity_FUNCTIONS_LOADED", true); /* vim: set sts=4 ts=4 expandtab : */ diff --git a/include/functions_calendars.inc.php b/include/functions_calendars.inc.php index 72a15101..5aae0b36 100644 --- a/include/functions_calendars.inc.php +++ b/include/functions_calendars.inc.php @@ -13,7 +13,7 @@ if (defined('S9Y_FRAMEWORK_CALENDARS')) { @define('S9Y_FRAMEWORK_CALENDARS', true); /** - * Gregorian to Persian Convertor + * Gregorian to Persian Converter * * @author farsiweb.info * @access public @@ -65,7 +65,7 @@ function g2p($g_y, $g_m, $g_d){ } /** - * Persian to Gregorian Convertor + * Persian to Gregorian Converter * * @author farsiweb.info * @access public diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index 0a44b45c..8c01e79b 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -357,14 +357,15 @@ function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace $_smartyComments = array(); } + $formToken = serendipity_setFormToken('url'); $i = 0; foreach ($comments as $comment) { if ($parentid === VIEWMODE_LINEAR || !isset($comment['parent_id']) || $comment['parent_id'] == $parentid) { $i++; - $comment['comment'] = serendipity_specialchars(strip_tags($comment['body'])); - $comment['url'] = strip_tags($comment['url']); - $comment['link_delete'] = $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments'; + $comment['comment'] = (is_string($comment['body']) ? serendipity_specialchars(strip_tags($comment['body'])) : ''); + $comment['url'] = (is_string($comment['url']) ? strip_tags($comment['url']) : ''); + $comment['link_delete'] = $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments&' . $formToken; /* Fix invalid cases in protocoll part */ if (!empty($comment['url'])) { @@ -438,7 +439,7 @@ function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace function serendipity_printCommentsByAuthor() { global $serendipity; - $type = serendipity_db_escape_string($serendipity['GET']['commentMode']); + $type = serendipity_db_escape_string($serendipity['GET']['commentMode']); if ($type == 'comments' || empty($type)) { $type = 'NORMAL'; @@ -790,6 +791,11 @@ function serendipity_insertComment($id, $commentInfo, $type = 'NORMAL', $source $commentInfo['status'] = $ca['status']; } + if ($serendipity['serendipityAuthedUser']) { + $authorReply = true; + $authorEmail = $serendipity['serendipityEmail']; + } + $title = serendipity_db_escape_string(isset($commentInfo['title']) ? $commentInfo['title'] : ''); $comments = $commentInfo['comment']; $ip = serendipity_db_escape_string(isset($commentInfo['ip']) ? $commentInfo['ip'] : $_SERVER['REMOTE_ADDR']); @@ -873,7 +879,9 @@ function serendipity_insertComment($id, $commentInfo, $type = 'NORMAL', $source if ($status != 'confirm' && (serendipity_db_bool($ca['moderate_comments']) || ($type == 'NORMAL' && serendipity_db_bool($row['mail_comments'])) || (($type == 'TRACKBACK' || $type == 'PINGBACK') && serendipity_db_bool($row['mail_trackbacks'])))) { - serendipity_sendComment($cid, $row['email'], $name, $email, $url, $id, $row['title'], $comments, $type, serendipity_db_bool($ca['moderate_comments']), $referer); + if (! ($authorReply && $authorEmail == $row['email'])) { + serendipity_sendComment($cid, $row['email'], $name, $email, $url, $id, $row['title'], $comments, $type, serendipity_db_bool($ca['moderate_comments']), $referer); + } } // Approve with force, if moderation is disabled diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 1cddf095..bf49b2c4 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -255,50 +255,20 @@ function serendipity_set_user_var($name, $val, $authorid, $copy_to_s9y = true) { * @param string The filename to search for in the selected template * @param string The path selector that tells whether to return a HTTP or realpath * @param bool Enable to include frontend template fallback chaining (used for wysiwyg Editor custom config files, emoticons, etc) - * @param bool Enable to check into $serendipity['template'] or its engine, then fall back to $this->pluginFile dir (used by plugins via parseTemplate() method) * @return string The full path+filename to the requested file */ -function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force_frontend_fallback = false, $simple_plugin_fallback = false) { +function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force_frontend_fallback = false) { global $serendipity; $directories = array(); - - if (defined('IN_serendipity_admin') && $serendipity['smarty_preview'] == false) { - if ($force_frontend_fallback) { - // If enabled, even when within the admin suite it will be possible to reference files that - // reside within a frontend-only template directory. - $directories[] = $serendipity['template'] . '/'; - if (isset($serendipity['template_engine']) && $serendipity['template_engine'] != null) { - $p = explode(',', $serendipity['template_engine']); - foreach($p AS $te) { - $directories[] = trim($te) . '/'; - } - } - } - - if (!$simple_plugin_fallback) { - // Backend will always use our default backend (=defaultTemplate) as fallback. - $directories[] = isset($serendipity['template_backend']) ? $serendipity['template_backend'] . '/' : ''; - $directories[] = $serendipity['defaultTemplate'] .'/'; - $directories[] = 'default/'; - } + if ((! defined('IN_serendipity_admin')) || $force_frontend_fallback) { + $directories[] = $serendipity['template'] . '/'; # In the frontend or when forced (=preview_iframe.tpl), use the frontend theme } else { - $directories[] = isset($serendipity['template']) ? $serendipity['template'] . '/' : ''; - if (isset($serendipity['template_engine']) && $serendipity['template_engine'] != null) { - $p = explode(',', $serendipity['template_engine']); - foreach($p AS $te) { - $directories[] = trim($te) . '/'; - } - } - - if (!$simple_plugin_fallback) { - // Frontend templates currently need to fall back to "default" (see "idea"), so that they get the - // output they desire. If templates are based on 2k11, they need to set "Engine: 2k11" in their info.txt - // file. - $directories[] = 'default/'; - $directories[] = $serendipity['defaultTemplate'] .'/'; - } + $directories[] = $serendipity['template_backend'] . '/'; # Since 2.0 s9y can have a independent backend theme } + $directories[] = $serendipity['template_engine'] . '/'; # themes can set an engine, which will be used if they do not have the file + $directories[] = $serendipity['defaultTemplate'] .'/'; # the default theme is the last place we will look in, serving as pure fallback + $directories = array_unique($directories); # save performance by not checking for file existence multiple times in the same directory foreach ($directories as $directory) { $templateFile = $serendipity['templatePath'] . $directory . $file; @@ -307,15 +277,11 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force } if (file_exists($serendipity['serendipityPath'] . $templateFile . ".tpl")) { - # catch *.tpl files, used by the backend for serendipity_editor.js.tpl + # catch *.tpl files serving as template, used by the backend for serendipity_editor.js.tpl return $serendipity['baseURL'] . 'index.php?/plugin/' . $file; } } - if (preg_match('@\.(tpl|css|php)@i', $file) && !stristr($file, 'plugin')) { - return $file; - } - return false; } @@ -387,8 +353,8 @@ function serendipity_logout() { function serendipity_session_destroy() { $no_smarty = $_SESSION['no_smarty']; @session_destroy(); - session_regenerate_id(); session_start(); + session_regenerate_id(); $_SESSION['SERVER_GENERATED_SID'] = true; $_SESSION['no_smarty'] = $no_smarty; @@ -514,7 +480,7 @@ function serendipity_checkAutologin($ident, $iv) { } /** - * Set a session cookie which can identify a user accross http/https boundaries + * Set a session cookie which can identify a user across http/https boundaries */ function serendipity_setAuthorToken() { $hash = sha1(uniqid(rand(), true)); @@ -564,7 +530,7 @@ function serendipity_authenticate_author($username = '', $password = '', $is_has } if ($debug) fwrite($fp, date('Y-m-d H:i') . ' - Login username check:' . $username . "\n"); - if ($username != '') { + if (!empty($username) && is_string($username)) { if ($use_external) { serendipity_plugin_api::hook_event('backend_auth', $is_hashed, array('username' => $username, 'password' => $password)); } @@ -587,7 +553,7 @@ function serendipity_authenticate_author($username = '', $password = '', $is_has if (empty($row['hashtype']) || $row['hashtype'] == 0) { if (isset($serendipity['hashkey']) && (time() - $serendipity['hashkey']) >= 15768000) { - die('You can no longer login with an old-style MD5 hash to prevent MD5-Hostage abuse. + die('You can no longer login with an old-style MD5 hash to prevent MD5-Hostage abuse. Please ask the Administrator to set you a new password.'); } @@ -838,7 +804,6 @@ function serendipity_iframe(&$entry, $mode = null) { break; case 'preview': - $serendipity['smarty_preview'] = true; $data['preview'] = serendipity_printEntries(array($entry), ($entry['extended'] != '' ? 1 : 0), true); break; } @@ -930,7 +895,7 @@ function serendipity_probeInstallation($item) { } if (class_exists('SQLite3')) { if ($has_pdo) { - $res['sqlite3oo'] = 'SQLite3 (OO) (Preferrably use PDO-SQlite!)'; + $res['sqlite3oo'] = 'SQLite3 (OO) (Preferably use PDO-SQlite!)'; } else { $res['sqlite3oo'] = 'SQLite3 (OO)'; } @@ -1202,7 +1167,7 @@ function serendipity_getPermissionNames() { * * This function caches all permission chacks in static function variables to not * fetch all permissions time and again. - * The permission checks are performed agains the values of each group. If a privilege + * The permission checks are performed against the values of each group. If a privilege * is set in one of the groups the author is a user of, the function returns true. * If a privilege is not set, the userlevel of an author is checked to act for backwards-compatibility. * @@ -1282,7 +1247,7 @@ function serendipity_checkPermission($permName, $authorid = null, $returnMyGroup * @access public * @param array The array of groups the author should be a member of. All memberships that were present before and not contained in this array will be removed. * @param int The ID of the author to update - * @param boolean If set to true, the groups can only be updated if the user has the adminUsersMaintainOthers privilege. If set to false, group memberships will be changable for any user. + * @param boolean If set to true, the groups can only be updated if the user has the adminUsersMaintainOthers privilege. If set to false, group memberships will be changeable for any user. * @return */ function serendipity_updateGroups($groups, $authorid, $apply_acl = true) { @@ -2013,7 +1978,7 @@ function serendipity_reportXSRF($type = 0, $reset = true, $use_config = false) { // Set this in your serendipity_config_local.inc.php if you want HTTP Referrer blocking: // $serendipity['referrerXSRF'] = true; - $string = '
' . ERROR_XSRF . '
'; + $string = '
' . ERROR_XSRF . '
'; if ($reset) { // Config key "referrerXSRF" can be set to enable blocking based on HTTP Referrer. Recommended for Paranoia. if (($use_config && isset($serendipity['referrerXSRF']) && $serendipity['referrerXSRF']) || $use_config === false) { @@ -2082,7 +2047,7 @@ function serendipity_setFormToken($type = 'form') { global $serendipity; if ($type == 'form') { - return ''; + return ''."\n"; } elseif ($type == 'url') { return 'serendipity[token]=' . md5(session_id()); } else { diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index d7364bb7..40caf71a 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -207,14 +207,15 @@ function &serendipity_fetchEntryCategories($entryid) { function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fetchDrafts = false, $modified_since = false, $orderby = 'timestamp DESC', $filter_sql = '', $noCache = false, $noSticky = false, $select_key = null, $group_by = null, $returncode = 'array', $joinauthors = true, $joincategories = true, $joinown = null) { global $serendipity; + $initial_args = array_values(func_get_args()); + if ($serendipity['useInternalCache']) { $cache = serendipity_setupCache(); - - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); - - if (($entries = $cache->get($key, "fetchEntries")) !== false) { + $key = md5(serialize($initial_args) . $serendipity['short_archives'] . '||' . $serendipity['range'] . '||' . $serendipity['GET']['category'] . '||' . $serendipity['GET']['hide_category'] . '||' . $serendipity['GET']['viewAuthor'] . '||' . $serendipity['GET']['page'] . '||' . $serendipity['fetchLimit'] . '||' . $serendipity['max_fetch_limit'] . '||' . $serendipity['GET']['adminModule'] . '||' . serendipity_checkPermission('adminEntriesMaintainOthers') . '||' .$serendipity['showFutureEntries'] . '||' . $serendipity['archiveSortStable'] . '||' . $serendipity['plugindata']['smartyvars']['uriargs'] ); + + $entries = $cache->get($key, "fetchEntries"); + if ($entries !== false) { + $serendipity['fullCountQuery'] = $cache->get($key . '_fullCountQuery', "fetchEntries"); return unserialize($entries); } } @@ -461,10 +462,10 @@ function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fe } if ($serendipity['useInternalCache']) { - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); + $key = md5(serialize($initial_args) . $serendipity['short_archives'] . '||' . $serendipity['range'] . '||' . $serendipity['GET']['category'] . '||' . $serendipity['GET']['hide_category'] . '||' . $serendipity['GET']['viewAuthor'] . '||' . $serendipity['GET']['page'] . '||' . $serendipity['fetchLimit'] . '||' . $serendipity['max_fetch_limit'] . '||' . $serendipity['GET']['adminModule'] . '||' . serendipity_checkPermission('adminEntriesMaintainOthers') . '||' .$serendipity['showFutureEntries'] . '||' . $serendipity['archiveSortStable'] . '||' . $serendipity['plugindata']['smartyvars']['uriargs']); + $cache->save(serialize($ret), $key, "fetchEntries"); + $cache->save($serendipity['fullCountQuery'], $key . '_fullCountQuery', "fetchEntries"); } return $ret; @@ -522,7 +523,7 @@ function serendipity_fetchEntryData(&$ret) { * @access public * @param string The column to compare $val against (like 'id') * @param string The value of the colum $key to compare with (like '4711') - * @param boolean Indicates if the full entry will be fetched (body+extended: TRUE), or only the body (FALSE). + * @param boolean Indicates if the full entry will be fetched (body+extended: TRUE), or only the body (FALSE). (Unused, keep for compat.) * @param string Indicates whether drafts should be fetched * @return */ @@ -627,7 +628,7 @@ function &serendipity_fetchEntryProperties($id) { * @param string The ACL artifact condition. If set to "write" only categories will be shown that the author can write to. If set to "read", only categories will be show that the author can read or write to. * @return array Returns the array of categories */ -function &serendipity_fetchCategories($authorid = null, $name = null, $order = null, $artifact_mode = 'write') { +function &serendipity_fetchCategories($authorid = null, $name = null, $order = null, $artifact_mode = 'write', $flat = false) { global $serendipity; if ($name === null) { @@ -716,6 +717,16 @@ function &serendipity_fetchCategories($authorid = null, $name = null, $order = n $ret =& serendipity_db_query($querystring); if (is_string($ret)) { echo "Query failed: $ret"; + } else { + if ($flat) { + $cats = serendipity_walkRecursive($ret, 'categoryid', 'parentid', VIEWMODE_THREADED); + $flat_cats = array(); + $flat_cats[0] = NO_CATEGORY; + foreach($cats AS $catidx => $catdata) { + $flat_cats[$catdata['categoryid']] = str_repeat(' ', $catdata['depth']*2) . serendipity_specialchars($catdata['category_name']); + } + return $flat_cats; + } } return $ret; } @@ -1046,7 +1057,7 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm if (!is_object($serendipity['smarty'])) { serendipity_smarty_init(); // if not set, start Smarty templating to avoid member function "method()" on a non-object errors (was draft preview error, now at line 1239) } - + if ($use_hooks) { $addData = array('extended' => $extended, 'preview' => $preview); serendipity_plugin_api::hook_event('entry_display', $entries, $addData); @@ -1165,8 +1176,9 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm $entry['link_rdf'] = serendipity_rewriteURL(PATH_FEEDS . '/ei_'. $entry['id'] .'.rdf'); $entry['title_rdf'] = serendipity_specialchars($entry['title_rdf']); - $entry['link_allow_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=enable&serendipity[entry]=' . $entry['id']; - $entry['link_deny_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=disable&serendipity[entry]=' . $entry['id']; + $formToken = serendipity_setFormToken('url'); + $entry['link_allow_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=enable&serendipity[entry]=' . $entry['id'] . '&' . $formToken; + $entry['link_deny_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=disable&serendipity[entry]=' . $entry['id'] . '&' . $formToken; $entry['allow_comments'] = serendipity_db_bool($entry['allow_comments']); $entry['moderate_comments'] = serendipity_db_bool($entry['moderate_comments']); $entry['viewmode'] = ($serendipity['GET']['cview'] == VIEWMODE_LINEAR ? VIEWMODE_LINEAR : VIEWMODE_THREADED); @@ -1227,12 +1239,21 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm 'is_comment_moderate' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'moderate' ? true: false) ); + if ($serendipity['serendipityAuthedUser'] === true && !isset($serendipity['POST']['preview'])) { + $userData = array(); + $userData['name'] = $serendipity['realname']; + $userData['email'] = $serendipity['email']; + $userData['url'] = ''; + } else { + $userData = $serendipity['POST']; + } + $serendipity['smarty']->assign($comment_add_data); serendipity_displayCommentForm( $entry['id'], $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?url=' . $entry['commURL'], true, - $serendipity['POST'], + $userData, true, serendipity_db_bool($entry['moderate_comments']), $entry @@ -1253,16 +1274,6 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm } $serendipity['smarty']->assignByRef('entries', $dategroup); - - if ($serendipity['useInternalCache']) { - $cache = serendipity_setupCache(); - - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); - $cache->save(serialize($dategroup), $key, "printEntries"); - } - unset($entries, $dategroup); $serendipity['smarty']->assign(array( @@ -1272,51 +1283,11 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm if (isset($serendipity['short_archives']) && $serendipity['short_archives']) { return serendipity_smarty_fetch($smarty_block, 'entries_summary.tpl', true); } elseif ($smarty_fetch == true) { - return serendipity_smarty_fetch($smarty_block, 'entries.tpl', true); + return serendipity_smarty_fetch($smarty_block, 'entries.tpl', true, $preview); } } // end function serendipity_printEntries -function serendipity_printEntriesCached($entries, $extended = 0, $preview = false, $smarty_block = 'ENTRIES', $smarty_fetch = true, $use_hooks = true, $use_footer = true, $use_grouped_array = false) { - global $serendipity; - - $cache = serendipity_setupCache(); - - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); - - if (($dategroup = $cache->get($key, "printEntries")) !== false) { - $dategroup = unserialize($dategroup); - $serendipity['smarty']->assign('entries', $dategroup); - - # now let plugins do their magic and hope they don't do it twice - foreach($dategroup as $dategroup_idx => $properties) { - foreach($properties['entries'] as $x => $_entry) { - $addData = array('from' => 'functions_entries:printEntries'); - if ($entry['is_cached']) { - $addData['no_scramble'] = true; - } - serendipity_plugin_api::hook_event('frontend_display', $entry, $addData); - - $entry['display_dat'] = ''; - serendipity_plugin_api::hook_event('frontend_display:html:per_entry', $entry); - $entry['plugin_display_dat'] =& $entry['display_dat']; - } - } - - - if (isset($serendipity['short_archives']) && $serendipity['short_archives']) { - serendipity_smarty_fetch($smarty_block, 'entries_summary.tpl', true); - } elseif ($smarty_fetch == true) { - serendipity_smarty_fetch($smarty_block, 'entries.tpl', true); - } - return true; - } else { - return false; - } -} - function serendipity_cleanCache() { include_once 'Cache/Lite.php'; @@ -1330,10 +1301,7 @@ function serendipity_cleanCache() { 'hashedDirectoryLevel' => 2 ); $cache = new Cache_Lite($options); - $successFetch = $cache->clean("fetchEntries"); - $successPrint = $cache->clean("printEntries"); - return $successFetch && $successPrint; - + return $cache->clean("fetchEntries"); } function serendipity_setupCache() { @@ -1473,7 +1441,7 @@ function serendipity_updertEntry($entry) { if (is_numeric($cat)) { serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat})"); } elseif (is_array($cat) && !empty($cat['categoryid'])) { - serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat['categoryid']})"); + serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, " . (int)$cat['categoryid'] . ")"); } } } @@ -1504,7 +1472,7 @@ function serendipity_updertEntry($entry) { if (is_array($categories)) { serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entrycat WHERE entryid={$entry['id']}"); foreach ($categories as $cat) { - serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat})"); + serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, " . (int)$cat . ")"); } } elseif ($had_categories) { // This case actually only happens if an existing entry is edited, and its category assignments are all removed. diff --git a/include/functions_entries_admin.inc.php b/include/functions_entries_admin.inc.php index a98cef1c..1df7f00f 100644 --- a/include/functions_entries_admin.inc.php +++ b/include/functions_entries_admin.inc.php @@ -18,7 +18,7 @@ include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php"); * @param string The URL where the entry form is submitted to * @param array An array of hidden input fields that should be passed on to the HTML FORM * @param array The entry superarray with your entry's contents - * @param string Any error messages that might have occured on the last run + * @param string Any error messages that might have occurred on the last run * @return null */ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = array(), $errMsg = "") { @@ -83,6 +83,8 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr foreach ($entry['categories'] as $cat) { $selected[] = $cat['categoryid']; } + } elseif ($serendipity['categoryDefault'] > 0) { + $selected[] = $serendipity['categoryDefault']; } if (count($selected) > 1 || @@ -117,6 +119,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr } $template_vars['formToken'] = serendipity_setFormToken(); + $template_vars['urlToken'] = serendipity_setFormToken('url'); if (isset($serendipity['allowDateManipulation']) && $serendipity['allowDateManipulation']) { $template_vars['allowDateManipulation'] = true; @@ -151,7 +154,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr $serendipity['smarty']->assign('admin_view', 'entryform'); serendipity_plugin_api::hook_event('backend_entryform_smarty', $template_vars); $serendipity['smarty']->assignByRef('entry_vars', $template_vars); - return serendipity_smarty_show($template_vars['entry_template']); + return serendipity_smarty_show('admin/entries.tpl'); } function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) { diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index a784f1da..c17592fa 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -87,7 +87,7 @@ function serendipity_fetchImagesFromDatabase($start=0, $limit=0, &$total=null, $ $cond['parts']['directory'] = " AND i.path = ''\n"; } } - + if (!empty($filename)) { $cond['parts']['filename'] = " AND (i.name like '%" . serendipity_db_escape_string($filename) . "%' OR i.realname like '%" . serendipity_db_escape_string($filename) . "%')\n"; @@ -329,7 +329,7 @@ function serendipity_deleteImage($id) { $file = serendipity_fetchImageFromDatabase($id); if (!is_array($file)) { - $messages .= sprintf(' ' . FILE_NOT_FOUND . "\n", $id); + $messages .= sprintf(' ' . FILE_NOT_FOUND . "\n", $id); //return false; } else { @@ -351,9 +351,9 @@ function serendipity_deleteImage($id) { if (!$file['hotlink']) { if (file_exists($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) { if (@unlink($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) { - $messages .= sprintf(' ' . DELETE_FILE . "\n", $dFile); + $messages .= sprintf(' ' . DELETE_FILE . "\n", $dFile); } else { - $messages .= sprintf(' ' . DELETE_FILE_FAIL . "\n", $dFile); + $messages .= sprintf(' ' . DELETE_FILE_FAIL . "\n", $dFile); } serendipity_plugin_api::hook_event('backend_media_delete', $dThumb); @@ -362,14 +362,14 @@ function serendipity_deleteImage($id) { $dfThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dfnThumb; if (@unlink($dfThumb)) { - $messages .= sprintf(' ' . DELETE_THUMBNAIL . "\n", $dfnThumb); + $messages .= sprintf(' ' . DELETE_THUMBNAIL . "\n", $dfnThumb); } } } else { - $messages .= sprintf(' ' . FILE_NOT_FOUND . "\n", $dFile); + $messages .= sprintf(' ' . FILE_NOT_FOUND . "\n", $dFile); } } else { - $messages .= sprintf(' ' . DELETE_HOTLINK_FILE . "\n", $file['name']); + $messages .= sprintf(' ' . DELETE_HOTLINK_FILE . "\n", $file['name']); } serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}images WHERE id = ". (int)$id); @@ -682,7 +682,7 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb } exec($cmd, $output, $result); if ($result != 0) { - echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; + echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; $r = false; // return failure } else { touch($outfile); @@ -725,7 +725,7 @@ function serendipity_scaleImg($id, $width, $height) { $cmd = escapeshellcmd($serendipity['convert']) . ' -scale ' . serendipity_escapeshellarg($width . 'x' . $height) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile); exec($cmd, $output, $result); if ( $result != 0 ) { - echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; + echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; return false; } unset($output, $result); @@ -776,7 +776,7 @@ function serendipity_rotateImg($id, $degrees) { $cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile); exec($cmd, $output, $result); if ( $result != 0 ) { - echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; + echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; } unset($output, $result); @@ -784,7 +784,7 @@ function serendipity_rotateImg($id, $degrees) { $cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infileThumb) . ' ' . serendipity_escapeshellarg($outfileThumb); exec($cmd, $output, $result); if ( $result != 0 ) { - echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; + echo ' ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."\n"; } unset($output, $result); @@ -838,13 +838,13 @@ function serendipity_generateThumbs() { // Only print the resize message the first time if (!$msg_printed) { $resizemedia = sprintf(RESIZE_BLAHBLAH, THUMBNAIL_SHORT); - printf(' ' . $resizemedia . "\n"); + printf(' ' . $resizemedia . "\n"); echo "\n" . '
    ' . "\n"; $msg_printed = true; } echo '
  • ' . $sThumb . ': ' . $returnsize['width'] . 'x' . $returnsize['height'] . "
  • \n"; if (!file_exists($newThumb)) { - printf('
  • ' . THUMBNAIL_FAILED_COPY . '
  • ' . "\n", $sThumb); + printf('
  • ' . THUMBNAIL_FAILED_COPY . '
  • ' . "\n", $sThumb); } else { $update = true; } @@ -852,7 +852,7 @@ function serendipity_generateThumbs() { } elseif (!file_exists($oldThumb) && !file_exists($newThumb) && $fdim[0] <= $serendipity['thumbSize'] && $fdim[1] <= $serendipity['thumbSize']) { if (!$msg_printed) { $resizethumb = sprintf(RESIZE_BLAHBLAH, THUMB); - printf(' ' . $resizethumb . "\n"); + printf(' ' . $resizethumb . "\n"); echo "\n" . '
      ' . "\n"; $msg_printed = true; } @@ -861,7 +861,7 @@ function serendipity_generateThumbs() { printf('
    • ' . THUMBNAIL_USING_OWN . '
    • ' . "\n", $sThumb); $update = true; } else { - printf('
    • ' . THUMBNAIL_FAILED_COPY . '
    • ' . "\n", $sThumb); + printf('
    • ' . THUMBNAIL_FAILED_COPY . '
    • ' . "\n", $sThumb); } } @@ -1113,7 +1113,7 @@ function serendipity_syncThumbs($deleteThumbs = false) { $f = serendipity_parseFileName($files[$x]); if (empty($f[1]) || $f[1] == $files[$x]) { // No extension means bad file most probably. Skip it. - printf(' ' . SKIPPING_FILE_EXTENSION . "\n", $files[$x]); + printf(' ' . SKIPPING_FILE_EXTENSION . "\n", $files[$x]); continue; } @@ -1127,7 +1127,7 @@ function serendipity_syncThumbs($deleteThumbs = false) { } if (!is_readable($ffull) || filesize($ffull) == 0) { - printf(' ' . SKIPPING_FILE_UNREADABLE . "\n", $files[$x]); + printf(' ' . SKIPPING_FILE_UNREADABLE . "\n", $files[$x]); continue; } @@ -1460,7 +1460,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa static $debug = false; $extraParems = serendipity_generateImageSelectorParems(); - + $serendipity['GET']['only_path'] = serendipity_uploadSecure($limit_path . $serendipity['GET']['only_path'], true); $serendipity['GET']['only_filename'] = serendipity_specialchars(str_replace(array('*', '?'), array('%', '_'), $serendipity['GET']['only_filename'])); @@ -1796,7 +1796,7 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) { } @closedir($handle); - echo ' '; + echo ' '; printf(CHECKING_DIRECTORY, $directory); echo ""; @@ -1825,14 +1825,14 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) { echo "
        \n"; foreach($filestack AS $f => $file) { if ($serious && @unlink($basedir . $file)) { - printf('
      • ' . DELETING_FILE . ' ' . DONE . "
      • \n", $file); + printf('
      • ' . DELETING_FILE . ' ' . DONE . "
      • \n", $file); } else { - printf('
      • ' . DELETING_FILE . ' ' . ERROR . "
      • \n", $file); + printf('
      • ' . DELETING_FILE . ' ' . ERROR . "
      • \n", $file); } } echo "
      \n"; } else { - echo ' ' . ERROR_DIRECTORY_NOT_EMPTY . "\n"; + echo ' ' . ERROR_DIRECTORY_NOT_EMPTY . "\n"; echo "
        \n"; foreach($filestack AS $f => $file) { echo '
      • ' . $file . "
      • \n"; @@ -1842,11 +1842,11 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) { } if ($serious && !empty($directory) && !preg_match('@^.?/?$@', $directory) && @rmdir($basedir . $directory)) { - echo ' '; + echo ' '; printf(DIRECTORY_DELETE_SUCCESS, $directory); echo "\n"; } else { - echo ' '; + echo ' '; printf(DIRECTORY_DELETE_FAILED, $directory); echo "\n"; } @@ -2109,6 +2109,21 @@ function serendipity_escapeshellarg($string) { return escapeshellarg(str_replace('%', '', $string)); } + + +/** + * Move file with all thumbnails to given directory and update database and entries + * */ +function serendipity_moveFileTo($id, $dir) { + global $serendipity; + $file = serendipity_fetchImageFromDatabase($id); + + serendipity_renameFile($id, $file['name'], $dir); + serendipity_updateImageInDatabase(array('path' => $dir), $id); + serendipity_updateImageInEntries($id); + return true; +} + /** * Rename a media directory * @@ -2116,7 +2131,147 @@ function serendipity_escapeshellarg($string) { * @param string Old directory name * @param string New directory name */ -function serendipity_renameDir($old, $new) { +function serendipity_renameDir($oldDir, $newDir) { + global $serendipity; + # Plan: 1. Get id of all images under $oldDir (including those in subdirs) + # 2. Move $oldDir to newDir + # 3. Update image (path) in database + # 3. Update image in entries via serendipity_updateImageInEntries + $imgBase = serendipity_dirSlash('end', $serendipity['serendipityPath'] . $serendipity['uploadPath']); + + $total = null; + $images = serendipity_fetchImagesFromDatabase(0, 0, $total, false, false, $oldDir); + + if (! file_exists("${imgBase}${newDir}")) { + rename("${imgBase}${oldDir}", "${imgBase}${newDir}"); + + foreach($images as $image) { + serendipity_updateImageInDatabase( + array('path' => preg_replace('@' . preg_quote(serendipity_dirSlash('end', $oldDir)) . '@', serendipity_dirSlash('end', $newDir), $image['path'], 1)), // we use preg_replace and not str_replace to be able to limit to exacty one replacement, preventing issues when a path has loops in it + $image['id'] + ); + serendipity_updateImageInEntries($image['id']); + } + + return true; + } + return false; + +} + +/** + * Rename a file in the ML (upload folder and database). Also edit entries to use the new name, and move the thumbnails + * + * @param Id of the image to be renamed + * @param The new name (without extension) + * @path The new path to be prepended to the new name, if the file is also to be moved + * */ +function serendipity_renameFile($id, $newName, $path = null) { + global $serendipity; + $file = serendipity_fetchImageFromDatabase($id); + + if (!is_array($file) || (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) { + return; + } + $oldName = $file['name']; + + if (LANG_CHARSET == 'UTF-8') { + $newName = utf8_encode($newName); + } + + if ($path === null) { + $path = $file['path']; + } + + $newName = serendipity_uploadSecure(serendipity_makeFilename($newName), true); + $imgBase = $serendipity['serendipityPath'] . $serendipity['uploadPath']; + + $newPath = "{$imgBase}{$path}{$newName}.{$file['extension']}"; + + rename("{$imgBase}{$file['path']}{$file['realname']}", $newPath); + + serendipity_renameThumbnails($id, "{$path}$newName"); + + serendipity_updateImageInDatabase(array('name' => $newName, 'realname' => basename($newPath)), $id); + serendipity_updateImageInEntries($id); +} + +/** + * Rename thumbnails linked to $id + * + * */ +function serendipity_renameThumbnails($id, $newName) { + global $serendipity; + + $file = serendipity_fetchImageFromDatabase($id); + + $thumbnails = serendipity_getThumbnails($id); + foreach($thumbnails as $thumbnail) { + $newThumbnail = str_replace("{$file['path']}{$file['name']}", $newName, $thumbnail); + rename($thumbnail, $newThumbnail); + } + return true; +} + +/** + * Get an array of existing thumbnails linked to the image with the given id + * + * */ +function serendipity_getThumbnails($id) { + global $serendipity; + + $file = serendipity_fetchImageFromDatabase($id); + $name = $file['name']; + + $imagePath = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $file['realname']; + $thumbnailBase = str_replace($file['extension'], '', $imagePath); + $uploadDir = dirname($imagePath); + + return glob("$thumbnailBase*{$file['thumbnail_name']}.{$file['extension']}"); +} + +/** + * Set image references to current path in all articles linking to them via the ML + * */ +function serendipity_updateImageInEntries($id) { + global $serendipity; + + $file = serendipity_fetchImageFromDatabase($id); + $imageHTTPPath = $serendipity['defaultBaseURL'] . $serendipity['uploadHTTPPath'] . $file['path'] . $file['realname']; + $thumbnailHTTPPath = str_replace(".{$file['extension']}", "{$file['thumbnail_name']}.{$file['extension']}", $imageHTTPPath); + + + $q = "SELECT id, body, extended FROM {$serendipity['dbPrefix']}entries + WHERE + body LIKE '%%' OR extended LIKE '%%'"; + + $entries = serendipity_db_query($q, false, 'assoc'); + + if (is_array($entries) && !empty($entries)) { + foreach($entries as $entry) { + $pattern = "@(.*) src=[\"']([^'\"]+)[\"']@"; + + $callback = function($matches) use ($imageHTTPPath, $thumbnailHTTPPath) { + if (strpos($matches[2], "{$file['thumbnail_name']}.{$file['extension']}") === false) { + // the image linked not to the thumbnail + return "{$matches[1]} src='$imageHTTPPath'"; + } else { + return "{$matches[1]} src='$thumbnailHTTPPath'"; + } + }; + + $entry['body'] = preg_replace_callback($pattern, $callback, $entry['body']); + $entry['extended'] = preg_replace_callback($pattern, $callback, $entry['extended']); + + $uq = "UPDATE {$serendipity['dbPrefix']}entries + SET + body = '" . serendipity_db_escape_string($entry['body']) . "' , + extended = '" . serendipity_db_escape_string($entry['extended']) . "' + WHERE + id = " . serendipity_db_escape_string($entry['id']); + serendipity_db_query($uq); + } + } } /** @@ -2225,19 +2380,19 @@ function serendipity_directoryACL(&$paths, $type = 'read') { if ($granted === false) { // We are not allowed to access this element if ($debug) { - echo ' ACL for ' . $info['relpath'] . " DENIED."; + echo ' ACL for ' . $info['relpath'] . " DENIED."; } unset($paths[$idx]); } else { if ($debug) { - echo ' ACL for ' . $info['relpath'] . " granted."; + echo ' ACL for ' . $info['relpath'] . " granted."; } } } if (count($paths) < $startCount) { if ($debug) { - echo ' ACL denied all.'; + echo ' ACL denied all.'; } return false; } @@ -2925,10 +3080,11 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin } $order_fields = serendipity_getImageFields(); // reset filename for building template filters, since this is hardcoded as 'only_filename' - unset($order_fields['i.name']); + #unset($order_fields['i.name']); $media = array( 'manage' => $manage, + 'multiperm' => serendipity_checkPermission('adminImagesDirectories'), 'lineBreak' => $lineBreak, 'lineBreakP' => round(1/$lineBreak*100), 'url' => $url, @@ -2974,10 +3130,10 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin if ($enclose) { serendipity_smarty_fetch('MEDIA_ITEMS', 'admin/media_items.tpl'); - return serendipity_smarty_show(serendipity_getTemplateFile('admin/media_pane.tpl', 'serendipityPath')); + return serendipity_smarty_show('admin/media_pane.tpl'); } else { serendipity_smarty_fetch('MEDIA_ITEMS', 'admin/media_items.tpl'); - return serendipity_smarty_show(serendipity_getTemplateFile('admin/media_properties.tpl', 'serendipityPath')); + return serendipity_smarty_show('admin/media_properties.tpl'); } } @@ -3322,7 +3478,7 @@ function serendipity_imageAppend(&$tfile, &$target, $dir, $echo = true) { $target = $dir . $tfile; if ($echo) { - echo ' '; + echo ' '; printf(FILENAME_REASSIGNED . '
        ', serendipity_specialchars($tfile)); echo "
        \n"; } @@ -3341,7 +3497,7 @@ function serendipity_checkMediaSize($file) { if (!empty($serendipity['maxFileSize'])) { if (filesize($file) > $serendipity['maxFileSize']) { - echo ' '; + echo ' '; printf(MEDIA_UPLOAD_SIZEERROR . '
        ', (int)$serendipity['maxFileSize']); echo "
        \n"; return false; @@ -3356,7 +3512,7 @@ function serendipity_checkMediaSize($file) { if (!empty($serendipity['maxImgWidth'])) { if ($dim[0] > $serendipity['maxImgWidth']) { - echo ' '; + echo ' '; printf(MEDIA_UPLOAD_DIMERROR . '
        ', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']); echo "
        \n"; return false; @@ -3365,7 +3521,7 @@ function serendipity_checkMediaSize($file) { if (!empty($serendipity['maxImgHeight'])) { if ($dim[1] > $serendipity['maxImgHeight']) { - echo ' '; + echo ' '; printf(MEDIA_UPLOAD_DIMERROR . '
        ', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']); echo "
        \n"; return false; @@ -3377,7 +3533,10 @@ function serendipity_checkMediaSize($file) { } /** - * Moves a media directory + * DEPRECATED. Use the functions serendipity_renameDir and serendipity_moveFile instead. This is only + * a wrapper around those, for backwards compatibility + * + * Moves a media directory * * @param string The old directory. * This can be NULL or (an empty / a) STRING for re-name/multiCheck move comparison events @@ -3390,407 +3549,11 @@ function serendipity_checkMediaSize($file) { */ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_id = null, $file = null) { global $serendipity; - - // paranoid case for updating an old image id entry - else we have a new entry incrementary - if (is_null($item_id) && isset($file['id']) && $file['id'] > 0) $item_id = $file['id']; - - if (!$item_id || $item_id < 1) { - // only print message if not posting a case_directoryEdit submit - if (empty($serendipity['POST']['save'])) { - echo ' '; - printf(ERROR_FILE_NOT_EXISTS, $item_id); - echo "\n"; - return false; - } - } - - // Prepare data for the database, any hooks and the real file move, by case AREA: - // DIR = Media directory form edit, - // FILE = File rename or File bulk move, - // FILEDIR = Media properties form edit - - // images.inc case 'directoryEdit', which is ML Directories form, via ML case 'directorySelect' if ($type == 'dir') { - - $real_oldDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir; - $real_newDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir; - - if (!is_dir($real_oldDir)) { - echo ' '; - printf(ERROR_FILE_NOT_EXISTS, $oldDir); - echo "\n"; - return false; - } - - if (is_dir($real_newDir)) { - echo ' '; - printf(ERROR_FILE_EXISTS, $newDir); - echo "\n"; - return false; - } - - if (!rename($real_oldDir, $real_newDir)) { - echo ' '; - printf(MEDIA_DIRECTORY_MOVE_ERROR, $newDir); - echo "\n"; - return false; - } - - echo ' '; - printf(MEDIA_DIRECTORY_MOVED, $newDir); - echo "\n"; - - $dirs = serendipity_db_query("SELECT id, path - FROM {$serendipity['dbPrefix']}images - WHERE path LIKE '" . serendipity_db_escape_string($oldDir) . "%'", false, 'assoc'); - if (is_array($dirs)) { - foreach($dirs AS $dir) { - $old = $dir['path']; - $new = preg_replace('@^(' . preg_quote($oldDir) . ')@i', $newDir, $old); - serendipity_db_query("UPDATE {$serendipity['dbPrefix']}images - SET path = '" . serendipity_db_escape_string($new) . "' - WHERE id = {$dir['id']}"); - } - } - - $dirs = serendipity_db_query("SELECT groupid, artifact_id, artifact_type, artifact_mode, artifact_index - FROM {$serendipity['dbPrefix']}access - WHERE artifact_type = 'directory' - AND artifact_index LIKE '" . serendipity_db_escape_string($oldDir) . "%'", false, 'assoc'); - if (is_array($dirs)) { - foreach($dirs AS $dir) { - $old = $dir['artifact_index']; - $new = preg_replace('@^(' . preg_quote($oldDir) . ')@i', $newDir, $old); - serendipity_db_query("UPDATE {$serendipity['dbPrefix']}access - SET artifact_index = '" . serendipity_db_escape_string($new) . "' - WHERE groupid = '" . serendipity_db_escape_string($dir['groupid']) . "' - AND artifact_id = '" . serendipity_db_escape_string($dir['artifact_id']) . "' - AND artifact_type = '" . serendipity_db_escape_string($dir['artifact_type']) . "' - AND artifact_mode = '" . serendipity_db_escape_string($dir['artifact_mode']) . "' - AND artifact_index = '" . serendipity_db_escape_string($dir['artifact_index']) . "'"); - } - } - // hook into staticpage for the renaming regex replacements - // first and last two are null - only differ by being set already by their default var for the last two - $renameValues = array(array( - 'from' => null, - 'to' => null, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => null, - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $file - )); - // Changing a ML directory via directoryEdit needs to run through entries too! - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); - - // case 'rename' OR 'multidelete' (bulk multimove) - } else if ($type == 'file') { - - // active in mean of eval or executable - if (serendipity_isActiveFile(basename($newDir))) { - echo ' '; - printf(ERROR_FILE_FORBIDDEN, serendipity_specialchars($newDir)); - echo "\n"; - return false; - } - if (!empty($file['hotlink'])) { - $newHotlinkFile = (false === strpos($newDir, $file['extension'])) ? $newDir . (empty($file['extension']) ? '' : '.' . $file['extension']) : $newDir; - serendipity_updateImageInDatabase(array('realname' => $newHotlinkFile, 'name' => $newDir), $item_id); - } else { - $parts = pathinfo($newDir); - - // build new, thumb and old file names relative to Serendipity root path - if ($oldDir === null && $newDir != 'uploadRoot') { - - // case single file re-name event (newDir = newName is passed without path!) - $newName = $newDir; // for better readability - // do we really need this? - if ($parts['extension'] != $file['extension']) { - $file_new = $file['path'] . $newName . (empty($file['extension']) ? '' : '.' . $file['extension']); - $file_old = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']); - } else { - $file_new = $file['path'] . $newName; - $file_old = $file['path'] . $file['name']; - } - // build full thumb file names - $file_newthumb = $file['path'] . $newName . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']); - $file_oldthumb = $file['path'] . $file['name'] . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']); - $newThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_newthumb; - $oldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_oldthumb; - - } else { - - // case bulkmove event (newDir is passed inclusive path! and normally w/o the filename, but we better check this though) - $newDir = ($newDir == 'uploadRoot') ? '' : $newDir; // Take care: remove temporary 'uploadRoot' string, in case of moving a subdir file into upload root by bulkmove - $_newDir = str_replace($file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']), '', $newDir); - // do we really need this? - if ($parts['extension'] != $file['extension']) { - $file_new = $_newDir . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']); - $file_old = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']); - } else { - $file_new = $_newDir . $file['name']; - $file_old = $file['path'] . $file['name']; - } - - } - - // build full origin and new file path names - $newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_new; - $oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_old; - - // check files existence - if (file_exists($oldfile) && !file_exists($newfile)) { - - // for the paranoid, securely check these build filenames again, since we really need a real file set to continue! - $newparts = pathinfo($newfile); - if ($newparts['dirname'] == '.' || (!empty($file['extension']) && empty($newparts['extension'])) || empty($newparts['filename'])) { - // error new file build mismatch - echo ' ' . $newfile . ' ' . ERROR_SOMETHING . "\n"; - return false; - } - - // Case re-name event, keeping a possible moved directory name for a single file - if ($oldDir === null) { - // Move the origin file - @rename($oldfile, $newfile); - // do not re-name again, if item has no thumb name (eg zip object file case) and old thumb actually exists (possible missing pdf preview image on WinOS with IM) - if (($newThumb != $newfile) && file_exists($oldThumb)) { - // the thumb file - @rename($oldThumb, $newThumb); // Keep both rename() error disabled, since we have to avoid any output in renaiming cases - } - - // hook into staticpage for the renaming regex replacements - $renameValues = array(array( - 'from' => $oldfile, - 'to' => $newfile, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => $file['thumbnail_name'], - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $file - )); - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); - - // renaming filenames has to update mediaproperties if set - $q = "UPDATE {$serendipity['dbPrefix']}mediaproperties - SET value = '" . serendipity_db_escape_string($newName . (empty($file['extension']) ? '' : '.' . $file['extension'])) . "' - WHERE mediaid = " . (int)$item_id . ' AND property = "realname" AND value = "' . $file['realname'] . '"'; - serendipity_db_query($q); - $q = "UPDATE {$serendipity['dbPrefix']}mediaproperties - SET value = '" . serendipity_db_escape_string($newName) . "' - WHERE mediaid = " . (int)$item_id . ' AND property = "name" AND value = "' . $file['name'] .'"'; - serendipity_db_query($q); - $q = "UPDATE {$serendipity['dbPrefix']}mediaproperties - SET value = '" . serendipity_db_escape_string($newName . (empty($file['extension']) ? '' : '.' . $file['extension'])) . "' - WHERE mediaid = " . (int)$item_id . ' AND property = "TITLE" AND value = "' . $file['realname'] .'"'; - serendipity_db_query($q); - - serendipity_updateImageInDatabase(array('thumbnail_name' => $renameValues[0]['thumb'], 'realname' => $newName . (empty($file['extension']) ? '' : '.' . $file['extension']), 'name' => $newName), $item_id); - - // Forward user to overview (we don't want the user's back button to rename things again) ?? What does this do? Check!!! - } - - // Case Move or Bulkmove event - // newDir can now be used for the uploads directory root path too - // Do not allow an empty string or not set newDir for the build call so we do not conflict with rename calls, which are single files only and is done above - // BULKMOVE vars oldfile and newfile are fullpath based see above - elseif (!empty($newfile)) { - - if ($newDir == 'uploadRoot') $newDir = ''; // now move back into root of /uploads dir - - // hook into staticpage for the renaming regex replacements - $renameValues = array(array( - 'from' => $oldfile, - 'to' => $newfile, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => $file['thumbnail_name'], - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $file - )); - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); // eg. for staticpage entries path regex replacements - - // Move the origin file - try { rename($oldfile, $newfile); } catch (Exception $e) { echo ' ' . ERROR_SOMETHING . ': '.$e->getMessage() . "\n"; } - - // do still need this? YES, it is definitely false, so we would not need the ternary - // Rename newDir + file name in case it is called by the Bulk Move and not by rename - $newDirFile = (false === strpos($newDir, $file['name'])) ? $newDir . $file['name'] : $newDir; - - foreach($renameValues AS $renameData) { - // build full thumb file names - $thisOldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $renameData['oldDir'] . $file['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '.' . $serendipity['thumbSuffix']) . (empty($file['extension']) ? '' : '.' . $file['extension']); - $thisNewThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDirFile . (!empty($file['thumbnail_name']) ? '.' . $renameData['thumb'] : '.' . $serendipity['thumbSuffix']) . (empty($file['extension']) ? '' : '.' . $file['extension']); - // Check for existent old thumb files first, to not need to disable rename by @rename(), then move the thumb file and catch any wrong renaming - if (($thisNewThumb != $newfile) && file_exists($thisOldThumb)) { - // the thumb file and catch any wrong renaming - try { rename($thisOldThumb, $thisNewThumb); } catch (Exception $e) { echo ' ' . ERROR_SOMETHING . ': '.$e->getMessage() . "\n"; } - } - } - - serendipity_updateImageInDatabase(array('thumbnail_name' => $renameValues[0]['thumb'], 'path' => $newDir, 'realname' => $file['realname'], 'name' => $file['name']), $item_id); - // Forward user to overview (we don't want the user's back button to rename things again) - } else { - //void - } - } else { - if (!file_exists($oldfile)) { - echo ' ' . ERROR_FILE_NOT_EXISTS . "\n"; - } elseif (file_exists($newfile)) { - echo ' ' . ERROR_FILE_EXISTS . "\n"; - } else { - echo ' ' . ERROR_SOMETHING . "\n"; - } - - return false; - } - } - - // used solely by serendipity_parsePropertyForm base_properties when changing the file selected path within mediaproperties form - } elseif ($type == 'filedir') { - - serendipity_db_query("UPDATE {$serendipity['dbPrefix']}images - SET path = '" . serendipity_db_escape_string($newDir) . "' - WHERE id = " . (int)$item_id); - $pick = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}images - WHERE id = " . (int)$item_id, true, 'assoc'); - - // Move thumbs - Rebuild full origin and new file path names by the new picked file array - $oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - $newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - - // hook into staticpage for the renaming regex replacements - $renameValues = array(array( - 'from' => $oldfile, - 'to' => $newfile, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => $pick['thumbnail_name'], - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $pick, - 'name' => $pick['name'] - )); - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); - - // Move the origin file - try { rename($oldfile, $newfile); } catch (Exception $e) { echo ' ' . ERROR_SOMETHING . ': '.$e->getMessage() . "\n"; } - - foreach($renameValues AS $renameData) { - $thisOldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - $thisNewThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (!empty($pick['thumbnail_name']) ? '.' . $pick['thumbnail_name'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - // Check for existent old thumb files first, to not need to disable rename by @rename(),then move the thumb file and catch any wrong renaming - if (($thisNewThumb != $newfile) && file_exists($thisOldThumb)) { - // the thumb file and catch any wrong renaming - try { rename($thisOldThumb, $thisNewThumb); } catch (Exception $e) { echo ' ' . ERROR_SOMETHING . ': '.$e->getMessage() . "\n"; } - } - } - // no need to use serendipity_updateImageInDatabase() here since already done in this case start - // ???? Forward user to overview (we don't want the user's back button to rename things again) - - // prepare for message - $thisnew = (empty($newDir) ? $serendipity['uploadPath'] : '') . $newDir . $pick['name']; - $thisExt = isset($pick['extension']) ? '.'.$pick['extension'] : ''; - - if (file_exists($newfile)) { - echo ' '; - printf(MEDIA_DIRECTORY_MOVED, $thisnew . $thisExt); - echo "\n"; - } - - } // case dir, file, filedir end - - // Entry REPLACEMENT AREA - - // Only MySQL supported, since I don't know how to use REGEXPs differently. // Ian: we should improve this to all! - if ($serendipity['dbType'] != 'mysql' && $serendipity['dbType'] != 'mysqli') { - echo ' ' . MEDIA_DIRECTORY_MOVE_ENTRY . "\n"; - return true; + serendipity_renameDir($oldDir, $newDir); + } else { + return serendipity_moveFileTo($item_id, $newDir); } - - // Prepare the SELECT query for filetypes - if ($type == 'filedir' || $type == 'file') { - - // get the right $file, which is array or null, by type - $_file = ($type == 'filedir') ? $pick : $file; - // check oldDir in bulkmove case - $oldDir = ($type == 'file' && !is_null($oldDir)) ? str_replace($_file['name'].'.'.$_file['extension'], '', $oldDir) : $oldDir; - - // Path patterns to SELECT en detail to not pick path parts in a loop - if ($oldDir === null) {// care for file renaming with oldpath - $oldDirFile = $_file['path'] . $_file['name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - $oldDirThumb = $_file['path'] . $_file['name'] . '.' . $_file['thumbnail_name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - } else { - $oldDirFile = $oldDir . $_file['name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - $oldDirThumb = $oldDir . $_file['name'] . '.' . $_file['thumbnail_name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - } - if ($type == 'filedir' && !isset($newDirFile)) { - $newDirFile = (strpos($newDir, $_file['name']) === FALSE) ? $newDir . $_file['name'] : $newDir; - } - if ($type == 'file' && $oldDir === null) { - $newDirFile = (empty($newDirFile)) ? $newDir : $newDirFile; // for file renamings $newDirFile has to be $newDir ( which is subdir and new NAME w/o ext) - } - $ispOldFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile; - - } elseif($type == 'dir') { - // since this is case 'dir', we do not have a filename and have to rename replacement File vars to oldDir and newDir values for the update preg_replace match - $oldDirFile = $oldDir; - $newDirFile = $newDir; - $ispOldFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile . (($_file['extension']) ? '.'.$_file['extension'] : ''); - } - - // Please note: imageselectorplus plugin quickblog is either quickblog:FullPath or quickblog:|?(none|plugin|js|_blank)|FullPath - // SELECTing the entries uses a more detailled approach to be as precise as possible, thus we need to reset these vars for the preg_replace later on in some cases - $q = "SELECT id, body, extended - FROM {$serendipity['dbPrefix']}entries - WHERE body REGEXP '(src=|href=|window.open.|\n"; + $debug = "\n"; } else { - $debug = "/* Dynamically fetched " . htmlspecialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " */\n"; + $debug = "/* Dynamically fetched " . serendipity_specialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " */\n"; } } diff --git a/include/functions_trackbacks.inc.php b/include/functions_trackbacks.inc.php index 253e18b8..824b5791 100644 --- a/include/functions_trackbacks.inc.php +++ b/include/functions_trackbacks.inc.php @@ -109,7 +109,7 @@ function serendipity_pingback_autodiscover($loc, $body, $url=null) { * @access public * @param string The URL to send a trackback to * @param string The XML data with the trackback contents - * @return string Reponse + * @return string Response */ function _serendipity_send($loc, $data, $contenttype = null) { global $serendipity; @@ -126,25 +126,30 @@ function _serendipity_send($loc, $data, $contenttype = null) { $uri = $target['scheme'] . '://' . $target['host'] . ':' . $target['port'] . $target['path'] . $target['query']; } - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'POST'); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); serendipity_plugin_api::hook_event('backend_http_request', $options, 'trackback_send'); serendipity_request_start(); - - $req = new HTTP_Request($uri, $options); - if (isset($contenttype)){ - $req->addHeader('Content-Type', $contenttype); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; } - $req->addRawPostData($data, true); - $res = $req->sendRequest(); + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_POST, $options); + if (isset($contenttype)){ + $req->setHeader('Content-Type', $contenttype); + } - if (PEAR::isError($res)) { + $req->setBody($data); + try { + $res = $req->send(); + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); return false; } + - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); return $fContent; } @@ -159,7 +164,7 @@ function _serendipity_send($loc, $data, $contenttype = null) { * @param string The author of our entry * @param string The title of our entry * @param string The text of our entry - * @param string A comparsion URL + * @param string A comparison URL * @return string Response */ @@ -167,42 +172,47 @@ function serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $ $is_wp = false; $wp_check = false; - if (preg_match('@((' . preg_quote($loc, '@') . '|' . preg_quote($loc2, '@') . ')/?trackback/)@i', $res, $wp_loc)) { - // We found a WP-blog that may not advertise RDF-Tags! - $is_wp = true; - } + // the new detection method via rel=trackback should have priority + if (preg_match('@link\s*rel=["\']trackback["\'].*href=["\'](https?:[^"\']+)["\']@i', $res, $matches)) { + $trackURI = trim($matches[1]); + } else { + if (preg_match('@((' . preg_quote($loc, '@') . '|' . preg_quote($loc2, '@') . ')/?trackback/)@i', $res, $wp_loc)) { + // We found a WP-blog that may not advertise RDF-Tags! + $is_wp = true; + } - if (!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*["\'](https?:[^"\']+)["\']@i', $res, $matches)) { - $matches = array(); - serendipity_plugin_api::hook_event('backend_trackback_check', $matches, $loc); + if (!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*["\'](https?:[^"\']+)["\']@i', $res, $matches)) { + $matches = array(); + serendipity_plugin_api::hook_event('backend_trackback_check', $matches, $loc); - // Plugins may say that a URI is valid, in situations where a blog has no valid RDF metadata - if (empty($matches[2])) { - if ($is_wp) { - $wp_check = true; - } else { - echo '
        • ' . sprintf(TRACKBACK_FAILED, TRACKBACK_NOT_FOUND) . '
        '; - return false; + // Plugins may say that a URI is valid, in situations where a blog has no valid RDF metadata + if (empty($matches[2])) { + if ($is_wp) { + $wp_check = true; + } else { + echo '
        • ' . sprintf(TRACKBACK_FAILED, TRACKBACK_NOT_FOUND) . '
        '; + return false; + } } } - } - $trackURI = trim($matches[2]); + $trackURI = trim($matches[2]); - if (preg_match('@dc:identifier\s*=\s*["\'](https?:[^\'"]+)["\']@i', $res, $test)) { - if ($loc != $test[1] && $loc2 != $test[1]) { - if ($is_wp) { - $wp_check = true; - } else { - echo '
        • ' . sprintf(TRACKBACK_FAILED, TRACKBACK_URI_MISMATCH) . '
        '; - return false; + if (preg_match('@dc:identifier\s*=\s*["\'](https?:[^\'"]+)["\']@i', $res, $test)) { + if ($loc != $test[1] && $loc2 != $test[1]) { + if ($is_wp) { + $wp_check = true; + } else { + echo '
        • ' . sprintf(TRACKBACK_FAILED, TRACKBACK_URI_MISMATCH) . '
        '; + return false; + } } } - } - // If $wp_check is set it means no RDF metadata was found, and we simply try the /trackback/ url. - if ($wp_check) { - $trackURI = $wp_loc[0]; + // If $wp_check is set it means no RDF metadata was found, and we simply try the /trackback/ url. + if ($wp_check) { + $trackURI = $wp_loc[0]; + } } $data = 'url=' . rawurlencode($url) @@ -268,20 +278,25 @@ function serendipity_reference_autodiscover($loc, $url, $author, $title, $text) echo '
        • '. sprintf(TRACKBACK_CHECKING, $loc) .'
        '; flush(); - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'GET'); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); serendipity_plugin_api::hook_event('backend_http_request', $options, 'trackback_detect'); serendipity_request_start(); - $req = new HTTP_Request($parsed_loc, $options); - $res = $req->sendRequest(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($parsed_loc, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($res)) { + try { + $res = $req->send(); + } catch (HTTP_Request2_Exception $e) { echo '
        • ' . sprintf(TRACKBACK_COULD_NOT_CONNECT, $u['host'], $u['port']) .'
        '; serendipity_request_end(); return; } - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); if (strlen($fContent) != 0) { @@ -533,21 +548,27 @@ function fetchPingbackData(&$comment) { if (isset($serendipity['pingbackFetchPageMaxLength'])){ $fetchPageMaxLength = $serendipity['pingbackFetchPageMaxLength']; } - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; $url = $comment['url']; if (function_exists('serendipity_request_start')) serendipity_request_start(); // Request the page - $req = new HTTP_Request($url, array('allowRedirects' => true, 'maxRedirects' => 5, 'timeout' => 20, 'readTimeout' => array(5,0))); + $options = array('follow_redirects' => true, 'max_redirects' => 5, 'timeout' => 20); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $options); // code 200: OK, code 30x: REDIRECTION - $responses = "/(200 OK)|(30[0-9] Found)/"; // |(30[0-9] Moved) - if ((PEAR::isError($req->sendRequest()) || preg_match($responses, $req->getResponseCode()))) { - // nothing to do, - } - else { - $fContent = $req->getResponseBody(); + $responses = "/(200)|(30[0-9])/"; // |(30[0-9] Moved) + try { + $response = $req->send(); + if (preg_match($responses, $response->getStatus())) { + + } + $fContent = $response->getBody(); // Get a title if (preg_match('@]*>.*?]*>(.*?).*?@is',$fContent,$matches)) { @@ -571,6 +592,8 @@ function fetchPingbackData(&$comment) { $comment['comment'] = $body . '[..]'; } + } catch (HTTP_Request2_Exception $e) { + } if (function_exists('serendipity_request_end')) serendipity_request_end(); diff --git a/include/functions_upgrader.inc.php b/include/functions_upgrader.inc.php index 41d20908..7a96307f 100644 --- a/include/functions_upgrader.inc.php +++ b/include/functions_upgrader.inc.php @@ -334,7 +334,7 @@ function serendipity_removeDeadFiles_SPL($dir=null, $deadfiles=null, $purgedir=n } catch (Exception $e) { return; } - $iterator = new RecursiveIteratorIterator($_dir, RecursiveIteratorIterator::CHILD_FIRST); + $iterator = new RecursiveIteratorIterator($_dir, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD); $search = array("\\", '//'); $replace = array('/'); foreach ($iterator as $file) { diff --git a/include/genpage.inc.php b/include/genpage.inc.php index 1c3e6043..f2e399e7 100644 --- a/include/genpage.inc.php +++ b/include/genpage.inc.php @@ -44,10 +44,11 @@ switch ($serendipity['GET']['action']) { $serendipity['smarty']->assign('head_title', $serendipity['head_title']); $serendipity['smarty']->assign('head_subtitle', $serendipity['head_subtitle']); $serendipity['view'] = '404'; + $serendipity['content_message'] = URL_NOT_FOUND; serendipity_header('HTTP/1.0 404 Not found'); serendipity_header('Status: 404 Not found'); } - + serendipity_printEntries($entry, 1); } else { serendipity_printEntries(serendipity_fetchEntries($serendipity['range'], true, $serendipity['fetchLimit'])); @@ -122,17 +123,14 @@ switch ($serendipity['GET']['action']) { // Welcome screen or whatever default: - if ($serendipity['useInternalCache']) { - $entries = serendipity_fetchEntries(null, true, $serendipity['fetchLimit']); - if (! serendipity_printEntriesCached($entries)) { - serendipity_printEntries($entries); - } - } else { - serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit'])); - } + serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit'])); break; } +if ($serendipity['GET']['action'] != 'search' && !empty($serendipity['content_message'])) { + $serendipity['smarty']->assign('content_message', $serendipity['content_message']); +} + serendipity_smarty_fetch('CONTENT', 'content.tpl'); $serendipity['smarty']->assign('ENTRIES', ''); diff --git a/include/lang.inc.php b/include/lang.inc.php index fc408725..f02c813d 100644 --- a/include/lang.inc.php +++ b/include/lang.inc.php @@ -33,7 +33,7 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) { // Try and include preferred language from the configurated setting if (@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) { - // Only here can we truely say the language is loaded + // Only here can we truly say the language is loaded define('serendipity_LANG_LOADED', true); if (function_exists('serendipity_db_reconnect')) { serendipity_db_reconnect(); diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index e57b8d97..d93eab03 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -23,7 +23,7 @@ $serendipity['core_events']['backend_header']['jquery'] = 'serendipity_plugin_a // Add jquery to all frontend templates (in noConflict mode) function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData, $addData) { - global $serendipity; + global $serendipity; // Only execute if current template (only) does not have its own jquery.js file // jquery can be disabled if a template's config.inc.php or a plugin sets @@ -44,7 +44,7 @@ function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData, // Add jquery to all backend templates function serendipity_plugin_api_backend_header($event_name, &$bag, &$eventData, $addData) { - global $serendipity; + global $serendipity; // Only execute if current template does not have its own backend_jquery.js file // jquery can be disabled if a template's config.inc.php or a plugin sets @@ -94,7 +94,7 @@ function errorHandlerCreateDOM(htmlStr) { case 'backend_publish': // this is preview_iframe.tpl updertHooks [ NOT ONLY!! See freetags ] if ($_GET['serendipity']['is_iframe'] == 'true' && $_GET['serendipity']['iframe_mode'] == 'save') { - echo "\n".''."\n"; + echo "\n".''."\n"; } break; @@ -206,7 +206,7 @@ class serendipity_plugin_api $rs = serendipity_db_query("SELECT MAX(sort_order) as sort_order_max FROM {$serendipity['dbPrefix']}plugins WHERE placement = '$default_placement'", true, 'num'); - if (is_array($rs)) { + if (is_array($rs) && isset($rs[0]) && !empty($rs[0])) { $nextidx = intval($rs[0] + 1); } else { $nextidx = 0; @@ -214,7 +214,7 @@ class serendipity_plugin_api $serendipity['debug']['pluginload'][] = "Installing plugin: " . print_r(func_get_args(), true); - $iq = "INSERT INTO {$serendipity['dbPrefix']}plugins (name, sort_order, placement, authorid, path) values ('" . serendipity_specialchars($key) . "', $nextidx, '$default_placement', '$authorid', '" . serendipity_specialchars($pluginPath) . "')"; + $iq = "INSERT INTO {$serendipity['dbPrefix']}plugins (name, sort_order, placement, authorid, path) values ('" . serendipity_db_escape_string(serendipity_specialchars($key)) . "', $nextidx, '$default_placement', '$authorid', '" . serendipity_specialchars($pluginPath) . "')"; $serendipity['debug']['pluginload'][] = $iq; serendipity_db_query($iq); serendipity_plugin_api::hook_event('backend_plugins_new_instance', $key, array('default_placement' => $default_placement)); @@ -246,6 +246,8 @@ class serendipity_plugin_api { global $serendipity; + $plugin_instance_id = serendipity_db_escape_string($plugin_instance_id); + $plugin =& serendipity_plugin_api::load_plugin($plugin_instance_id); if (is_object($plugin)) { $bag = new serendipity_property_bag(); @@ -435,7 +437,7 @@ class serendipity_plugin_api * * @access public * @param string The filter for plugins (left|right|hide|event|eventh) - * @param boolean If true, the filtering logic will be reversed an all plugins that are NOT part of the filter will be returned + * @param boolean If true, the filtering logic will be reversed and all plugins that are NOT part of the filter will be returned * @param string Filter by a specific classname (like 'serendipity_plugin_archives'). Can take SQL wildcards. * @param string Filter by a specific plugin instance id * @return array Returns the associative array of found plugins in the database @@ -477,7 +479,7 @@ class serendipity_plugin_api * * @access public * @param string The filter for plugins (left|right|hide|event|eventh) - * @param boolean If true, the filtering logic will be reversed an all plugins that are NOT part of the filter will be evaluated + * @param boolean If true, the filtering logic will be reversed and all plugins that are NOT part of the filter will be evaluated * @return int Number of plugins that were found. */ static function count_plugins($filter = '*', $negate = false) @@ -547,7 +549,7 @@ class serendipity_plugin_api * * @access public * @param string The ID of a plugin - * @param boolean If true, the plugin is a internal plugin (prefixed with '@') + * @param boolean If true, the plugin is a internal plugin (prefixed with '@'). (Unused, keep for compat.) * @return string The classname of the plugin */ static function getClassByInstanceID($instance_id, &$is_internal) @@ -1306,7 +1308,7 @@ class serendipity_plugin * @access public * @return true */ - function serendipity_plugin($instance) + function __construct($instance) { $this->instance = $instance; } @@ -1635,20 +1637,41 @@ class serendipity_plugin * * @access public * @param string template filename (no directory!) - * @param bool Called by a plugin (defaults true), since we do not have a theme using it yet * @return string Parsed Smarty return */ - function &parseTemplate($filename, $plugin = true) { + function &parseTemplate($filename) + { global $serendipity; $filename = basename($filename); - $tfile = serendipity_getTemplateFile($filename, 'serendipityPath', true, $plugin); // use the simple plugin fallback stairway + $tfile = serendipity_getTemplateFile($filename, 'serendipityPath', true); if (!$tfile || $tfile == $filename) { $tfile = dirname($this->pluginFile) . '/' . $filename; } return $serendipity['smarty']->fetch('file:'. $tfile); } + + /** + * Get full path for a filename. Will first look into themes and then in the plugins directory + * @param string relative path to file + * @param string The path selector that tells whether to return a HTTP or realpath + * @return string The full path+filename to the requested file + * */ + function &getFile($filename, $key = 'serendipityPath') + { + global $serendipity; + + $path = serendipity_getTemplateFile($filename, $key, true); + if (!$path) { + if (file_exists(dirname($this->pluginFile) . '/' . $filename)) { + return $serendipity[$key] . 'plugins/' . basename(dirname($this->pluginFile)) . '/' . $filename; + } + } + + return $path; + } + } /** @@ -1668,7 +1691,7 @@ class serendipity_event extends serendipity_plugin * @param string The instance name * @return */ - function serendipity_event($instance) + function __construct($instance) { $this->instance = $instance; } @@ -1736,13 +1759,14 @@ class serendipity_event extends serendipity_plugin */ function event_hook($event, &$bag, &$eventData, $addData = null) { - // Define event hooks here, if you want you plugin to execute those instead of being a sidebar item. - // Look at external plugins 'serendipity_event_mailer' or 'serendipity_event_weblogping' for usage. + // Define event hooks here, if you want your plugin to execute those instead of being a sidebar item. + // Look at in/external plugins 'serendipity_event_mailer' or 'serendipity_event_weblogping' for usage. // Currently available events: // backend_publish [after insertion of a new article in your s9y-backend] // backend_display [after displaying an article in your s9y-backend] // frontend_display [before displaying an article in your s9y-frontend] // frontend_comment [after displaying the "enter comment" dialog] + // ...and some more in the meanwhile...! :) return true; } diff --git a/include/serendipity_smarty_class.inc.php b/include/serendipity_smarty_class.inc.php index 840298dd..c9f67a8a 100644 --- a/include/serendipity_smarty_class.inc.php +++ b/include/serendipity_smarty_class.inc.php @@ -39,7 +39,7 @@ class Serendipity_Smarty_Security_Policy extends Smarty_Security // This allows the fetch() and include calls to pull .tpl files from any directory, // so that symlinked plugin directories outside the s9y path can be included properly. - // TODO / FUTURE: If Smarty will implement a seperation option to dissect fetch() from + // TODO / FUTURE: If Smarty will implement a separation option to dissect fetch() from // {include} calls, we should only apply this workaround to fetch() calls. // Redirecting fetch() as our custom function is too risky and has too high a performance // impact. @@ -107,7 +107,7 @@ class Serendipity_Smarty extends Smarty // some documentary from the smarty forum /* - Adressing a specific $template_dir (see 3.1 release notes) + Addressing a specific $template_dir (see 3.1 release notes) Smarty 3.1 introduces the $template_dir index notation. $smarty->fetch('[foo]bar.tpl') and {include file="[foo]bar.tpl"} require the template bar.tpl to be loaded from $template_dir['foo']; @@ -121,15 +121,15 @@ class Serendipity_Smarty extends Smarty $template_engine = serendipity_get_config_var('template_engine'); $template_dirs = array(); - + + // first add template path + $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template']; + // then fallback engines (which should never be a comma separated list) if ($template_engine) { $p = explode(',', $template_engine); foreach($p AS $te) { $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . trim($te) . '/'; } - } else { - // this is tested without need actually, but it makes the directory setter fallback chain a little more precise - $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template']; } $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['defaultTemplate']; $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template_backend']; @@ -139,7 +139,7 @@ class Serendipity_Smarty extends Smarty $template_dirs[] = S9Y_TEMPLATE_SECUREDIR; } - // disable plugin dir as added template dir is not adviced, if set security is enabled (backend & frontend need access to fetch plugin templates) + // disable plugin dir as added template dir is not advised, if set security is enabled (backend & frontend need access to fetch plugin templates) $template_dirs[] = $serendipity['serendipityPath'] . 'plugins'; // add default template to addTemplate array, if not already set in engine $template_dirs[] = S9Y_TEMPLATE_FALLBACK; @@ -263,7 +263,7 @@ class Serendipity_Smarty extends Smarty } /** - * wrapper for assign_by_ref - BC mode Smarty 2 -> 3 (Serendipity core uses assignByRef already - and nearly no occurances in additional plugins) + * wrapper for assign_by_ref - BC mode Smarty 2 -> 3 (Serendipity core uses assignByRef already - and nearly no occurrences in additional plugins) * * @param string $tpl_var the template variable name * @param mixed &$value the referenced value to assign diff --git a/include/tpl/config_local.inc.php b/include/tpl/config_local.inc.php index 4c288af6..b928c434 100644 --- a/include/tpl/config_local.inc.php +++ b/include/tpl/config_local.inc.php @@ -187,7 +187,7 @@ array('var' => 'permalinkArchivesPath', 'title' => INSTALL_PERMALINK_ARCHIVESPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'archives', 'permission' => 'siteConfiguration', @@ -195,7 +195,7 @@ array('var' => 'permalinkCategoriesPath', 'title' => INSTALL_PERMALINK_CATEGORIESPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'categories', 'permission' => 'siteConfiguration', @@ -203,7 +203,7 @@ array('var' => 'permalinkAuthorsPath', 'title' => INSTALL_PERMALINK_AUTHORSPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'authors', 'permission' => 'siteConfiguration', @@ -211,7 +211,7 @@ array('var' => 'permalinkUnsubscribePath', 'title' => INSTALL_PERMALINK_UNSUBSCRIBEPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'unsubscribe', 'permission' => 'siteConfiguration', @@ -219,7 +219,7 @@ array('var' => 'permalinkDeletePath', 'title' => INSTALL_PERMALINK_DELETEPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'delete', 'permission' => 'siteConfiguration', @@ -227,7 +227,7 @@ array('var' => 'permalinkApprovePath', 'title' => INSTALL_PERMALINK_APPROVEPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'approve', 'permission' => 'siteConfiguration', @@ -235,7 +235,7 @@ array('var' => 'permalinkFeedsPath', 'title' => INSTALL_PERMALINK_FEEDSPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'feeds', 'permission' => 'siteConfiguration', @@ -243,7 +243,7 @@ array('var' => 'permalinkPluginPath', 'title' => INSTALL_PERMALINK_PLUGINPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'plugin', 'permission' => 'siteConfiguration', @@ -251,7 +251,7 @@ array('var' => 'permalinkAdminPath', 'title' => INSTALL_PERMALINK_ADMINPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'admin', 'permission' => 'siteConfiguration', @@ -259,7 +259,7 @@ array('var' => 'permalinkSearchPath', 'title' => INSTALL_PERMALINK_SEARCHPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'search', 'permission' => 'siteConfiguration', @@ -267,7 +267,7 @@ array('var' => 'permalinkCommentsPath', 'title' => INSTALL_PERMALINK_COMMENTSPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'comments', 'permission' => 'siteConfiguration', @@ -737,6 +737,13 @@ 'type' => 'textarea', 'permission' => 'blogConfiguration', 'default' => ''), + + array('var' => 'allowLocalURL', + 'title' => CONFIG_ALLOW_LOCAL_URL, + 'description' => CONFIG_ALLOW_LOCAL_URL_DESC, + 'type' => 'bool', + 'permission' => 'siteConfiguration', + 'default' => false), )); return $res; diff --git a/include/tpl/config_personal.inc.php b/include/tpl/config_personal.inc.php index 8d86a17d..70baaf93 100644 --- a/include/tpl/config_personal.inc.php +++ b/include/tpl/config_personal.inc.php @@ -191,6 +191,14 @@ 'permission' => 'personalConfiguration', 'flags' => array('config')), + array('var' => 'categoryDefault', + 'title' => CATEGORY, + 'description' => '', + 'type' => 'list', + 'default' => serendipity_fetchCategories(null, null, null, 'write', true), + 'permission' => 'personalConfiguration', + 'flags' => array('config')), + array('var' => 'use_autosave', 'title' => CONF_USE_AUTOSAVE, 'description' => CONF_USE_AUTOSAVE_DESC, diff --git a/include/tpl/htaccess_cgi_rewrite.tpl b/include/tpl/htaccess_cgi_rewrite.tpl index 4978c2fb..5c8ed1f1 100644 --- a/include/tpl/htaccess_cgi_rewrite.tpl +++ b/include/tpl/htaccess_cgi_rewrite.tpl @@ -6,6 +6,7 @@ Options -MultiViews RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -28,7 +29,6 @@ RewriteRule ^{PAT_CSS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] diff --git a/include/tpl/htaccess_cgi_rewrite2.tpl b/include/tpl/htaccess_cgi_rewrite2.tpl index 8ced8d3a..42f1c365 100644 --- a/include/tpl/htaccess_cgi_rewrite2.tpl +++ b/include/tpl/htaccess_cgi_rewrite2.tpl @@ -5,6 +5,7 @@ DirectoryIndex {PREFIX}{indexFile} RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -27,7 +28,6 @@ RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] diff --git a/include/tpl/htaccess_errordocs.tpl b/include/tpl/htaccess_errordocs.tpl index 32c4b3ca..18955145 100644 --- a/include/tpl/htaccess_errordocs.tpl +++ b/include/tpl/htaccess_errordocs.tpl @@ -1,8 +1,6 @@ # BEGIN s9y ErrorDocument 404 {PREFIX}{indexFile} DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off deny from all diff --git a/include/tpl/htaccess_normal.tpl b/include/tpl/htaccess_normal.tpl index 7bb21a44..8e5b3bcb 100644 --- a/include/tpl/htaccess_normal.tpl +++ b/include/tpl/htaccess_normal.tpl @@ -1,7 +1,5 @@ # BEGIN s9y DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off deny from all diff --git a/include/tpl/htaccess_rewrite.tpl b/include/tpl/htaccess_rewrite.tpl index ce9b7426..5e28c5c1 100644 --- a/include/tpl/htaccess_rewrite.tpl +++ b/include/tpl/htaccess_rewrite.tpl @@ -1,13 +1,12 @@ # BEGIN s9y ErrorDocument 404 {PREFIX}{indexFile} DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off Options -MultiViews RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -30,7 +29,6 @@ RewriteRule ^{PAT_CSS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] diff --git a/include/tpl/htaccess_rewrite2.tpl b/include/tpl/htaccess_rewrite2.tpl index 8f0b7603..42f1c365 100644 --- a/include/tpl/htaccess_rewrite2.tpl +++ b/include/tpl/htaccess_rewrite2.tpl @@ -1,12 +1,11 @@ # BEGIN s9y ErrorDocument 404 {PREFIX}{indexFile} DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -29,7 +28,6 @@ RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] diff --git a/index.php b/index.php index 7f42886b..83839358 100644 --- a/index.php +++ b/index.php @@ -74,7 +74,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range isset($_GET['p'])) { serveEntry($matches); } elseif (preg_match(PAT_PERMALINK_FEEDCATEGORIES, $uri, $matches) || preg_match(PAT_PERMALINK_FEEDAUTHORS, $uri, $matches) || preg_match(PAT_FEEDS, $uri)) { - serveFeed(); + serveFeed($matches); exit; } else if (preg_match(PAT_PLUGIN, $uri, $matches)) { servePlugin($matches); diff --git a/lang/UTF-8/plugin_lang.php b/lang/UTF-8/plugin_lang.php index 6c7403ce..e06f2e11 100644 --- a/lang/UTF-8/plugin_lang.php +++ b/lang/UTF-8/plugin_lang.php @@ -92,3 +92,10 @@ foreach($const['missing'] AS $file => $constants) { @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_bg.inc.php b/lang/UTF-8/serendipity_lang_bg.inc.php index b749ab4b..b4e7476d 100644 --- a/lang/UTF-8/serendipity_lang_bg.inc.php +++ b/lang/UTF-8/serendipity_lang_bg.inc.php @@ -1104,3 +1104,10 @@ $i18n_filename_to = array('-', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_cn.inc.php b/lang/UTF-8/serendipity_lang_cn.inc.php index a4d5395f..d418e6ff 100644 --- a/lang/UTF-8/serendipity_lang_cn.inc.php +++ b/lang/UTF-8/serendipity_lang_cn.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_cs.inc.php b/lang/UTF-8/serendipity_lang_cs.inc.php index 1ab01e54..3a038963 100644 --- a/lang/UTF-8/serendipity_lang_cs.inc.php +++ b/lang/UTF-8/serendipity_lang_cs.inc.php @@ -1143,3 +1143,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_cz.inc.php b/lang/UTF-8/serendipity_lang_cz.inc.php index 113739da..03c0a0e8 100644 --- a/lang/UTF-8/serendipity_lang_cz.inc.php +++ b/lang/UTF-8/serendipity_lang_cz.inc.php @@ -1144,3 +1144,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_da.inc.php b/lang/UTF-8/serendipity_lang_da.inc.php index 15f44062..92bd1058 100644 --- a/lang/UTF-8/serendipity_lang_da.inc.php +++ b/lang/UTF-8/serendipity_lang_da.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_de.inc.php b/lang/UTF-8/serendipity_lang_de.inc.php index edbbbfb2..9d0c56b4 100644 --- a/lang/UTF-8/serendipity_lang_de.inc.php +++ b/lang/UTF-8/serendipity_lang_de.inc.php @@ -1084,6 +1084,7 @@ @define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Erzwingen: Vollständig'); @define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Erzwingen: Alternative'); @define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Erzwingen: CKEditor Vollständig'); + @define('CATEGORY_PLUGIN_SHOWALL', 'Zeige einen Link zu "Alle Kategorien"?'); @define('CATEGORY_PLUGIN_SHOWALL', 'Falls aktiviert wird Besuchern ein Link angezeigt, das Blog ohne Einschränkung der Kategorien darzustellen.'); @define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity benötigt eine PHP-Version >= %2$s - Sie benutzen eine ältere Version (%1$s) und müssen auf eine neuere upgraden. Die meisten Provider gestatten den Wechsel auf neuere PHP-Versionen über einen Schalter in der Admin-Oberfläche oder eine Anweisung in der .htaccess.'); @@ -1097,18 +1098,26 @@ @define('INSTALL_PASSWORD_INVALID', 'Die eingebenen Administrator-Passwörter stimmen nicht überein.'); @define('INSTALL_BACKENDPOPUP_GRANULAR', 'Popups in speziellen Bereichen erzwingen'); @define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'Wenn Popups generell deaktiviert wurden, kann an speziellen Stellen dennoch der Einsatz von Popups forciert werden, indem die Liste jener Stellen hier aufgeführt wird (kommasepariert). Die vollständige Liste ist: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open %1$s manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. Return to previous page.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. Return to previous page.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. Note: This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); + +@define('START_UPDATE', 'Starte Update ...'); +@define('UPDATE_ALL', 'Alles updaten'); +@define('JS_FAILURE', 'Die Javascript-Bibliothek von Serendipity konnte nicht geladen werden. Das kann aufgrund von PHP- oder Pluginfehlern, eventuell auch aufgrund eines zerstörten Browsercaches vorkommen. Um die genaue Fehlermeldung zu sehen, öffnen Sie bitte %1$s von Hand im Browser und suchen nach Fehlermeldungen.'); +@define('THEMES_PREVIEW_BLOG', 'Siehe Demo auf blog.s9y.org'); +@define('SYNDICATION_PLUGIN_XML_DESC', 'Auf "none" setzen um nur einen Textlink anzuzeigen.'); +@define('MULTICHECK_NO_ITEM', 'Kein Element ausgewählt, bitte mindestens eins auswählen. Zurück zur vorigen Seite.'); +@define('MULTICHECK_NO_DIR', 'Kein Verzeichnis ausgewählt, bitte mindestens eins auswählen. Zurück zur vorigen Seite.'); +@define('BULKMOVE_INFO', 'Gleichzeitiges Verschieben mehrerer Dateien'); +@define('BULKMOVE_INFO_DESC', 'Sie können mehrere Dateien auswählen, um sie gleichzeitig an einen neuen Ort zu verschieben. Hinweis: Diese Aktion kann nicht rückgängig gemacht werden, genau wie das gleichzeitige Löschen mehrerer Dateien. Alle ausgewählten Dateien werden physikalisch verschoben; Blogeinträge, welche diese Dateien referenzieren, werden umgeschrieben, um auf den neuen Ort zu verweisen.'); +@define('FIRST_PAGE', 'Erste Seite'); +@define('LAST_PAGE', 'Letzte Seite'); +@define('MEDIA_PROPERTIES_DONE', 'Eigenschaften von #%d geändert.'); +@define('DIRECTORY_INFO', 'Verzeichnis-Info'); +@define('DIRECTORY_INFO_DESC', 'Verzeichnisse entsprechen dem Namen ihrer zugehörigen phsikalischen Ordner. Wollen Sie Verzeichnisse, die Dateien enthalten, ändern oder verschieben, haben Sie zwei Optionen. Sie können entweder das gewünschte Ziel(unter)verzeichnis anlegen, die Elemente über die Medienbibliothek dorthin verschieben und das leere Ursprungsverzeichnis löschen; oder Sie können das gesamte Ursprungsverzeichnis über den Button "Verzeichnis bearbeiten" ändern und frei umbenennen. Letzteres wird alle Unterverzeichnisse und Elemente verschieben und die darauf verweisenden Blogeinträge anpassen.'); +@define('MEDIA_RESIZE_EXISTS', 'Datei-Dimensionen existieren bereits!'); +@define('USE_CACHE', 'Caching aktivieren'); +@define('USE_CACHE_DESC', 'Aktiviert einen internen Cache, um die Wiederholung bestimmter Datenbank-Abfragen zu umgehen. Das reduziert die Last auf Server mit mittlerem bis hohem Traffic und verbessert die Ladezeit der Seite.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Beachten Sie bitte, dass Sie ein Präfix verwenden müssen, damit Serendipity die URL korrekt der richtigen Aktion zuordnen kann. Sie dürfen das Präfix in jeden beliebigen einzigartigen Namen ändern, aber nicht komplett entfernen. Das gilt für alle Definitionen für Pfad-Präfixe.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Erlaube, Daten über lokale URLs abzurufen'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'Standardmäßig ist es aus Sicherheitsgründen verboten, Daten über lokale URLs abzurufen, um Server Side Request Forgers (SSRF) zu vermeiden. Wenn Sie ein lokales Intranet verwenden können sie die Datenabfrage über diese Option explizit erlauben.'); +@define('REMOTE_FILE_INVALID', 'Die angegebene URL scheint eine lokale zu sein und darf nicht abgerufen werden. Sie können dies explizit gestatten, indem Sie in der Konfiguration die Option "Erlaube, Daten über lokale URLs abzurufen" setzen.'); +@define('URL_NOT_FOUND', 'Die angeforderte Seite konnte nicht gefunden werden (404). Dies ist die Standardseite.'); \ No newline at end of file diff --git a/lang/UTF-8/serendipity_lang_en.inc.php b/lang/UTF-8/serendipity_lang_en.inc.php index 198fd4e1..ef579cc0 100644 --- a/lang/UTF-8/serendipity_lang_en.inc.php +++ b/lang/UTF-8/serendipity_lang_en.inc.php @@ -1113,3 +1113,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_es.inc.php b/lang/UTF-8/serendipity_lang_es.inc.php index 6f235658..bc6377b1 100644 --- a/lang/UTF-8/serendipity_lang_es.inc.php +++ b/lang/UTF-8/serendipity_lang_es.inc.php @@ -1130,3 +1130,10 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ?? @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_fa.inc.php b/lang/UTF-8/serendipity_lang_fa.inc.php index 7a65a95d..63f13265 100644 --- a/lang/UTF-8/serendipity_lang_fa.inc.php +++ b/lang/UTF-8/serendipity_lang_fa.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_fi.inc.php b/lang/UTF-8/serendipity_lang_fi.inc.php index 9bec73ea..a77de5bf 100644 --- a/lang/UTF-8/serendipity_lang_fi.inc.php +++ b/lang/UTF-8/serendipity_lang_fi.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_fr.inc.php b/lang/UTF-8/serendipity_lang_fr.inc.php index 86a775d7..ed833e12 100644 --- a/lang/UTF-8/serendipity_lang_fr.inc.php +++ b/lang/UTF-8/serendipity_lang_fr.inc.php @@ -1119,3 +1119,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_hu.inc.php b/lang/UTF-8/serendipity_lang_hu.inc.php index 3b74bbfc..9462b83e 100644 --- a/lang/UTF-8/serendipity_lang_hu.inc.php +++ b/lang/UTF-8/serendipity_lang_hu.inc.php @@ -1110,3 +1110,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_is.inc.php b/lang/UTF-8/serendipity_lang_is.inc.php index 9a4196c6..99db586c 100644 --- a/lang/UTF-8/serendipity_lang_is.inc.php +++ b/lang/UTF-8/serendipity_lang_is.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_it.inc.php b/lang/UTF-8/serendipity_lang_it.inc.php index 2c568ec3..abc8a685 100644 --- a/lang/UTF-8/serendipity_lang_it.inc.php +++ b/lang/UTF-8/serendipity_lang_it.inc.php @@ -1115,3 +1115,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ja.inc.php b/lang/UTF-8/serendipity_lang_ja.inc.php index d5abe4f6..258024e8 100644 --- a/lang/UTF-8/serendipity_lang_ja.inc.php +++ b/lang/UTF-8/serendipity_lang_ja.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ko.inc.php b/lang/UTF-8/serendipity_lang_ko.inc.php index f586c982..94f4a3fd 100644 --- a/lang/UTF-8/serendipity_lang_ko.inc.php +++ b/lang/UTF-8/serendipity_lang_ko.inc.php @@ -1,8 +1,8 @@ -# (c) 2005 http://www.tool-box.info/ +# Translated by: Wesley Woo-Duk Hwang-Chung +# (c) 2005, 2016 http://www.tool-box.info/ /* vim: set sts=4 ts=4 expandtab : */ @define('LANG_CHARSET', 'UTF-8'); @@ -19,7 +19,7 @@ @define('SERENDIPITY_ADMIN_SUITE', '세렌디피티 관리 ë„구'); @define('HAVE_TO_BE_LOGGED_ON', 'ì´ íŽ˜ì´ì§€ë¥¼ 보려면 로그ì¸í•´ì•¼ 합니다'); @define('WRONG_USERNAME_OR_PASSWORD', 'ì•„ì´ë”” ë˜ëŠ” 암호가 잘못 ìž…ë ¥ë˜ì—ˆìŠµë‹ˆë‹¤'); -@define('APPEARANCE', '시ê°ì  요소'); +@define('APPEARANCE', '외관'); @define('MANAGE_STYLES', 'ìŠ¤íƒ€ì¼ ê´€ë¦¬'); @define('CONFIGURE_PLUGINS', 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì •'); @define('CONFIGURATION', '기능 설정'); @@ -31,9 +31,9 @@ @define('SAVE', '저장'); @define('NAME', 'ì´ë¦„'); @define('CREATE_NEW_CAT', '새로운 범주 만들기'); -@define('I_WANT_THUMB', 'ê¸€ì— ìž‘ì€ ê·¸ë¦¼ì„ ì ìš©í•©ë‹ˆë‹¤.'); -@define('I_WANT_BIG_IMAGE', 'ê¸€ì— í° ê·¸ë¦¼ì„ ì ìš©í•©ë‹ˆë‹¤.'); -@define('I_WANT_NO_LINK', '그림 ìžì²´ë¡œ ë³´ì—¬ì¤ë‹ˆë‹¤'); +@define('I_WANT_THUMB', 'ê¸€ì— ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œ 추가합니다.'); +@define('I_WANT_BIG_IMAGE', 'ê¸€ì— ì›ë³¸ 그림으로 추가합니다.'); +@define('I_WANT_NO_LINK', '그림으로만 ë³´ì—¬ì¤ë‹ˆë‹¤'); @define('I_WANT_IT_TO_LINK', 'ê·¸ë¦¼ì„ ë‹¤ìŒ ì£¼ì†Œì˜ ë§í¬ë¡œ 만듭니다:'); @define('BACK', '뒤로'); @define('FORWARD', '앞으로'); @@ -51,7 +51,7 @@ @define('SAVE', '저장'); @define('UP', '위로'); @define('DOWN', '아래로'); -@define('ENTRIES', 'ê°œì˜ ê¸€'); +@define('ENTRIES', '블로그 글'); @define('NEW_ENTRY', '새로운 글'); @define('EDIT_ENTRIES', '글 편집하기'); @define('CATEGORIES', '범주'); @@ -69,9 +69,9 @@ @define('ADD_COMMENT', 'ë§ê¸€ 추가'); @define('NO_COMMENTS', 'ë§ê¸€ ì—†ìŒ'); @define('POSTED_BY', '작성ìž:'); -@define('ON', ':'); -@define('A_NEW_COMMENT_BLAHBLAH', 'ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ "%s"ì— ìžˆëŠ” "%s"(ì´)ë¼ëŠ” ê¸€ì— ìƒˆë¡œìš´ ë§ê¸€ì´ 달렸습니다.'); -@define('A_NEW_TRACKBACK_BLAHBLAH', '"%s"(ì´)ë¼ëŠ” ê¸€ì— ìƒˆë¡œìš´ íŠ¸ëž™ë°±ì´ ìƒì„±ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('ON', '작성ì¼:'); +@define('A_NEW_COMMENT_BLAHBLAH', 'ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ "%s"ì— ìžˆëŠ” 글 "%s"ì— ìƒˆë¡œìš´ ë§ê¸€ì´ 달렸습니다.'); +@define('A_NEW_TRACKBACK_BLAHBLAH', '블로그 글 "%s"ì— ìƒˆë¡œìš´ íŠ¸ëž™ë°±ì´ ìƒì„±ë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('NO_CATEGORY', '범주 ì—†ìŒ'); @define('ENTRY_BODY', '본문'); @define('EXTENDED_BODY', '추가 ë‚´ìš©'); @@ -102,14 +102,14 @@ @define('SHOWS_TOP_SITES', '블로그로 가장 ìžì£¼ ë§í¬ë¥¼ ê±´ 사ì´íЏ 보기'); @define('TOP_EXITS', 'ìƒìœ„ ì§„ì¶œ ë§í¬'); @define('SHOWS_TOP_EXIT', '블로그ì—서 가장 ìžì£¼ 타고 나간 ë§í¬ 보기'); -@define('SYNDICATION', '배급'); -@define('SHOWS_RSS_BLAHBLAH', 'RSS 배급 ë§í¬ 보여주기'); +@define('SYNDICATION', '중개'); +@define('SHOWS_RSS_BLAHBLAH', 'RSS 중개 ë§í¬ 보여주기'); @define('ADVERTISES_BLAHBLAH', 'ë¸”ë¡œê·¸ì˜ ì œìž‘ ë„구를 광고함'); @define('HTML_NUGGET', 'HTML ë©ì–´ë¦¬'); @define('HOLDS_A_BLAHBLAH', 'ì˜†ì¤„ì— HTMLì´ ë“¤ì–´ìžˆëŠ” ë©ì–´ë¦¬ë¥¼ 넣기'); @define('TITLE_FOR_NUGGET', 'ë©ì–´ë¦¬ 제목'); @define('THE_NUGGET', 'HTML ë©ì–´ë¦¬ë¥¼ 넣으세요!'); -@define('SYNDICATE_THIS_BLOG', '블로그 배급받기'); +@define('SYNDICATE_THIS_BLOG', '블로그 중개하기'); @define('YOU_CHOSE', '%s(ì„)를 골ëžìŠµë‹ˆë‹¤'); @define('IMAGE_ROTATE_LEFT', '시계 반대방향으로 90ë„ íšŒì „í•˜ê¸°'); @define('IMAGE_ROTATE_RIGHT', '시계 방향으로 90ë„ íšŒì „í•˜ê¸°'); @@ -124,20 +124,20 @@ @define('VIEW_TOPICS', '주제 보기'); @define('AT', 'ìž…ë ¥:'); @define('SET_AS_TEMPLATE', '템플릿으로 지정하기'); -@define('IN', '범주:'); +@define('IN', '다ìŒì— í¬í•¨:'); @define('EXCERPT', '발췌'); @define('TRACKED', 'ì¶”ì ë¨'); @define('LINK_TO_ENTRY', 'ê¸€ì— ëŒ€í•œ ë§í¬'); -@define('LINK_TO_REMOTE_ENTRY', '먼 ê¸€ì— ëŒ€í•œ ë§í¬'); +@define('LINK_TO_REMOTE_ENTRY', 'ì›ê²© ê¸€ì— ëŒ€í•œ ë§í¬'); @define('IP_ADDRESS', 'IP 주소'); @define('USER', '사용ìž'); -@define('THUMBNAIL_USING_OWN', '%s(ì€)는 ì´ë¯¸ 충분히 작으므로 ê·¸ ìžì²´ê°€ ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œë„ ì‚¬ìš©ë©ë‹ˆë‹¤.'); +@define('THUMBNAIL_USING_OWN', '%s 파ì¼ì€ ì´ë¯¸ 충분히 작으므로 ê·¸ ìžì²´ë¥¼ ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œë„ ì‚¬ìš©í•©ë‹ˆë‹¤.'); @define('THUMBNAIL_FAILED_COPY', '%s ìžì²´ë¥¼ ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œ 사용하려고 했으나 ë³µì‚¬ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤.'); @define('AUTHOR', '작성ìž'); @define('LAST_UPDATED', '최종 ì—…ë°ì´íЏ'); @define('TRACKBACK_SPECIFIC', 'ì´ ê¸€ì— ëŒ€í•œ 트랙백 ì „ìš© URI'); @define('DIRECT_LINK', 'ì´ ê¸€ì— ëŒ€í•œ ì§ì ‘ ë§í¬'); -@define('COMMENT_ADDED', 'ë§ê¸€ì´ 성공ì ìœ¼ë¡œ 달렸습니다. '); +@define('COMMENT_ADDED', 'ë§ê¸€ì´ 성공ì ìœ¼ë¡œ 달렸습니다.'); @define('COMMENT_ADDED_CLICK', '%s여기를 눌러%s ë§ê¸€ 목ë¡ìœ¼ë¡œ ëŒì•„가거나 %s여기를 눌러%s ì´ ì°½ì„ ë‹«ìŠµë‹ˆë‹¤.'); @define('COMMENT_NOT_ADDED_CLICK', '%s여기를 눌러%s ë§ê¸€ 목ë¡ìœ¼ë¡œ ëŒì•„가거나 %s여기를 눌러%s ì´ ì°½ì„ ë‹«ìŠµë‹ˆë‹¤.'); @define('COMMENTS_DISABLE', 'ì´ ê¸€ì— ë§ê¸€ì„ 금지하기'); @@ -145,10 +145,10 @@ @define('COMMENTS_CLOSED', '작성ìžê°€ ì´ ê¸€ì— ë§ê¸€ì„ 금지했습니다'); @define('EMPTY_COMMENT', 'ë§ê¸€ ë‚´ìš©ì´ ë¹„ì–´ 있으므로 %sëŒì•„가서%s 다시 작성하십시오'); @define('ENTRIES_FOR', '%s: ìž‘ì„±ëœ ê¸€'); -@define('DOCUMENT_NOT_FOUND', '%së¼ëŠ” 문서를 찾지 못했습니다.'); +@define('DOCUMENT_NOT_FOUND', '%s(ì´)ë¼ëŠ” 문서를 찾지 못했습니다.'); @define('USERNAME', 'ì•„ì´ë””'); @define('PASSWORD', '암호'); -@define('AUTOMATIC_LOGIN', 'ì •ë³´ 저장'); +@define('AUTOMATIC_LOGIN', 'ë¡œê·¸ì¸ ì •ë³´ 저장'); @define('SERENDIPITY_INSTALLATION', '세렌디피티 설치'); @define('LEFT', '왼쪽'); @define('RIGHT', '오른쪽'); @@ -168,7 +168,7 @@ @define('CATEGORY_SAVED', '범주가 저장ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('SELECT_TEMPLATE', 'ë¸”ë¡œê·¸ì— ì‚¬ìš©í•  í…œí”Œë¦¿ì„ ì„ íƒí•˜ì‹­ì‹œì˜¤.'); @define('ENTRIES_NOT_SUCCESSFULLY_INSERTED', 'ê¸€ì´ ì„±ê³µì ìœ¼ë¡œ 삽입ë˜ì§€ 않았습니다.'); -@define('MT_DATA_FILE', 'ì´ë™ 가능 í˜•íƒœì˜ ë°ì´í„° 파ì¼'); +@define('MT_DATA_FILE', '무버블 타입 웹로그용 ë°ì´í„° 파ì¼'); @define('FORCE', '강제로'); @define('CREATE_AUTHOR', 'ìž‘ì„±ìž \'%s\'(ì„)를 ìƒì„±í•©ë‹ˆë‹¤.'); @define('CREATE_CATEGORY', '범주 \'%s\'(ì„)를 ìƒì„±í•©ë‹ˆë‹¤.'); @@ -204,14 +204,14 @@ @define('RESIZING', 'í¬ê¸° 조절중'); @define('RESIZE_DONE', '완료 (%sê°œì˜ ê·¸ë¦¼ì˜ í¬ê¸°ë¥¼ 조절함).'); @define('SYNCING', 'ë°ì´í„°ë² ì´ìŠ¤ë¥¼ 그림 í´ë”와 ë™ê¸°í™”합니다'); -@define('SYNC_OPTION_LEGEND', 'Thumbnail Synchronization Options'); -@define('SYNC_OPTION_KEEPTHUMBS', 'Keep all existing thumbnails'); -@define('SYNC_OPTION_SIZECHECKTHUMBS', 'Keep existing thumbnails only if they are the correct size'); -@define('SYNC_OPTION_DELETETHUMBS', 'Regenerate all thumbnails'); +@define('SYNC_OPTION_LEGEND', 'ìž‘ì€ ê·¸ë¦¼ ë™ê¸°í™” ì„ íƒì‚¬í•­'); +@define('SYNC_OPTION_KEEPTHUMBS', 'ê¸°ì¡´ì˜ ìž‘ì€ ê·¸ë¦¼ ëª¨ë‘ ìœ ì§€'); +@define('SYNC_OPTION_SIZECHECKTHUMBS', 'ì•Œë§žì€ í¬ê¸°ì¼ ê²½ìš°ì¼ ë•Œë§Œ ê¸°ì¡´ì˜ ìž‘ì€ ê·¸ë¦¼ 유지'); +@define('SYNC_OPTION_DELETETHUMBS', 'ìž‘ì€ ê·¸ë¦¼ ëª¨ë‘ ìž¬ìƒì„±'); @define('SYNC_DONE', '완료 (%sê°œì˜ ê·¸ë¦¼ì„ ë™ê¸°í™”함).'); -@define('FILE_NOT_FOUND', '%së¼ëŠ” ì´ë¦„ì˜ íŒŒì¼ì„ 찾지 못했습니다. ì´ë¯¸ ì‚­ì œë˜ì—ˆì„ 수 있습니다.'); +@define('FILE_NOT_FOUND', '%s(ì´)ë¼ëŠ” ì´ë¦„ì˜ íŒŒì¼ì„ 찾지 못했습니다. ì´ë¯¸ ì‚­ì œë˜ì—ˆì„ 수 있습니다.'); @define('ABORT_NOW', '지금 중지'); -@define('REMOTE_FILE_NOT_FOUND', 'ì›ê²© 서버ì—서 파ì¼ì„ 찾지 못했습니다. %s (ì´)ë¼ëŠ” 주소가 정확합니까?'); +@define('REMOTE_FILE_NOT_FOUND', 'ì›ê²© 서버ì—서 파ì¼ì„ 찾지 못했습니다. %s(ì´)ë¼ëŠ” 주소가 정확합니까?'); @define('FILE_FETCHED', '%s(ì„)를 %s(으)로 가져옴'); @define('FILE_UPLOADED', 'íŒŒì¼ %s(ì´)ê°€ %s(으)로 성공ì ìœ¼ë¡œ 업로드ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('WORD_OR', 'ë˜ëŠ”'); @@ -231,8 +231,8 @@ @define('SYNDICATION_PLUGIN_20', 'RSS 2.0 피드'); @define('SYNDICATION_PLUGIN_20c', 'RSS 2.0 ë§ê¸€'); @define('SYNDICATION_PLUGIN_ATOM03', 'ATOM 0.3 피드'); -@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor" 필드'); -@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster" 필드'); +@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor"(편집ì¸) 필드'); +@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster"(웹마스터) 필드'); @define('SYNDICATION_PLUGIN_BANNERURL', 'RSS 피드를 위한 그림 파ì¼'); @define('SYNDICATION_PLUGIN_BANNERWIDTH', '그림 í­'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT', '그림 높ì´'); @@ -241,9 +241,9 @@ @define('SYNDICATION_PLUGIN_BANNERURL_DESC', 'GIF/JPEG/PNG로 ëœ ê·¸ë¦¼ 파ì¼ì˜ 주소 (빈 ìƒíƒœ: 세렌디피티 로고 그림)'); @define('SYNDICATION_PLUGIN_BANNERWIDTH_DESC', '픽셀 단위 (최고 144)'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT_DESC', '픽셀 단위 (최고 400)'); -@define('SYNDICATION_PLUGIN_TTL', '"ttl" 필드 (ìƒì¡´ì‹œê°„)'); +@define('SYNDICATION_PLUGIN_TTL', '"ttl"(ìƒì¡´ì‹œê°„) 필드'); @define('SYNDICATION_PLUGIN_TTL_DESC', '외부 사ì´íЏ ë˜ëŠ” í”„ë¡œê·¸ëž¨ì— ì˜í•´ì„œ ë” ì´ìƒ 저장ë˜ì§€ ì•Šì„ ì‹œì ì„ ë¶„ 단위로 ìž…ë ¥ (빈 ìƒíƒœ: 숨김) [RSS 2.0]'); -@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate" 필드'); +@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate"(게시ì¼ìž) 필드'); @define('SYNDICATION_PLUGIN_PUBDATE_DESC', 'RSS 채ë„ì— "pubDate" 필드를 넣어서 최신으로 올ë¼ì˜¨ ê¸€ì˜ ë‚ ì§œë¥¼ 보여주겠습니까?'); @define('CONTENT', 'ë‚´ìš©'); @define('TYPE', '종류'); @@ -277,12 +277,12 @@ @define('SORT_ORDER_WIDTH', '그림 í­'); @define('SORT_ORDER_HEIGHT', '그림 높ì´'); @define('SORT_ORDER_DATE', '업로드 시간'); -@define('SORT_ORDER_ASC', '오름차'); -@define('SORT_ORDER_DESC', '내림차'); +@define('SORT_ORDER_ASC', '오름차순'); +@define('SORT_ORDER_DESC', '내림차순'); @define('THUMBNAIL_SHORT', 'ìž‘ì€ ê·¸ë¦¼'); -@define('ORIGINAL_SHORT', 'ì›ëž˜ 그림'); +@define('ORIGINAL_SHORT', 'ì›ë³¸ 그림'); @define('APPLY_MARKUP_TO', '%sì— ë§ˆí¬ì—… ì ìš©'); -@define('CALENDAR_BEGINNING_OF_WEEK', '한 ì£¼ì˜ ì‹œìž‘ì '); +@define('CALENDAR_BEGINNING_OF_WEEK', '한 ì£¼ì˜ ì‹œìž‘ì¼'); @define('SERENDIPITY_NEEDS_UPGRADE', '세렌디피티 현재 설치 ë²„ì „ì´ %sì¸ ê²ƒìœ¼ë¡œ 나타났습니다. 버전 %s로 업그레ì´ë“œë¥¼ ê³„ì† ì§„í–‰í•˜ë ¤ë©´ 여기를 누르십시오.'); @define('SERENDIPITY_UPGRADER_WELCOME', '세렌디피티 업그레ì´ë“œ ì—ì´ì „íŠ¸ì— ì˜¤ì‹  ê²ƒì„ í™˜ì˜í•©ë‹ˆë‹¤.'); @define('SERENDIPITY_UPGRADER_PURPOSE', 'ì„¤ì¹˜ëœ ì„¸ë Œë””í”¼í‹° %sì˜ ì—…ê·¸ë ˆì´ë“œë¥¼ ë„와드리겠습니다.'); @@ -306,12 +306,12 @@ @define('CREATED_USER', '새로운 ì‚¬ìš©ìž %s(ì´)ê°€ ìƒì„±ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('MODIFIED_USER', '%sì˜ ì„¤ì •ì´ ë³€ê²½ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('USER_LEVEL', 'ì‚¬ìš©ìž ë ˆë²¨'); -@define('DELETE_USER', 'ì‚¬ìš©ìž %dë²ˆì¸ %s(ì„)를 삭제하게 ë©ë‹ˆë‹¤. ê³„ì† í•˜ì‹œê² ìŠµë‹ˆê¹Œ? ì´ ì‚¬ìš©ìžê°€ 작성한 ê¸€ì´ ë” ì´ìƒ ì¼ë°˜ 페ì´ì§€ì— 나타나지 않게 ë©ë‹ˆë‹¤.'); -@define('DELETED_USER', 'ì‚¬ìš©ìž %dë²ˆì¸ %s(ì´)ê°€ ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('DELETE_USER', '%d번 사용ìžì¸ %s(ì„)를 삭제하게 ë©ë‹ˆë‹¤. ê³„ì† í•˜ì‹œê² ìŠµë‹ˆê¹Œ? ì´ ì‚¬ìš©ìžê°€ 작성한 ê¸€ì´ ë” ì´ìƒ 외부 페ì´ì§€ì— 나타나지 않게 ë©ë‹ˆë‹¤.'); +@define('DELETED_USER', '%d번 사용ìžì¸ %s(ì´)ê°€ ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('LIMIT_TO_NUMBER', '몇 ê°œì˜ ì•„ì´í…œì„ 표시하겠습니까?'); @define('ENTRIES_PER_PAGE', '한 페ì´ì§€ì— 표시할 글'); @define('XML_IMAGE_TO_DISPLAY', 'XML 버튼'); -@define('XML_IMAGE_TO_DISPLAY_DESC','XML í”¼ë“œì— ì´ ê·¸ë¦¼ì´ ë‚˜íƒ€ë‚©ë‹ˆë‹¤. 비운 ìƒíƒœë©´ 기본 ê·¸ë¦¼ì´ ë³´ì´ê³  \'none\'ì„ ìž…ë ¥í•˜ë©´ 나타나지 않습니다.'); +@define('XML_IMAGE_TO_DISPLAY_DESC','XML í”¼ë“œì— ì´ ê·¸ë¦¼ì´ ë‚˜íƒ€ë‚©ë‹ˆë‹¤. 비운 ìƒíƒœë©´ 기본 ê·¸ë¦¼ì´ ë³´ì´ê³  \'ì—†ìŒ\'ì„ ìž…ë ¥í•˜ë©´ 나타나지 않습니다.'); @define('DIRECTORIES_AVAILABLE', '하위 디렉토리 목ë¡ì—서 디렉토리 ì´ë¦„ì„ ëˆ„ë¥´ë©´ ê·¸ 디렉토리 ì•ˆì— ìƒˆ 디렉토리를 만들 수 있습니다.'); @define('ALL_DIRECTORIES', '모든 디렉토리'); @@ -320,8 +320,8 @@ @define('PARENT_DIRECTORY', 'ìƒìœ„ 디렉토리'); @define('CONFIRM_DELETE_DIRECTORY', '디렉토리 %sì— í¬í•¨ëœ 모든 ë‚´ìš©ì„ ì‚­ì œí•˜ê² ìŠµë‹ˆê¹Œ?'); @define('ERROR_NO_DIRECTORY', '오류: 디렉토리 %s(ì´)ê°€ 존재하지 않습니다'); -@define('CHECKING_DIRECTORY', '디렉토리 %s ë‚´ì˜ íŒŒì¼ ì ê²€ì¤‘'); -@define('DELETING_FILE', 'íŒŒì¼ %s 삭제중...'); +@define('CHECKING_DIRECTORY', '디렉토리 %s ë‚´ì˜ íŒŒì¼ ì ê²€ 중'); +@define('DELETING_FILE', 'íŒŒì¼ %s ì‚­ì œ 중...'); @define('ERROR_DIRECTORY_NOT_EMPTY', '비어 있지 ì•Šì€ ë””ë ‰í† ë¦¬ë¥¼ 삭제할 수 없습니다. 남아있는 파ì¼ë„ 제거하려면 "ê°•ì œ ì‚­ì œ"를 ì²´í¬í•˜ê³  다시 시ë„하십시오. 남아있는 파ì¼ì€:'); @define('DIRECTORY_DELETE_FAILED', '디렉토리 %s ì‚­ì œì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. 권한 설정ì´ë‚˜ ìœ„ì˜ ë©”ì‹œì§€ë¥¼ 확ì¸í•˜ì‹­ì‹œì˜¤.'); @define('DIRECTORY_DELETE_SUCCESS', '디렉토리 %s(ì´)ê°€ 성공ì ìœ¼ë¡œ ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤.'); @@ -334,10 +334,10 @@ @define('TOP_LEVEL', '최ìƒìœ„ (본문)'); @define('SYNDICATION_PLUGIN_GENERIC_FEED', '%s 피드'); @define('PERMISSIONS', '권한 설정'); -@define('INTEGRITY', 'Verify Installation Integrity'); -@define('CHECKSUMS_NOT_FOUND', 'Unable to compare checksums! (No checksums.inc.php in main directory)'); -@define('CHECKSUMS_PASS', 'All required files verified.'); -@define('CHECKSUM_FAILED', '%s corrupt or modified: failed verification'); +@define('INTEGRITY', '설치ìƒíƒœ 무결성 ê²€ì¦'); +@define('CHECKSUMS_NOT_FOUND', 'ì²´í¬ì„¬ì„ 비êµí•˜ì§€ 못했습니다! (ë©”ì¸ ë””ë ‰í† ë¦¬ì— checksums.inc.php 파ì¼ì´ ì—†ìŒ)'); +@define('CHECKSUMS_PASS', '필수 파ì¼ì´ ëª¨ë‘ ê²€ì¦ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('CHECKSUM_FAILED', '%s 파ì¼ì´ ì†ìƒë˜ê±°ë‚˜ 수정ë˜ì—ˆìŠµë‹ˆë‹¤: ê²€ì¦ ì‹¤íŒ¨'); @define('SETTINGS_SAVED_AT', '새로운 ì„¤ì •ì´ %sì— ì €ìž¥ë˜ì—ˆìŠµë‹ˆë‹¤'); /* DATABASE SETTINGS */ @@ -358,19 +358,19 @@ /* PATHS */ @define('INSTALL_CAT_PATHS', '경로'); -@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 ë° íŒŒì¼ì— 대한 경로를 지정합니다. 디렉토리 ëì— ìŠ¬ëž˜ì‹œ 추가하는 ê²ƒì„ ìžŠì§€ 마십시오.'); +@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 ë° íŒŒì¼ì— 대한 경로를 지정합니다. 디렉토리 ëì— ìŠ¬ëž˜ì‹œ(/) 추가하는 ê²ƒì„ ìžŠì§€ 마십시오.'); @define('INSTALL_FULLPATH', 'ì „ì²´ 경로'); -@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 ìœ„ì¹˜ì˜ ì ˆëŒ€ 경로'); +@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 ìœ„ì¹˜ì˜ ì ˆëŒ€ì ì´ê³  ì „ì²´ì ì¸ 경로'); @define('INSTALL_UPLOADPATH', '업로드 경로'); -@define('INSTALL_UPLOADPATH_DESC', 'ì—…ë¡œë“œëœ íŒŒì¼ì´ 저장ë˜ëŠ” ìœ„ì¹˜ë¡œì¨ \'ì „ì²´ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로임 - ì¼ë°˜ì ìœ¼ë¡œ \'uploads/\''); +@define('INSTALL_UPLOADPATH_DESC', 'ì—…ë¡œë“œëœ íŒŒì¼ì´ 저장ë˜ëŠ” 위치로서 \'ì „ì²´ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로 - ì¼ë°˜ì ìœ¼ë¡œ \'uploads/\''); @define('INSTALL_RELPATH', 'ìƒëŒ€ 경로'); -@define('INSTALL_RELPATH_DESC', '브ë¼ìš°ì €ì— 나타날 ì„¸ë Œë””í”¼í‹°ì˜ ê²½ë¡œìž„ - ì¼ë°˜ì ìœ¼ë¡œ \'/serendipity/\''); +@define('INSTALL_RELPATH_DESC', '브ë¼ìš°ì €ì— 나타날 ì„¸ë Œë””í”¼í‹°ì˜ ê²½ë¡œ - ì¼ë°˜ì ìœ¼ë¡œ \'/serendipity/\''); @define('INSTALL_RELTEMPLPATH', '템플릿 ìƒëŒ€ 경로'); -@define('INSTALL_RELTEMPLPATH_DESC', 'í…œí”Œë¦¿ì´ ì €ìž¥ëœ ë””ë ‰í† ë¦¬ì˜ ê²½ë¡œë¡œì¨ \'ìƒëŒ€ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로임'); +@define('INSTALL_RELTEMPLPATH_DESC', 'í…œí”Œë¦¿ì´ ì €ìž¥ëœ ë””ë ‰í† ë¦¬ì˜ ê²½ë¡œë¡œì„œ \'ìƒëŒ€ 경로\'를 기준으로 한 ìƒëŒ€ 경로'); @define('INSTALL_RELUPLOADPATH', '업로드 ìƒëŒ€ 경로'); -@define('INSTALL_RELUPLOADPATH_DESC', '브ë¼ìš°ì €ì— 나타날 업로드 ê²½ë¡œë¡œì¨ \'ìƒëŒ€ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로임'); +@define('INSTALL_RELUPLOADPATH_DESC', '브ë¼ìš°ì €ì— 나타날 업로드 경로로서 \'ìƒëŒ€ 경로\'를 기준으로 한 ìƒëŒ€ 경로'); @define('INSTALL_URL', '블로그 주소'); -@define('INSTALL_URL_DESC', '세렌디피티 설치가 ëœ ê¸°ë³¸ ì¸í„°ë„· 주소'); +@define('INSTALL_URL_DESC', '세렌디피티가 ì„¤ì¹˜ëœ ê¸°ë³¸ ì¸í„°ë„· 주소(URL)'); @define('INSTALL_INDEXFILE', 'ì¸ë±ìФ 파ì¼'); @define('INSTALL_INDEXFILE_DESC', '세렌디피티 ì¸ë±ìФ 파ì¼ì˜ ì´ë¦„'); @@ -390,13 +390,13 @@ @define('INSTALL_BLOGNAME', '블로그 ì´ë¦„'); @define('INSTALL_BLOGNAME_DESC', 'ë¸”ë¡œê·¸ì— ì‚¬ìš©í•  제목'); @define('INSTALL_BLOGDESC', '블로그 설명'); -@define('INSTALL_BLOGDESC_DESC', 'ë¸”ë¡œê·¸ì˜ ë‚´ìš©ì„ ì ìŒ'); +@define('INSTALL_BLOGDESC_DESC', '블로그를 설명하는 ë‚´ìš©ì„ ì ìŒ'); @define('INSTALL_LANG', '언어'); @define('INSTALL_LANG_DESC', 'ë¸”ë¡œê·¸ì— ì‚¬ìš©í•  언어 ì„ íƒ'); /* APPEARANCE AND OPTIONS */ -@define('INSTALL_CAT_DISPLAY', '시ê°ì  요소 ë° ì˜µì…˜'); -@define('INSTALL_CAT_DISPLAY_DESC', 'ì„¸ë Œë””í”¼í‹°ì˜ ì§ê´€ì ì¸ 모습과 ëŠë‚Œì„ 정합니다.'); +@define('INSTALL_CAT_DISPLAY', '외관 ë° ì„ íƒì‚¬í•­'); +@define('INSTALL_CAT_DISPLAY_DESC', 'ì„¸ë Œë””í”¼í‹°ì˜ ê²‰ëª¨ìŠµê³¼ ì¸ìƒì„ 정합니다.'); @define('INSTALL_WYSIWYG', 'WYSIWYG 편집기 사용'); @define('INSTALL_WYSIWYG_DESC', 'WYSIWYG 편집기를 사용하겠습니까? (ì¸í„°ë„· ìµìŠ¤í”Œë¡œëŸ¬ 5 ì´ìƒì—서 ìž‘ë™, ëª¨ì§ˆë¼ 1.3 ì´ìƒì—서 부분 ìž‘ë™)'); @define('INSTALL_XHTML11', 'XHTML 1.1 ê·œê²©ì„ ê°•ì œë¡œ 따름'); @@ -406,31 +406,31 @@ @define('INSTALL_EMBED', '세렌디피티가 ë‚´ìž¥ëœ í˜•íƒœìž…ë‹ˆê¹Œ?'); @define('INSTALL_EMBED_DESC', 'ì¼ë°˜ 페ì´ì§€ ì†ì— 세렌디피티를 내장시키려면 "예"를 ì„ íƒí•˜ì—¬ í—¤ë”ê°€ ì œì™¸ëœ ë‚´ìš© 부분만 출력시키게 합니다. indexFile ì˜µì…˜ì„ ì‚¬ìš©í•˜ì—¬ ì¼ë°˜ì ì¸ 웹페ì´ì§€ í—¤ë”ì— wrapper í´ëž˜ìŠ¤ë¥¼ ì ìš©í•  수 있습니다. 보다 ìžì„¸í•œ ì‚¬í•­ì€ README 파ì¼ì„ 참조하십시오.'); @define('INSTALL_TOP_AS_LINKS', 'ìƒìœ„ ì§„ì¶œ/ì§„ìž… ì‚¬í•­ì„ ë§í¬ë¡œ 표시'); -@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•˜ê¸° 위해 ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì„ ì¼ë°˜ 글로 표시합니다. "예": ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì— ë§í¬ë¥¼ ê²ë‹ˆë‹¤. "기본값": ì  ì²´ ì„¤ì •ì— ë”°ë¦…ë‹ˆë‹¤(추천).'); -@define('INSTALL_BLOCKREF', 'ì§„ìž… 표시 통제'); -@define('INSTALL_BLOCKREF_DESC', 'ì§„ìž… ì‚¬í•­ì— í‘œì‹œë˜ì§€ 않았으면 하는 호스트가 ìžˆì„ ê²½ìš° ê° í˜¸ìŠ¤íŠ¸ë¥¼ \';\'로 분리해서 입력합니다. 표시 통제는 부분 ê²€ìƒ‰ì„ ì‚¬ìš©í•©ë‹ˆë‹¤(지정한 ì´ë¦„ì´ í˜¸ìŠ¤íŠ¸ì˜ ì¼ë¶€ì¼ 경우 통제ë¨).'); -@define('INSTALL_REWRITE', '주소 재기ë¡'); -@define('INSTALL_REWRITE_DESC', '주소 ìƒì„±ì‹œ 사용할 ê·œì¹™ì„ ì •í•©ë‹ˆë‹¤. ìž¬ê¸°ë¡ ê·œì¹™ì„ í™œì„±í™”ì‹œí‚¤ë©´ ë¸”ë¡œê·¸ì— ëŒ€í•œ 주소가 ê¹”ë”해지고 구글과 ê°™ì€ ê²€ìƒ‰ì—”ì§„ì— ì˜í•´ ì¸ë±ì‹±ì´ 잘 ë©ë‹ˆë‹¤. 웹서버가 세렌디피티 ë””ë ‰í† ë¦¬ì— ëŒ€í•´ mod_rewrite나 "AllowOverride All"ì„ ì§€ì›í•´ì•¼ 합니다. 기본 ì„¤ì •ì€ ìžë™ 검출ë©ë‹ˆë‹¤.'); +@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•˜ê¸° 위해 ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì„ ì¼ë°˜ 글로 표시합니다. "예": ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì— ë§í¬ë¥¼ ê²ë‹ˆë‹¤. "기본값": ì „ì²´ ì„¤ì •ì— ë”°ë¦…ë‹ˆë‹¤(추천).'); +@define('INSTALL_BLOCKREF', 'ì°¨ë‹¨ëœ ì§„ìž… 경로'); +@define('INSTALL_BLOCKREF_DESC', 'ì§„ìž… ì‚¬í•­ì— í‘œì‹œë˜ì§€ 않았으면 하는 호스트가 ìžˆì„ ê²½ìš° ê° í˜¸ìŠ¤íŠ¸ë¥¼ \';\'로 분리해서 입력합니다. ê¸€ìž ì¼ë¶€ë¶„ì´ ì¼ì¹˜í•´ë„ 차단ë¨ì— 유ì˜í•˜ì‹­ì‹œì˜¤(지정한 ì´ë¦„ì´ í˜¸ìŠ¤íŠ¸ì˜ ì¼ë¶€ì¼ 경우 차단ë¨).'); +@define('INSTALL_REWRITE', 'ì¸í„°ë„· 주소(URL) 재작성'); +@define('INSTALL_REWRITE_DESC', 'ì¸í„°ë„· 주소 ìƒì„±ì‹œ 사용할 ê·œì¹™ì„ ì •í•©ë‹ˆë‹¤. 재작성 ê·œì¹™ì„ í™œì„±í™”ì‹œí‚¤ë©´ ë¸”ë¡œê·¸ì— ëŒ€í•œ 주소가 ê¹”ë”해지고 구글과 ê°™ì€ ê²€ìƒ‰ì—”ì§„ì— ì˜í•´ ì¸ë±ì‹±ì´ 잘 ë©ë‹ˆë‹¤. 웹서버가 세렌디피티 ë””ë ‰í† ë¦¬ì— ëŒ€í•´ mod_rewrite나 "AllowOverride All"ì„ ì§€ì›í•´ì•¼ 합니다. 기본 ì„¤ì •ì€ ìžë™ ì¸ì‹ë©ë‹ˆë‹¤.'); /* IMAGECONVERSION SETTINGS */ @define('INSTALL_CAT_IMAGECONV', '그림 변환 설정'); @define('INSTALL_CAT_IMAGECONV_DESC', '세렌디피티가 ê·¸ë¦¼ì„ ì–´ë–»ê²Œ ë‹¤ë£°ì§€ì— ëŒ€í•œ 정보를 입력합니다.'); @define('INSTALL_IMAGEMAGICK', 'ImageMagick 사용하기'); -@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagickì´ ì„¤ì¹˜ë˜ì–´ 있으며 그림 í¬ê¸°ë¥¼ ì¡°ì ˆí•˜ëŠ”ë° ì‚¬ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'); +@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagickì´ ì„¤ì¹˜ë˜ì–´ 있으며 ì´ë¥¼ 그림 í¬ê¸° ì¡°ì ˆì— ì‚¬ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'); @define('INSTALL_IMAGEMAGICKPATH', '변환 ë°”ì´ë„ˆë¦¬ 경로'); -@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagickì˜ ë³€í™˜ ë°”ì´ë„ˆë¦¬(프로그램)ì˜ ì´ë¦„ ë° ì „ì²´ 경로'); +@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagick 변환 ë°”ì´ë„ˆë¦¬(프로그램)ì˜ ì´ë¦„ ë° ì „ì²´ 경로'); @define('INSTALL_THUMBSUFFIX', 'ìž‘ì€ ê·¸ë¦¼ ì ‘ë‘사'); @define('INSTALL_THUMBSUFFIX_DESC', 'ìž‘ì€ ê·¸ë¦¼ì€ ì›ëž˜ì´ë¦„.[ì ‘ë‘사].í™•ìž¥ìž ì‹ì˜ ì´ë¦„으로 ìƒì„±ë©ë‹ˆë‹¤'); -@define('INSTALL_THUMBWIDTH', 'ìž‘ì€ ê·¸ë¦¼ í¬ê¸°'); +@define('INSTALL_THUMBWIDTH', 'ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸°'); @define('INSTALL_THUMBWIDTH_DESC', 'ìžë™ ìƒì„±ë˜ëŠ” ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸°'); -@define('INSTALL_THUMBDIM', 'Thumbnail constrained dimension'); -@define('INSTALL_THUMBDIM_LARGEST', 'Largest'); -@define('INSTALL_THUMBDIM_WIDTH', 'Width'); -@define('INSTALL_THUMBDIM_HEIGHT', 'Height'); -@define('INSTALL_THUMBDIM_DESC', 'Dimension to be constrained to the thumbnail max size. The default "' . - INSTALL_THUMBDIM_LARGEST . '" limits both dimensions, so neither can be greater than the max size; "' . - INSTALL_THUMBDIM_WIDTH . '" and "' . INSTALL_THUMBDIM_HEIGHT . - '" only limit the chosen dimension, so the other could be larger than the max size.'); +@define('INSTALL_THUMBDIM', 'ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸° 제약 기준'); +@define('INSTALL_THUMBDIM_LARGEST', 'ì–‘ë°©í–¥ 모ë‘'); +@define('INSTALL_THUMBDIM_WIDTH', 'í­'); +@define('INSTALL_THUMBDIM_HEIGHT', '높ì´'); +@define('INSTALL_THUMBDIM_DESC', 'ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸°ë¥¼ 정하기 위한 ì œì•½ì˜ ê¸°ì¤€. ê¸°ë³¸ê°’ì¸ "' . + INSTALL_THUMBDIM_LARGEST . '" ì„ íƒ ì‹œ í­ê³¼ 높ì´ë¥¼ ëª¨ë‘ ì œí•œí•˜ë¯€ë¡œ ì–´ëŠ ìª½ë„ ìµœëŒ€ í¬ê¸°ë¥¼ 초과할 수 없으며 "' . + INSTALL_THUMBDIM_WIDTH . '"ê³¼ "' . INSTALL_THUMBDIM_HEIGHT . + '"는 ì„ íƒëœ 방향으로만 제한하므로 다른 한 ë°©í–¥ì€ ìµœëŒ€ í¬ê¸°ë³´ë‹¤ í´ ìˆ˜ 있습니다.'); /* Personal details */ @define('USERCONF_CAT_PERSONAL', '사용ìžì˜ ê°œì¸ ì •ë³´'); @@ -449,7 +449,7 @@ @define('USERCONF_ALLOWPUBLISH_DESC', 'ì´ ì‚¬ìš©ìžê°€ ê¸€ì„ ìž‘ì„±í•  ê¶Œí•œì´ ìžˆìŠµë‹ˆê¹Œ?'); @define('SUCCESS', '성공'); @define('POWERED_BY_SHOW_TEXT', '"세렌디피티"를 í…스트로 출력'); -@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웨블로그"를 í…스트로 출력함'); +@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웹로그"를 í…스트로 출력함'); @define('POWERED_BY_SHOW_IMAGE', '"세렌디피티"를 로고로 출력'); @define('POWERED_BY_SHOW_IMAGE_DESC', '세렌디피티 로고를 보여줌'); @define('PLUGIN_ITEM_DISPLAY', 'ì•„ì´í…œì´ ì–´ë””ì— í‘œì‹œë©ë‹ˆê¹Œ?'); @@ -481,7 +481,7 @@ @define('PLUGIN_SUPERUSER_HTTPS', '로그ì¸ì— https 사용'); @define('PLUGIN_SUPERUSER_HTTPS_DESC', 'ë¡œê·¸ì¸ ë§í¬ê°€ https 위치로 향하ë„ë¡ í•©ë‹ˆë‹¤. 웹서버가 ì´ ê¸°ëŠ¥ì„ ì§€ì›í•´ì•¼ 합니다.'); @define('INSTALL_SHOW_EXTERNAL_LINKS', '외부 ë§í¬ë¥¼ í´ë¦­í•  수 있게 하기'); -@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬(ìƒìœ„ ì§„ì¶œ, ìƒìœ„ ì§„ìž…, ì‚¬ìš©ìž ë§ê¸€)는 보여지지 않거나 ì¼ë°˜ í…스트로 표시ë˜ì–´ 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•©ë‹ˆë‹¤(추천). "예": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬ê°€ 하ì´í¼ë§í¬ë¡œ 걸립니다. 옆줄 í”ŒëŸ¬ê·¸ì¸ ì„¤ì •ì—서 별ë„로 ì •í•  수 있습니다.'); +@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬(ìƒìœ„ ì§„ì¶œ, ìƒìœ„ ì§„ìž…, ì‚¬ìš©ìž ë§ê¸€)는 보여지지 않거나 ì¼ë°˜ í…스트로 표시ë˜ì–´ 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•©ë‹ˆë‹¤(추천). "예": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬ê°€ 하ì´í¼ë§í¬ë¡œ 나타납니다. 옆줄 í”ŒëŸ¬ê·¸ì¸ ì„¤ì •ì—서 별ë„로 ì •í•  수 있습니다.'); @define('PAGE_BROWSE_COMMENTS', '%s번째 페ì´ì§€ | ì´ %s 페ì´ì§€ | ì´ %sê°œ ë§ê¸€'); @define('FILTERS', 'í•„í„°'); @define('FIND_ENTRIES', '글 찾기'); @@ -489,7 +489,7 @@ @define('FIND_MEDIA', '미디어 찾기'); @define('FILTER_DIRECTORY', '디렉토리'); @define('SORT_BY', 'ì •ë ¬ 순서'); -@define('TRACKBACK_COULD_NOT_CONNECT', 'íŠ¸ëž™ë°±ì´ ë³´ë‚´ì§€ì§€ 않ìŒ: %sì— ëŒ€í•´ì„œ í¬íЏ %dì—서 ì—´ 수 없었ìŒ'); +@define('TRACKBACK_COULD_NOT_CONNECT', 'íŠ¸ëž™ë°±ì´ ë³´ë‚´ì§€ì§€ 않ìŒ: %s애서 %d번 í¬íŠ¸ë¥¼ ì—´ 수 없었ìŒ'); @define('MEDIA', '미디어'); @define('MEDIA_LIBRARY', '미디어 보관함'); @define('ADD_MEDIA', '미디어 추가'); @@ -525,10 +525,10 @@ @define('TRACKBACK_SENT', '트랙백 성공'); @define('TRACKBACK_FAILED', '트랙백 실패: %s'); @define('TRACKBACK_NOT_FOUND', '트랙백 URI를 찾지 못했습니다.'); -@define('TRACKBACK_URI_MISMATCH', 'ìžë™ ê²€ìƒ‰ëœ íŠ¸ëž™ë°± URI는 목표 URI와 ë§žì§€ 않습니다.'); +@define('TRACKBACK_URI_MISMATCH', 'ìžë™ ê²€ìƒ‰ëœ íŠ¸ëž™ë°± URI는 ëŒ€ìƒ URI와 ë§žì§€ 않습니다.'); @define('TRACKBACK_CHECKING', 'íŠ¸ëž™ë°±ì´ ìžˆëŠ”ì§€ %s 확ì¸ì¤‘...'); -@define('TRACKBACK_NO_DATA', '목표가 ë°ì´í„°ë¥¼ ë‹´ê³  있지 않습니다.'); -@define('TRACKBACK_SIZE', '목표 URIê°€ 최개 íŒŒì¼ í¬ê¸°ì¸ %s ë°”ì´íŠ¸ë¥¼ 초과합니다.'); +@define('TRACKBACK_NO_DATA', '대ìƒì´ ë°ì´í„°ë¥¼ ë‹´ê³  있지 않습니다.'); +@define('TRACKBACK_SIZE', 'ëŒ€ìƒ URIê°€ 최대 íŒŒì¼ í¬ê¸°ì¸ %s ë°”ì´íŠ¸ë¥¼ 초과합니다.'); @define('COMMENTS_VIEWMODE_THREADED', 'ì—®ì€ í˜•íƒœ'); @define('COMMENTS_VIEWMODE_LINEAR', '나열 형태'); @define('DISPLAY_COMMENTS_AS', 'ë§ê¸€ 표시 ë°©ì‹:'); @@ -543,7 +543,7 @@ @define('MONTHS', 'ì›”'); @define('DAYS', 'ì¼'); @define('ARCHIVE_FREQUENCY', '표시 ì•„ì´í…œì˜ 주기'); -@define('ARCHIVE_FREQUENCY_DESC', '목ë¡ì— 있는 ê° ì•„ì´í…œì˜ 달력 ìƒì˜ 주기 단위'); +@define('ARCHIVE_FREQUENCY_DESC', '목ë¡ì— 있는 ê° ì•„ì´í…œì˜ 달력 ìƒ ì£¼ê¸° 단위'); @define('ARCHIVE_COUNT', '목ë¡ì— í‘œì‹œë  ì•„ì´í…œ 수'); @define('ARCHIVE_COUNT_DESC', '표시할 달, 주, ë˜ëŠ” ë‚ ì˜ ì´ ê°œìˆ˜'); @define('BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS', 'ì„¤ì¹˜ëœ í”ŒëŸ¬ê·¸ì¸ì˜ 목ë¡ìž…니다.'); @@ -555,9 +555,11 @@ @define('ALREADY_INSTALLED', 'ì´ë¯¸ 설치ë¨'); @define('SELECT_A_PLUGIN_TO_ADD', '설치하고 ì‹¶ì€ í”ŒëŸ¬ê·¸ì¸ì„ ì„ íƒí•˜ì‹­ì‹œì˜¤.'); @define('INSTALL_OFFSET', '서버 ì‹œê°„ê³¼ì˜ ì‹œê°„ ì°¨ì´'); +@define('INSTALL_OFFSET_ON_SERVER_TIME', '서버 시간대를 기준으로 ì°¨ì´ë¥¼ 설정합니까?'); +@define('INSTALL_OFFSET_ON_SERVER_TIME_DESC', '서버 시간대를 기준으로 ê¸€ì˜ í‘œì‹œ 시간 ì°¨ì´ë¥¼ ì„¤ì •í• ì§€ì˜ ì—¬ë¶€ë¥¼ 정합니다. 예를 고르면 서버 시간대를 기준으로 하고 아니오를 고르면 GMT를 기준으로 합니다.'); @define('STICKY_POSTINGS', 'ê¼­ëŒ€ê¸°ì— í‘œì‹œí•  글'); @define('INSTALL_FETCHLIMIT', '한 페ì´ì§€ì— 표시할 글 수'); -@define('INSTALL_FETCHLIMIT_DESC', 'ì¼ë°˜ 페ì´ì§€ ê°ê°ì— 표시할 ê¸€ì˜ ìˆ˜'); +@define('INSTALL_FETCHLIMIT_DESC', 'ê° ì™¸ë¶€ 페ì´ì§€ì— 표시할 ê¸€ì˜ ìˆ˜'); @define('IMPORT_ENTRIES', 'ë°ì´í„° 불러오기'); @define('EXPORT_ENTRIES', '글 내보내기'); @define('IMPORT_WELCOME', 'ì„¸ë Œë””í”¼í‹°ì˜ ë°ì´í„° 불러오기 유틸리티입니다'); @@ -576,13 +578,13 @@ @define('ACTIVATE_AUTODISCOVERY', '글 ì†ì— ë°œê²¬ëœ ë§í¬ë¡œ íŠ¸ëž™ë°±ì„ ë³´ëƒ„'); @define('WELCOME_TO_ADMIN', '세렌디피티 관리 ë„êµ¬ì— ì˜¤ì‹  ê²ƒì„ í™˜ì˜í•©ë‹ˆë‹¤.'); @define('PLEASE_ENTER_CREDENTIALS', 'ì¸ì¦ 정보를 ì•„ëž˜ì— ìž…ë ¥í•˜ì‹­ì‹œì˜¤.'); -@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s ë° PHP %s로 작성ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s ë° PHP %s(으)로 작성ë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('INSTALL_USEGZIP', 'Gzip ì••ì¶• 페ì´ì§€ 사용'); -@define('INSTALL_USEGZIP_DESC', '페ì´ì§€ 전송 ì†ë„를 í–¥ìƒì‹œí‚¤ê¸° 위해, 사용ìžì˜ 브ë¼ìš°ì €ê°€ 기능 ì§€ì›ì„ í•  경우 페ì´ì§€ë¥¼ 압축해서 전송할 수 있습니다. 추천 사항입니다.'); +@define('INSTALL_USEGZIP_DESC', '사용ìžì˜ 브ë¼ìš°ì €ê°€ ì§€ì›ì„ í•  경우 페ì´ì§€ 전송 ì†ë„를 í–¥ìƒì‹œí‚¤ê¸° 위해 페ì´ì§€ë¥¼ 압축해서 전송할 수 있습니다. 추천 사항입니다.'); @define('INSTALL_SHOWFUTURE', 'ë¯¸ëž˜ì— ìž‘ì„±í•œ 글 ë³´ì´ê¸°'); @define('INSTALL_SHOWFUTURE_DESC', 'ì´ ê¸°ëŠ¥ì„ ì‚¬ìš©í•  경우 작성 날짜가 ë¯¸ëž˜ì¸ ê¸€ë„ ëª¨ë‘ ë¸”ë¡œê·¸ì— í‘œì‹œí•˜ê²Œ ë©ë‹ˆë‹¤. ê¸°ë³¸ê°’ì€ ì´ëŸ¬í•œ ê¸€ì„ ìž‘ì„± 날짜가 다다를 때까지 숨기는 것입니다.'); @define('INSTALL_DBPERSISTENT', 'ì§€ì†ì ì¸ ì ‘ì† ì‚¬ìš©'); -@define('INSTALL_DBPERSISTENT_DESC', 'ì§€ì†ì ìœ¼ë¡œ ë°ì´í„°íŽ˜ì´ìŠ¤ì— ì ‘ì†í•˜ëŠ” ê¸°ëŠ¥ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. 여기ì—서 ìžì„¸í•œ 정보를 ì½ì„ 수 있습니다. ì¼ë°˜ì ìœ¼ë¡œ 비추천 사항입니다.'); +@define('INSTALL_DBPERSISTENT_DESC', 'ì§€ì†ì ìœ¼ë¡œ ë°ì´í„°íŽ˜ì´ìŠ¤ì— ì ‘ì†í•˜ëŠ” ê¸°ëŠ¥ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. 여기ì—서 ìžì„¸í•œ 정보를 ì½ì„ 수 있습니다. ì¼ë°˜ì ìœ¼ë¡œ 추천하지 않습니다.'); @define('NO_IMAGES_FOUND', 'ê·¸ë¦¼ì´ ì—†ìŠµë‹ˆë‹¤'); @define('PERSONAL_SETTINGS', 'ê°œì¸ ì„¤ì •'); @define('REFERER', 'ì§„ìž… 경로'); @@ -606,7 +608,7 @@ @define('THEY_DONT', '그렇지 않ìŒ'); @define('SIMPLE_INSTALLATION', '간단한 설치'); @define('EXPERT_INSTALLATION', '전문가 설치'); -@define('COMPLETE_INSTALLATION', '설치 ë내기'); +@define('COMPLETE_INSTALLATION', '설치 완료하기'); @define('WONT_INSTALL_DB_AGAIN', 'ë°ì´í„°ë² ì´ìŠ¤ë¥¼ 다시 설치하지 않습니다'); @define('CHECK_DATABASE_EXISTS', 'ë°ì´í„°ë² ì´ìФ ë° í…Œì´ë¸”ì´ ì´ë¯¸ 존재하는지 확ì¸í•©ë‹ˆë‹¤'); @define('CREATING_PRIMARY_AUTHOR', '기본 ìž‘ì„±ìž \'%s\' ìƒì„±ì¤‘'); @@ -629,26 +631,26 @@ @define('PROBLEM_PERMISSIONS_HOWTO', '권한 ì„¤ì •ì€ ë¬¸ì œê°€ ë°œìƒí•œ ë””ë ‰í† ë¦¬ì— ëŒ€í•´ 쉘 명령어 `%s`를 실행하거나 FTP í”„ë¡œê·¸ëž¨ì„ í†µí•´ ì´ë¥¼ ì„¤ì •í•¨ìœ¼ë¡œì¨ ë°”ë¡œìž¡ì„ ìˆ˜ 있습니다.'); @define('WARNING_TEMPLATE_DEPRECATED', '경고: ì‚¬ìš©ì¤‘ì¸ í…œí”Œë¦¿ì´ êµ¬ì‹ í…œí”Œë¦¿ ë°©ì‹ì„ 사용하고 있습니다. 가능하다면 ì—…ë°ì´íЏ 하십시오.'); @define('ENTRY_PUBLISHED_FUTURE', 'ì´ ê¸€ì€ ì•„ì§ ê²Œì‹œë˜ì§€ 않았습니다.'); -@define('ENTRIES_BY', '%sì— ì˜í•œ 글'); +@define('ENTRIES_BY', '%sì˜ ê¸€'); @define('PREVIOUS', 'ì´ì „'); @define('NEXT', '다ìŒ'); @define('APPROVE', '승ì¸'); @define('DO_MARKUP_DESCRIPTION', 'í…ìŠ¤íŠ¸ì— ë§ˆí¬ì—… 변환(ì´ëª¨í‹°ì½˜, *, /, _ ë“±ì„ í™œìš©í•œ 마í¬ì—…)ì„ ì ìš©í•©ë‹ˆë‹¤. 사용하지 않으면 입력한 HTML 코드가 ëª¨ë‘ ë³´ì¡´ë©ë‹ˆë‹¤.'); @define('CATEGORY_ALREADY_EXIST', '"%s"(ì´)ë¼ëŠ” 범주가 ì´ë¯¸ 존재합니다.'); -@define('ERROR_FILE_FORBIDDEN', '액티브 컨í…츠가 담긴 파ì¼ì„ 업로드할 수 없습니다.'); +@define('ERROR_FILE_FORBIDDEN', '사용 ì¤‘ì¸ ë‚´ìš©ì´ ë‹´ê¸´ 파ì¼ì„ 업로드할 수 없습니다.'); @define('ADMIN', '관리 사항'); @define('ADMIN_FRONTPAGE', '기본 페ì´ì§€'); @define('QUOTE', 'ì¸ìš©'); @define('IFRAME_SAVE', '세렌디피티가 ê¸€ì„ ì €ìž¥í•˜ë©´ì„œ íŠ¸ëž™ë°±ì„ ìƒì„±í•˜ê³  XML-RPC í˜¸ì¶œì„ ìˆ˜í–‰í•˜ëŠ” 중입니다. 약간 ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다.'); @define('IFRAME_SAVE_DRAFT', 'ì´ ê¸€ì˜ ì´ˆì•ˆì´ ì €ìž¥ë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('IFRAME_PREVIEW', '세렌디피티가 미리보기를 ìƒì„±í•˜ê³  있습니다...'); -@define('IFRAME_WARNING', '브ë¼ìš°ì €ê°€ iframesì— ëŒ€í•œ ê°œë…ì„ ì§€ì›í•˜ì§€ 않습니다. serendipity_config.inc.php 파ì¼ì„ 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); +@define('IFRAME_WARNING', '브ë¼ìš°ì €ê°€ iframeì— ëŒ€í•œ ê°œë…ì„ ì§€ì›í•˜ì§€ 않습니다. serendipity_config.inc.php 파ì¼ì„ 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); @define('NONE', 'ì—†ìŒ'); @define('USERCONF_CAT_DEFAULT_NEW_ENTRY', '새 ê¸€ì— ëŒ€í•œ 기본 설정'); @define('UPGRADE', '업그레ì´ë“œ'); @define('UPGRADE_TO_VERSION', '버전 %s(으)로 업그레ì´ë“œ'); @define('DELETE_DIRECTORY', '디렉토리 ì‚­ì œ'); -@define('DELETE_DIRECTORY_DESC', '미디어 파ì¼ì´ 담긴 ë””ë ‰í† ë¦¬ì˜ ë‚´ìš©ì„ ì‚­ì œí•˜ë ¤ê³  합니다. ì´ íŒŒì¼ë“¤ì€ ë³¸ë¬¸ì— ì‚¬ìš©ì¤‘ì¼ ìˆ˜ 있습니다.'); +@define('DELETE_DIRECTORY_DESC', '미디어 파ì¼ì´ 담긴 ë””ë ‰í† ë¦¬ì˜ ë‚´ìš©ì„ ì‚­ì œí•˜ë ¤ê³  합니다. ì´ íŒŒì¼ë“¤ì€ ë³¸ë¬¸ì— ì‚¬ìš© ì¤‘ì¼ ìˆ˜ 있습니다.'); @define('FORCE_DELETE', 'ì´ ë””ë ‰í† ë¦¬ì— ìžˆëŠ” 모든 íŒŒì¼ (세렌디피티가 모르는 종류 í¬í•¨) ì‚­ì œ'); @define('CREATE_DIRECTORY', '디렉토리 ìƒì„±'); @define('CREATE_NEW_DIRECTORY', '새 디렉토리 ìƒì„±'); @@ -664,24 +666,24 @@ @define('RECHECK_INSTALLATION', '설치 ìƒíƒœ ìž¬í™•ì¸ í•„ìš”'); @define('IMAGICK_EXEC_ERROR', '실행할 수 ì—†ìŒ: "%s", 오류: %s, 리턴 변수: %d'); @define('INSTALL_OFFSET_DESC', 'ì›¹ì„œë²„ì˜ ì‹œê°„(현재: %clock%)ê³¼ 사용ìžì˜ ì‹œê°„ëŒ€ì™€ì˜ ì°¨ì´ë¥¼ 시간 단위로 입력함'); -@define('UNMET_REQUIREMENTS', '요구사항 불충족: %s'); +@define('UNMET_REQUIREMENTS', '요구사항 미달: %s'); @define('CHARSET', '문ìžì—´ 종류'); @define('AUTOLANG', '방문ìžì˜ 브ë¼ìš°ì € 언어 ì„¤ì •ì„ ê¸°ë³¸ìœ¼ë¡œ 따름'); @define('AUTOLANG_DESC', '사용할 경우 방문ìžì˜ 브ë¼ìš°ì € 언어 ì„¤ì •ì„ í™•ì¸í•˜ì—¬ í™”ë©´ì— í‘œì‹œë˜ëŠ” 언어 ë° ê¸€ì˜ ì–¸ì–´ë¥¼ 결정합니다.'); @define('INSTALL_AUTODETECT_URL', 'ì‚¬ìš©ëœ HTTP 호스트를 ìžë™ ê°ì§€'); @define('INSTALL_AUTODETECT_URL_DESC', '사용할 경우 방문ìžê°€ 사용한 HTTP 호스트를 세렌디피티가 기본 ì¸í„°ë„· 주소로 쓰게 ë©ë‹ˆë‹¤. ì´ë ‡ê²Œ ë˜ë©´ 세렌디피티 블로그를 여러 ê°œì˜ ë„ë©”ì¸ ì´ë¦„ í•˜ì— ì‚¬ìš©í•  수 있게 ë˜ë©°, 해당 ë„ë©”ì¸ì„ 방문ìžê°€ 블로그를 ë°©ë¬¸í•˜ëŠ”ë° ì‚¬ìš©í•œ 추가 ë§í¬ì— 사용할 수 있게 ë©ë‹ˆë‹¤.'); -@define('CONVERT_HTMLENTITIES', 'HTML 본체 ìžë™ ë³€í™˜ì„ ì‹œë„하겠습니까?'); +@define('CONVERT_HTMLENTITIES', 'HTML 엔티티로 í‘œí˜„ëœ ë¬¸ìžì˜ ìžë™ ë³€í™˜ì„ ì‹œë„하겠습니까?'); @define('EMPTY_SETTING', '"%s"ì— ëŒ€í•œ 유효한 ê°’ì„ ì§€ì •í•˜ì§€ 않았습니다.'); @define('USERCONF_REALNAME', '실제 ì´ë¦„'); -@define('USERCONF_REALNAME_DESC', '작성ìžì˜ 실제 ì´ë¦„으로ì¨, ë…ìžê°€ 보게 ë˜ëŠ” ì´ë¦„입니다.'); +@define('USERCONF_REALNAME_DESC', '작성ìžì˜ 실제 ì´ë¦„으로서, ë…ìžê°€ 보게 ë˜ëŠ” ì´ë¦„입니다.'); @define('HOTLINK_DONE', '파ì¼ì´ í•«ë§í¬ ë˜ì—ˆìŠµë‹ˆë‹¤.
        완료.'); @define('ENTER_MEDIA_URL_METHOD', '불러오기 ë°©ì‹:'); -@define('ADD_MEDIA_BLAHBLAH_NOTE', '주ì˜: 서버ì—서 í•«ë§í¬ë¥¼ 하게 ë  ê²½ìš°, 해당 사ì´íЏì—서 í•«ë§í¬ í—ˆë½ì„ 받아놓거나 ìžì‹ ì˜ 사ì´íŠ¸ì¸ ê²½ìš°ì— ëŒ€í•´ 하기 ë°”ëžë‹ˆë‹¤. í•«ë§í¬ë¥¼ 하게 ë˜ë©´ 외부 ê·¸ë¦¼ì„ ë”°ë¡œ 저장하지 않고 쓸 수 있게 ë©ë‹ˆë‹¤.'); +@define('ADD_MEDIA_BLAHBLAH_NOTE', '주ì˜: 서버ì—서 í•«ë§í¬ 하기는 해당 사ì´íЏì—서 í•«ë§í¬ í—ˆë½ì„ 미리 받아놓거나 ìžì‹ ì˜ 사ì´íŠ¸ì¸ ê²½ìš°ì— ëŒ€í•´ 하기 ë°”ëžë‹ˆë‹¤. í•«ë§í¬ë¥¼ 하게 ë˜ë©´ 외부 ê·¸ë¦¼ì„ ë”°ë¡œ 저장하지 않고 쓸 수 있게 ë©ë‹ˆë‹¤.'); @define('MEDIA_HOTLINKED', 'í•«ë§í¬ ë¨'); @define('FETCH_METHOD_IMAGE', 'ì´ìª½ 서버로 ê·¸ë¦¼ì„ ë‹¤ìš´ë¡œë“œí•˜ê¸°'); @define('FETCH_METHOD_HOTLINK', '서버로 í•«ë§í¬ 걸기'); @define('DELETE_HOTLINK_FILE', '%s(ì´)ë¼ëŠ” í•«ë§í¬ íŒŒì¼ ì‚­ì œë¨'); -@define('SYNDICATION_PLUGIN_SHOW_MAIL', 'ì´ë©”ì¼ ì£¼ì†Œ 표시?'); +@define('SYNDICATION_PLUGIN_SHOW_MAIL', 'ì´ë©”ì¼ ì£¼ì†Œë¥¼ 표시합니까?'); @define('IMAGE_MORE_INPUT', '그림 추가'); @define('BACKEND_TITLE', 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì • í™”ë©´ì— ì¶”ê°€ ì •ë³´ 표시'); @define('BACKEND_TITLE_FOR_NUGGET', 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì • í™”ë©´ì— HTML ë©ì–´ë¦¬ 플러그ì¸ì˜ 설명과 함께 í‘œì‹œë  ë³„ë„ì˜ ë¬¸ìž¥ì„ ì§ì ‘ ì •í•  수 있습니다. ì œëª©ì´ ì—†ëŠ” 여러 ê°œì˜ HTML ë©ì–´ë¦¬ë¥¼ 쓸 경우 ê°ê°ì„ 구별하기 쉽게 ë©ë‹ˆë‹¤.'); @@ -724,18 +726,18 @@ @define('SYNDICATION_PLUGIN_FEEDBURNERID', '피드버너 ì•„ì´ë””'); @define('SYNDICATION_PLUGIN_FEEDBURNERID_DESC', 'ê²Œì‹œí•˜ê³ ìž í•˜ëŠ” í”¼ë“œì˜ ì•„ì´ë””'); @define('SYNDICATION_PLUGIN_FEEDBURNERIMG', '피드버너 그림'); -@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.comì— ì¡´ìž¬í•¨)ì˜ ì´ë¦„ (fbapix.gif 형태ì´ë©°, 비워ë‘ë©´ ì¹´ìš´í„° 표시)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.comì— ìžˆìŒ)ì˜ ì´ë¦„ (fbapix.gif 형태ì´ë©°, 비워ë‘ë©´ ì¹´ìš´í„° 표시)'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE', '피드버너 제목'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE_DESC', '그림 ì˜†ì— í‘œì‹œí•  제목 (ìžˆì„ ê²½ìš°)'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT', '피드버너 그림 설명'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT_DESC', '그림 ìœ„ì— ì»¤ì„œë¥¼ 댈 때 표시할 설명 (ìžˆì„ ê²½ìš°)'); @define('INSTALL_DBPORT', 'ë°ì´í„°ë² ì´ìФ í¬íЏ'); @define('INSTALL_DBPORT_DESC', 'ë°ì´í„°ë² ì´ìФ ì„œë²„ì— ì ‘ì†í•  때 사용하는 í¬íЏ 번호'); -@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', 'ì¼ë°˜ 페ì´ì§€: 외부 서비스'); -@define('PLUGIN_GROUP_FRONTEND_FEATURES', 'ì¼ë°˜ 페ì´ì§€: 부가 기능'); -@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', 'ì¼ë°˜ 페ì´ì§€: 개조 사항'); -@define('PLUGIN_GROUP_FRONTEND_VIEWS', 'ì¼ë°˜ 페ì´ì§€: 표시 ìƒíƒœ'); -@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', 'ì¼ë°˜ 페ì´ì§€: 글 관련'); +@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', '외부 페ì´ì§€: 외부 서비스'); +@define('PLUGIN_GROUP_FRONTEND_FEATURES', '외부 페ì´ì§€: 부가 기능'); +@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', '외부 페ì´ì§€: 개조 사항'); +@define('PLUGIN_GROUP_FRONTEND_VIEWS', '외부 페ì´ì§€: 표시 ìƒíƒœ'); +@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', '외부 페ì´ì§€: 글 관련'); @define('PLUGIN_GROUP_BACKEND_EDITOR', '관리 페ì´ì§€: 편집기'); @define('PLUGIN_GROUP_BACKEND_USERMANAGEMENT', '관리 페ì´ì§€: ì‚¬ìš©ìž ê´€ë¦¬'); @define('PLUGIN_GROUP_BACKEND_METAINFORMATION', '관리 페ì´ì§€: 메타 ì •ë³´'); @@ -780,7 +782,7 @@ @define('CATEGORIES_PARENT_BASE', '하위 범주만 ë³´ì´ê¸°'); @define('CATEGORIES_PARENT_BASE_DESC', 'í•˜ë‚˜ì˜ ìƒìœ„ 범주를 골ë¼ì„œ ê·¸ ì•„ëž˜ì— ìžˆëŠ” 범주만 ë³´ì´ë„ë¡ í•  수 있습니다.'); @define('CATEGORIES_HIDE_PARALLEL', '범주 íŠ¸ë¦¬ì— ì†í•˜ì§€ 않는 범주 숨기기'); -@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 íŠ¸ë¦¬ì— ì†í•´ 있는 범주를 ë³´ì´ì§€ 않게 하려면 ì´ê²ƒì„ 사용하십시오. "ë²”ì£¼ì˜ ì†ì„±/템플릿" 플러그ì¸ì„ ì ìš©í•œ 멀티-블로그와 함께 사용할 때 가장 ì˜ë¯¸ê°€ 있습니다.'); +@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 íŠ¸ë¦¬ì— ì†í•´ 있는 범주를 ë³´ì´ì§€ 않게 하려면 ì´ê²ƒì„ 사용하십시오. "ë²”ì£¼ì˜ ì†ì„±/템플릿" 플러그ì¸ì„ ì ìš©í•œ 멀티블로그와 함께 사용할 때 가장 ì˜ë¯¸ê°€ 있습니다.'); @define('PERMISSION_ADMINIMAGESVIEWOTHERS', 'adminImagesViewOthers: 다른 사용ìžì˜ 미디어 íŒŒì¼ ë³´ê¸°'); @define('CHARSET_NATIVE', '지역 ì „ìš©'); @@ -794,323 +796,330 @@ @define('PERM_DENIED', 'ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'); @define('INSTALL_ACL', 'ë²”ì£¼ì— ëŒ€í•œ ì½ê¸° 권한 ì ìš©'); -@define('INSTALL_ACL_DESC', '사용할 경우, 로그ì¸í•œ 사용ìžê°€ ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ë¥¼ ì½ì„ 때 ê° ë²”ì£¼ì— ëŒ€í•´ 지정한 ì‚¬ìš©ìž ê¶Œí•œ ì„¤ì •ì´ ì ìš©ë©ë‹ˆë‹¤. 사용하지 ì•Šì„ ê²½ìš° ë²”ì£¼ì— ëŒ€í•œ ì½ê¸° ê¶Œí•œì´ ì ìš©ë˜ì§€ 않게 ë˜ì§€ë§Œ 블로그 ì†ë„ê°€ 약간 빨ë¼ì§€ëŠ” 장ì ì´ 있습니다. 그러므로 ë¸”ë¡œê·¸ì— ëŒ€í•œ 다중 ì‚¬ìš©ìž ì½ê¸° ê¶Œí•œì´ í•„ìš” 없다면 ì´ ì„¤ì •ì„ ë„십시오.'); +@define('INSTALL_ACL_DESC', '사용할 경우 로그ì¸í•œ 사용ìžê°€ ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ë¥¼ ì½ì„ 때 ê° ë²”ì£¼ì— ëŒ€í•´ 지정한 ì‚¬ìš©ìž ê¶Œí•œ ì„¤ì •ì´ ì ìš©ë©ë‹ˆë‹¤. 사용하지 ì•Šì„ ê²½ìš° ë²”ì£¼ì— ëŒ€í•œ ì½ê¸° ê¶Œí•œì´ ì ìš©ë˜ì§€ 않게 ë˜ì§€ë§Œ 블로그 ì†ë„ê°€ 약간 빨ë¼ì§€ëŠ” 장ì ì´ 있습니다. 그러므로 ë¸”ë¡œê·¸ì— ëŒ€í•œ 다중 ì‚¬ìš©ìž ì½ê¸° ê¶Œí•œì´ í•„ìš” 없다면 ì´ ì„¤ì •ì„ ë„십시오.'); @define('PLUGIN_API_VALIDATE_ERROR', '옵션 "%s"ì— ëŒ€í•œ 설정 êµ¬ë¬¸ì´ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤. "%s" ì¢…ë¥˜ì— í•´ë‹¹í•˜ëŠ” ë‚´ìš©ì´ í•„ìš”í•©ë‹ˆë‹¤.'); @define('USERCONF_CHECK_PASSWORD', 'ì´ì „ 암호'); @define('USERCONF_CHECK_PASSWORD_DESC', 'ìœ„ì˜ ì ížŒ 암호를 변경하려면 ì—¬ê¸°ì— í˜„ìž¬ ì‚¬ìš©ì¤‘ì¸ ì•”í˜¸ë¥¼ ì ìœ¼ì‹­ì‹œì˜¤.'); @define('USERCONF_CHECK_PASSWORD_ERROR', 'ì´ì „ 암호가 올바르지 않으므로 새 암호로 변경할 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤. ì„¤ì •ì´ ì €ìž¥ë˜ì§€ 않았습니다.'); -@define('ERROR_XSRF', '브ë¼ìš°ì €ê°€ 유효한 HTTP ì§„ìž…ìž(referrer) 문ìžì—´ì„ ë³´ë‚´ì§€ 않았습니다. 브ë¼ìš°ì €/프ë¡ì‹œ ì„¤ì •ì´ ìž˜ëª»ë˜ì—ˆê±°ë‚˜ ë‹¹ì‹ ì„ ê²¨ëƒ¥í•œ ìƒí˜¸ 사ì´íЏ 요청 위조(XSRF) 때문ì´ì—ˆì„ 수 있습니다. 요청한 ì‚¬í•­ì„ ì²˜ë¦¬í•  수 없었습니다.'); +@define('ERROR_XSRF', '브ë¼ìš°ì €ê°€ 유효한 HTTP ì§„ìž… 경로(referrer) 문ìžì—´ì„ ë³´ë‚´ì§€ 않았습니다. 브ë¼ìš°ì €/프ë¡ì‹œ ì„¤ì •ì´ ìž˜ëª»ë˜ì—ˆê±°ë‚˜ ë‹¹ì‹ ì„ ê²¨ëƒ¥í•œ ìƒí˜¸ 사ì´íЏ 요청 위조(XSRF) 때문ì´ì—ˆì„ 수 있습니다. 요청한 ì‚¬í•­ì„ ì²˜ë¦¬í•  수 없었습니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', '특정 사용ìžì˜ RSS 피드를 보기 위한 ìƒëŒ€ì ì¸ ì¸í„°ë„· 주소 구조를 %id%, %realname%, %username%, %email% ë“±ì˜ ë³€ìˆ˜ì™€ ì¼ë°˜ 글ìžë¥¼ 활용해서 ì •ì˜í•  수 있습니다. ì „ì²´ 주소는 사ì´íŠ¸ì˜ ê¸°ë³¸ 주소를 기초로 해서 시작합니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR', '작성ìžì— 따른 RSS 피드 ê³ ì • ë§í¬ 주소 구조'); -@define('INSTALL_PERMALINK_AUTHORSPATH', '작성ìžë¡œì˜ 경로'); +@define('INSTALL_PERMALINK_AUTHORSPATH', '작성ìžë¡œ 가는 경로'); @define('AUTHORS', '작성ìž'); @define('AUTHORS_ALLOW_SELECT', '방문ìžê°€ 한 ë²ˆì— ì—¬ëŸ¬ 작성ìžì˜ ê¸€ì„ ë³¼ 수 있게 합니까?'); -@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우, ì´ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ 표시ë˜ëŠ” ê° ìž‘ì„±ìž ì´ë¦„ ì˜†ì— ì²´í¬ë°•스가 표시ë©ë‹ˆë‹¤. ì„ íƒ ì—¬ë¶€ì— ë”°ë¼ ì›í•˜ëŠ” ì¡°ê±´ì˜ ê¸€ì„ ë³¼ 수 있게 ë©ë‹ˆë‹¤.'); +@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우 ì´ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ 표시ë˜ëŠ” ê° ìž‘ì„±ìž ì´ë¦„ ì˜†ì— ì²´í¬ë°•스가 표시ë©ë‹ˆë‹¤. ì„ íƒ ì—¬ë¶€ì— ë”°ë¼ ì›í•˜ëŠ” ì¡°ê±´ì˜ ê¸€ì„ ë³¼ 수 있게 ë©ë‹ˆë‹¤.'); @define('AUTHOR_PLUGIN_DESC', '작성ìžì˜ ëª©ë¡ ë³´ì´ê¸°'); @define('CATEGORY_PLUGIN_TEMPLATE', '스마티 템플릿 사용'); @define('CATEGORY_PLUGIN_TEMPLATE_DESC', '사용할 경우, ì´ í”ŒëŸ¬ê·¸ì¸ì€ 스마티 템플릿 ê¸°ëŠ¥ì„ í™œìš©í•˜ì—¬ 범주 목ë¡ì„ 출력하게 ë©ë‹ˆë‹¤. êµ¬ì„±ì€ "plugin_categories.tpl" 템플릿 파ì¼ì„ 편집하여 ê³ ì¹  수 있습니다. 성능 저하를 가져오게 ë˜ë¯€ë¡œ 특화시키지 ì•Šì„ ê²½ìš° 꺼ë‘십시오.'); -@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 당 ê¸€ì˜ ìˆ˜ ë³´ì´ê¸°'); +@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 별 ê¸€ì˜ ìˆ˜ ë³´ì´ê¸°'); @define('AUTHORS_SHOW_ARTICLE_COUNT', 'ìž‘ì„±ìž ì´ë¦„ ì˜†ì— ê¸€ì˜ ìˆ˜ ë³´ì´ê¸°'); @define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '사용할 경우, ê° ìž‘ì„±ìžì˜ ì´ë¦„ 옆 괄호 ì†ì— 해당 작성ìžê°€ ì“´ ê¸€ì˜ ìˆ˜ë¥¼ 표시합니다.'); -@define('CUSTOM_ADMIN_INTERFACE', 'Custom admin interface available'); +@define('CUSTOM_ADMIN_INTERFACE', '사용ìží™”ëœ ê´€ë¦¬ 화면 ì¸í„°íŽ˜ì´ìŠ¤ë¥¼ 사용할 수 있ìŒ'); -@define('COMMENT_NOT_ADDED', 'ë§ê¸€ 금지가 ë˜ì–´ 있어 ë§ê¸€ì„ 추가하지 못했습니다. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.' -@define('INSTALL_TRACKREF', 'Enable referrer tracking?'); -@define('INSTALL_TRACKREF_DESC', 'Enabling the referrer tracking will show you which sites refer to your articles. Today this is often abused for spamming, so you can disable it if you want.'); -@define('CATEGORIES_HIDE_PARENT', 'Hide the selected parent category?'); -@define('CATEGORIES_HIDE_PARENT_DESC', 'If you restrict the listing of categories to a specific category, by default you will see that parent category within the output listing. If you disable this option, the parent category name will not be displayed.'); -@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.'); -@define('INSTALL_RSSFETCHLIMIT', 'Entries to display in Feeds'); -@define('INSTALL_RSSFETCHLIMIT_DESC', 'Number of entries to display for each page on the RSS Feed.'); -@define('INSTAL_DB_UTF8', 'Enable DB-charset conversion'); -@define('INSTAL_DB_UTF8_DESC', 'Issues a MySQL "SET NAMES" query to indicate the required charset for the database. Turn this on or off, if you see weird characters in your blog.'); -@define('ONTHEFLYSYNCH', 'Enable on-the-fly media synchronization'); -@define('ONTHEFLYSYNCH_DESC', 'If enabled, Serendipity will compare the media database with the files stored on your server and synchronize the database and directory contents.'); -@define('USERCONF_CHECK_USERNAME_ERROR', 'The username cannot be left blank.'); -@define('FURTHER_LINKS', 'Further Links'); -@define('FURTHER_LINKS_S9Y', 'Serendipity Homepage'); -@define('FURTHER_LINKS_S9Y_DOCS', 'Serendipity Documentation'); -@define('FURTHER_LINKS_S9Y_BLOG', 'Official Blog'); -@define('FURTHER_LINKS_S9Y_FORUMS', 'Forums'); -@define('FURTHER_LINKS_S9Y_SPARTACUS', 'Spartacus'); -@define('COMMENT_IS_DELETED', '(Comment removed)'); +@define('COMMENT_NOT_ADDED', 'ì´ ê¸€ì— ë§ê¸€ 금지가 ë˜ì–´ 있거나, 유효하지 ì•Šì€ ë°ì´í„°ë¥¼ 입력했거나, 스팸방지 ê¸°ëŠ¥ì— ì˜í•´ 차단ë˜ì–´ ë§ê¸€ì„ 추가하지 못했습니다. '); +@define('INSTALL_TRACKREF', 'ì§„ìž… 경로 ì¶”ì ì„ 사용하기'); +@define('INSTALL_TRACKREF_DESC', 'ì§„ìž… 경로 ì¶”ì ì„ 사용하면 ì–´ë–¤ 사ì´íŠ¸ê°€ ë‹¹ì‹ ì˜ ê¸€ì„ ì°¸ì¡°í•˜ê³  있는지 ë³¼ 수 있습니다. 오늘날 ì´ ê¸°ëŠ¥ì€ ìŠ¤íŒ¸ì— ì•…ìš©ë˜ëŠ” 경우가 많으므로 ì›í•  경우 ëŒ ìˆ˜ 있습니다.'); +@define('CATEGORIES_HIDE_PARENT', 'ì„ íƒí•œ ìƒìœ„ 범주를 숨기기'); +@define('CATEGORIES_HIDE_PARENT_DESC', '범주 ëª©ë¡ ë‚˜ì—´ì„ íŠ¹ì • 범주로 국한시킬 경우 기본ì ìœ¼ë¡œ ìƒìœ„ 범주가 목ë¡ì— 나타납니다. ì´ ê¸°ëŠ¥ì„ ë„ë©´ ìƒìœ„ 범주 ì´ë¦„ì´ ë‚˜íƒ€ë‚˜ì§€ 않습니다.'); +@define('WARNING_NO_GROUPS_SELECTED', '경고: 아무런 그룹 소ì†ë„ ì„ íƒí•˜ì§€ 않았습니다. ì´ ê²½ìš° ì‚¬ìš©ìž ê·¸ë£¹ 관리ì—서 ê°•ì œ 퇴장하는 것과 같으므로 그룹 소ì†ì„ 변경하지 않았습니다.'); +@define('INSTALL_RSSFETCHLIMIT', 'í”¼ë“œì— ë³´ì—¬ì¤„ 글 수'); +@define('INSTALL_RSSFETCHLIMIT_DESC', 'ê° RSS 피드 페ì´ì§€ì— 보여줄 ê¸€ì˜ ìˆ˜ìž…ë‹ˆë‹¤.'); +@define('INSTAL_DB_UTF8', 'ë°ì´í„°ë² ì´ìФ-문ìžì—´ 변환 사용하기'); +@define('INSTAL_DB_UTF8_DESC', 'ë°ì´í„°ë² ì´ìŠ¤ì— í•„ìš”í•œ 문ìžì—´ 종류를 지정하기 위해 MySQL "SET NAMES" 질ì˜ë¥¼ 실행합니다. ë¸”ë¡œê·¸ì— ì´ìƒí•œ 글ìžê°€ ë³´ì¼ ê²½ìš° ì´ë¥¼ 켜거나 꺼보십시오.'); +@define('ONTHEFLYSYNCH', '즉ê°ì ì¸ 미디어 ë™ê¸°í™” 사용하기'); +@define('ONTHEFLYSYNCH_DESC', '사용할 경우 세렌디피티가 미디어 ë°ì´í„°ë² ì´ìŠ¤ì™€ 서버 저장 파ì¼ë“¤ì„ 비êµí•˜ì—¬ ë°ì´í„°ë² ì´ìФ ë° ë””ë ‰í† ë¦¬ ë‚´ìš©ì„ ë™ê¸°í™”합니다.'); +@define('USERCONF_CHECK_USERNAME_ERROR', 'ì‚¬ìš©ìž ì´ë¦„ì€ ë¹„ì›Œë‘˜ 수 없습니다.'); +@define('FURTHER_LINKS', '추가 ë§í¬'); +@define('FURTHER_LINKS_S9Y', '세렌디피티 홈페ì´ì§€'); +@define('FURTHER_LINKS_S9Y_DOCS', '세렌디피티 사용설명서'); +@define('FURTHER_LINKS_S9Y_BLOG', 'ê³µì‹ ë¸”ë¡œê·¸'); +@define('FURTHER_LINKS_S9Y_FORUMS', '게시íŒ'); +@define('FURTHER_LINKS_S9Y_SPARTACUS', '스파르타쿠스'); +@define('COMMENT_IS_DELETED', '(ë§ê¸€ ì‚­ì œë¨)'); -@define('CURRENT_AUTHOR', 'Current author'); +@define('CURRENT_AUTHOR', '현재 작성ìž'); -@define('WORD_NEW', 'New'); -@define('SHOW_MEDIA_TOOLBAR', 'Show toolbar within media selector popup?'); -@define('MEDIA_KEYWORDS', 'Media keywords'); -@define('MEDIA_KEYWORDS_DESC', 'Enter a list of ";" separated words that you want to use as pre-defined keywords for media items.'); -@define('MEDIA_EXIF', 'Import EXIF/JPEG image data'); -@define('MEDIA_EXIF_DESC', 'If enabled, existing EXIF/JPEG metadata of images will be parsed and stored in the database for display in the media gallery.'); -@define('MEDIA_PROP', 'Media properties'); +@define('WORD_NEW', 'ì‹ ê·œ'); +@define('SHOW_MEDIA_TOOLBAR', '미디어 ì„ íƒ íŒì—… ì•ˆì— íˆ´ë°” 보여주기'); +@define('MEDIA_KEYWORDS', '미디어 키워드'); +@define('MEDIA_KEYWORDS_DESC', '미디어 ì•„ì´í…œì˜ 키워드로 사용하기 위해 미리 ì •ì˜í•´ë‘˜ ë‹¨ì–´ë“¤ì„ ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_EXIF', 'EXIF/JPEG 그림 ë°ì´í„°ë¥¼ 불러오기'); +@define('MEDIA_EXIF_DESC', '사용할 경우 ê·¸ë¦¼ì— í¬í•¨ë˜ì–´ 있는 EXIF/JPEG 메타ë°ì´í„°ë¥¼ 불러들여 ë°ì´í„°ë² ì´ìŠ¤ì— ì €ìž¥í•˜ê²Œ ë˜ë©° 차후 미디어 갤러리ì—서 ë³¼ 수 있게 ë©ë‹ˆë‹¤.'); +@define('MEDIA_PROP', '미디어 등ë¡ì •ë³´'); -@define('GO_ADD_PROPERTIES', 'Go & enter properties'); -@define('MEDIA_PROPERTY_DPI', 'DPI'); -@define('MEDIA_PROPERTY_COPYRIGHT', 'Copyright'); -@define('MEDIA_PROPERTY_COMMENT1', 'Short Comment'); -@define('MEDIA_PROPERTY_COMMENT2', 'Long Comment'); -@define('MEDIA_PROPERTY_TITLE', 'Title'); -@define('MEDIA_PROP_DESC', 'Enter a list of ";" separated property fields you want to define for each media file'); -@define('MEDIA_PROP_MULTIDESC', '(You can append ":MULTI" after any item to indicate that this item will contain long text instead of just some characters)'); +@define('GO_ADD_PROPERTIES', '등ë¡ì •ë³´ 입력하러 가기'); +@define('MEDIA_PROPERTY_DPI', 'ë°€ë„(DPI)'); +@define('MEDIA_PROPERTY_COPYRIGHT', '저작권'); +@define('MEDIA_PROPERTY_COMMENT1', 'ì§§ì€ ì„¤ëª…'); +@define('MEDIA_PROPERTY_COMMENT2', '긴 설명'); +@define('MEDIA_PROPERTY_TITLE', '제목'); +@define('MEDIA_PROP_DESC', 'ê° ë¯¸ë””ì–´ 파ì¼ì— ì •ì˜í•˜ê³ ìž 하는 등ë¡ì •ë³´ 필드를 ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_PROP_MULTIDESC', '(특정 ì•„ì´í…œì´ ê¸€ìž ëª‡ ìžê°€ ì•„ë‹ˆë¼ ê¸´ ê¸€ì´ í¬í•¨ë˜ì–´ 있다는 ê²ƒì„ í‘œì‹œí•˜ê³ ìž í•  경우 해당 ì•„ì´í…œ ë’¤ì— ":MULTI"를 ë¶™ì¼ ìˆ˜ 있습니다)'); -@define('STYLE_OPTIONS_NONE', 'This theme/style has no specific options. To see how your template can specify options, read the Technical Documentation on www.s9y.org about "Configuration of Theme options".'); -@define('STYLE_OPTIONS', 'Theme/Style options'); +@define('STYLE_OPTIONS_NONE', 'ì´ í…œí”Œë¦¿ì´ë‚˜ 스타ì¼ì€ 별ë„ì˜ ì„ íƒì‚¬í•­ì´ 없습니다. í…œí”Œë¦¿ì— ì„ íƒì‚¬í•­ì„ 추가할 수 있는 ë°©ë²•ì€ www.s9y.orgì— ìžˆëŠ” 기술문서(Technical Documentation) 중 "Configuration of Theme options" í•­ëª©ì„ ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤.'); +@define('STYLE_OPTIONS', '템플릿/ìŠ¤íƒ€ì¼ ì„ íƒì‚¬í•­'); -@define('PLUGIN_AVAILABLE_COUNT', 'Total: %d plugins.'); +@define('PLUGIN_AVAILABLE_COUNT', 'ì´ í”ŒëŸ¬ê·¸ì¸ ìˆ˜: %dê°œ.'); -@define('SYNDICATION_RFC2616', 'Activate strict RFC2616 RSS-Feed compliance'); -@define('SYNDICATION_RFC2616_DESC', 'NOT Enforcing RFC2616 means that all Conditional GETs to Serendipity will return entries last modified since the time of the last request. With that setting to "false", your visitors will get all articles since their last request, which is considered a good thing. However, some Agents like Planet act weird, if that happens, at it also violates RFC2616. So if you set this option to "TRUE" you will comply with that RFC, but readers of your RSS feed might miss items in their holidays. So either way, either it hearts Aggregators like Planet, or it hurts actual readers of your blog. If you are facing complaints from either side, you can toggle this option. Reference: SourceForge'); -@define('MEDIA_PROPERTY_DATE', 'Associated Date'); -@define('MEDIA_PROPERTY_RUN_LENGTH', 'Run-Length'); -@define('FILENAME_REASSIGNED', 'Automagically assigned new file name: %s'); -@define('MEDIA_UPLOAD_SIZE', 'Max. file upload size'); -@define('MEDIA_UPLOAD_SIZE_DESC', 'Enter the maximum filesize for uploaded files in bytes. This setting can be overruled by server-side settings in PHP.ini: upload_max_filesize, post_max_size, max_input_time all take precedence over this option. An empty string means to only use the server-side limits.'); -@define('MEDIA_UPLOAD_SIZEERROR', 'Error: You cannot upload files larger than %s bytes!'); -@define('MEDIA_UPLOAD_MAXWIDTH', 'Max. width of image files for upload'); -@define('MEDIA_UPLOAD_MAXWIDTH_DESC', 'Enter the maximum image width in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_MAXHEIGHT', 'Max. height of image files for upload'); -@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', 'Enter the maximum image height in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_DIMERROR', 'Error: You cannot upload image files larger than %s x %s pixels!'); +@define('SYNDICATION_RFC2616', '엄격한 RFC2616 RSS 피드 준수 사용하기'); +@define('SYNDICATION_RFC2616_DESC', 'RFC2616ì„ ê°•ì œí•˜ì§€ ì•Šì„ ê²½ìš° ì¡°ê±´ë¶€ GET ìš”ì²­ì„ ì„¸ë Œë””í”¼í‹°ê°€ 받으면 마지막 요청 ì´í›„ì— ìˆ˜ì •ëœ ê¸€ì„ ë³´ë‚´ê²Œ ë©ë‹ˆë‹¤. 그러므로 ì´ ì„¤ì •ì„ ë„ë©´ 방문ìžë“¤ì€ 마지막 요청 ì´í›„ ìž‘ì„±ëœ ëª¨ë“  ê¸€ì„ ë°›ê²Œ ë˜ì–´ 대부분 좋게 받아들입니다. 하지만 Planetê³¼ ê°™ì€ ì¼ë¶€ ì—ì´ì „íŠ¸ì˜ ê²½ìš° ì´ë ‡ê²Œ ë˜ë©´ RFC2616ì„ ìœ„ë°˜í•˜ê¸° ë•Œë¬¸ì— ì´ìƒí•˜ê²Œ ìž‘ë™í•©ë‹ˆë‹¤. ì´ ì„¤ì •ì„ ì¼œë©´ RFC 준수를 하게 ë˜ì§€ë§Œ RSS 피드 구ë…ìžë“¤ì´ 휴가를 ê°„ ë™ì•ˆ 놓치는 ê¸€ì´ ìƒê¸¸ 수 있습니다. ê²°êµ­ Planetê³¼ ê°™ì€ ê³³ì´ë‚˜ 블로그를 ì§ì ‘ 구ë…하는 사람들 중 한 ìª½ì€ ë¬¸ì œê°€ ë°œìƒí•  것입니다. ì–´ëŠ í•œ 쪽ì—서 ë¶ˆë§Œì´ ìžˆì„ ê²½ìš° ì´ ì„¤ì •ì„ ë³€ê²½í•´ 보기 ë°”ëžë‹ˆë‹¤. 참조할 ë‚´ìš©: 소스í¬ì§€'); +@define('MEDIA_PROPERTY_DATE', '관계ëœ(작성ëœ) ë‚ ì§œ'); +@define('MEDIA_PROPERTY_RUN_LENGTH', '실행 길ì´'); +@define('FILENAME_REASSIGNED', 'ìžë™ìœ¼ë¡œ 새로운 íŒŒì¼ ì´ë¦„ì„ ë¶™ì˜€ìŠµë‹ˆë‹¤: %s'); +@define('MEDIA_UPLOAD_SIZE', '올리는 파ì¼ì˜ 최대 í¬ê¸°'); +@define('MEDIA_UPLOAD_SIZE_DESC', '올리는 파ì¼ì˜ 최대 í¬ê¸°ë¥¼ ë°”ì´íЏ 단위로 입력합니다. ì´ ì„¤ì •ë³´ë‹¤ 서버 ì¸¡ì— ìžˆëŠ” php.ini ë‚´ë¶€ ì„¤ì •ì´ ìš°ì„ ë©ë‹ˆë‹¤: upload_max_filesize, post_max_size, max_input_time ë“±ì´ ëª¨ë‘ ì´ ì„¤ì •ë³´ë‹¤ ìš°ì„  ì ìš©ë©ë‹ˆë‹¤. 비워둘 경우 서버 측 설정만 따르게 ë©ë‹ˆë‹¤.'); +@define('MEDIA_UPLOAD_SIZEERROR', '오류: %së°”ì´íŠ¸ë³´ë‹¤ í° íŒŒì¼ì„ 올릴 수 없습니다!'); +@define('MEDIA_UPLOAD_MAXWIDTH', '올릴 그림 파ì¼ì˜ 최대 í­'); +@define('MEDIA_UPLOAD_MAXWIDTH_DESC', '올릴 그림 파ì¼ì˜ 최대 í­ì„ 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_MAXHEIGHT', '올릴 그림 파ì¼ì˜ 최대 높ì´'); +@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', '올릴 그림 파ì¼ì˜ 최대 높ì´ë¥¼ 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_DIMERROR', '오류: %s x %s 픽셀보다 í° ê·¸ë¦¼ 파ì¼ì„ 올릴 수 없습니다!'); -@define('MEDIA_TARGET', 'Target for this link'); -@define('MEDIA_TARGET_JS', 'Popup window (via JavaScript, adaptive size)'); -@define('MEDIA_ENTRY', 'Isolated Entry'); -@define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)'); +@define('MEDIA_TARGET', 'ì´ ë§í¬ì˜ 표시 대ìƒ'); +@define('MEDIA_TARGET_JS', 'íŒì—… ì°½ (ìžë°”스í¬ë¦½íЏ 사용, 가변 í¬ê¸°)'); +@define('MEDIA_ENTRY', 'ë…ë¦½ëœ ê¸€'); +@define('MEDIA_TARGET_BLANK', 'íŒì—… ì°½ (target=_blank 사용)'); -@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?'); -@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.'); +@define('MEDIA_DYN_RESIZE', 'ë™ì  그림 í¬ê¸° ë³€í™˜ì„ ì‚¬ìš©í•˜ê¸°'); +@define('MEDIA_DYN_RESIZE_DESC', '사용할 경우 미디어 ì„ íƒ í™”ë©´ì´ GET 변수를 통해 요청한 í¬ê¸°ì— ë§žë„ë¡ ê·¸ë¦¼ì„ ë¶ˆëŸ¬ì˜¬ 수 있습니다. ìƒì„±ëœ 파ì¼ì€ ìºì‹œì— 저장ë˜ë¯€ë¡œ ìžì£¼ 사용할 경우 ìš©ëŸ‰ì„ ë§Žì´ ì°¨ì§€í•  수 있습니다.'); -@define('MEDIA_DIRECTORY_MOVED', 'Directory and files were successfully moved to %s'); -@define('MEDIA_DIRECTORY_MOVE_ERROR', 'Directory and files could not be moved to %s!'); -@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'On Non-MySQL databases, iterating through every article to replace the old directory URLs with new directory URLs is not possible. You will need to manually edit your entries to fix new URLs. You can still move your old directory back to where it was, if that is too cumbersome for you.'); -@define('MEDIA_DIRECTORY_MOVE_ENTRIES', 'Moved the URL of the moved directory in %s entries.'); -@define('PLUGIN_ACTIVE', 'Active'); -@define('PLUGIN_INACTIVE', 'Inactive'); -@define('PREFERENCE_USE_JS', 'Enable advanced JS usage?'); -@define('PREFERENCE_USE_JS_DESC', 'If enabled, advanced JavaScript sections will be enabled for better usability, like in the Plugin Configuration section you can use drag and drop for re-ordering plugins.'); +@define('MEDIA_DIRECTORY_MOVED', '디렉토리와 파ì¼ì´ %s(으)로 ì´ë™í•˜ëŠ”ë° ì„±ê³µí–ˆìŠµë‹ˆë‹¤'); +@define('MEDIA_DIRECTORY_MOVE_ERROR', '디렉토리와 파ì¼ì„ %s(으)로 ì´ë™í•  수 없었습니다!'); +@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'MySQLì´ ì•„ë‹Œ ë°ì´í„°ë² ì´ìФì—서는 ì´ì „ 디렉토리 주소를 새 디렉토리 주소로 바꾸기 위해 모든 ê¸€ì„ í•˜ë‚˜ì”© 살펴가는 ìž‘ì—…ì„ í•  수 없습니다. 수작업으로 ê° ê¸€ì— ëŒ€í•´ 주소 êµì²´ ìž‘ì—…ì„ í•´ì•¼ 합니다. ì´ê²ƒì´ 너무 번거로울 경우 디렉토리를 ì›ëž˜ 위치로 다시 ë˜ëŒë¦´ 수 있습니다.'); +@define('MEDIA_DIRECTORY_MOVE_ENTRIES', '%sê°œì˜ ê¸€ì—서 ì´ë™í•œ 디렉토리로 주소를 변경했습니다.'); +@define('PLUGIN_ACTIVE', '사용 중'); +@define('PLUGIN_INACTIVE', '미사용'); +@define('PREFERENCE_USE_JS', '고급 ìžë°”스í¬ë¦½íЏ 기능 사용'); +@define('PREFERENCE_USE_JS_DESC', '사용할 경우 고급 ìžë°”스í¬ë¦½íЏ 기능 ë¶€ë¶„ì„ í™œìš©í•˜ê²Œ ë˜ì–´ ì‚¬ìš©ì„±ì´ í–¥ìƒë©ë‹ˆë‹¤. 대표ì ìœ¼ë¡œ í”ŒëŸ¬ê·¸ì¸ ì„¤ì •ì—서 플러그ì¸ì„ ëŒì–´ì„œ ì´ë™í•˜ì—¬ 순서를 바꿀 수 있게 ë©ë‹ˆë‹¤.'); -@define('PREFERENCE_USE_JS_WARNING', '(This page uses advanced JavaScripting. If you are having functionality issues, please disable the use of advanced JS usage in your personal preferences or disable your browser\'s JavaScript)'); +@define('PREFERENCE_USE_JS_WARNING', '(ì´ íŽ˜ì´ì§€ëŠ” 고급 ìžë°”스í¬ë¦½íЏ ê¸°ëŠ¥ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. 기능 ì‚¬ìš©ì— ë¬¸ì œê°€ ìžˆì„ ê²½ìš° ê°œì¸ ì„¤ì •ì—서 고급 ìžë°”스í¬ë¦½íЏ ê¸°ëŠ¥ì„ ë„거나 브ë¼ìš°ì €ì˜ ìžë°”스í¬ë¦½íЏ ê¸°ëŠ¥ì„ ë„ë„ë¡ í•©ë‹ˆë‹¤)'); -@define('INSTALL_PERMALINK_COMMENTSPATH', 'Path to comments'); -@define('PERM_SET_CHILD', 'Set the same permissions on all child directories'); -@define('PERMISSION_FORBIDDEN_PLUGINS', 'Forbidden plugins'); -@define('PERMISSION_FORBIDDEN_HOOKS', 'Forbidden events'); -@define('PERMISSION_FORBIDDEN_ENABLE', 'Enable Plugin ACL for usergroups?'); -@define('PERMISSION_FORBIDDEN_ENABLE_DESC', 'If the option "Plugin ACL for usergroups" is enabled in the configuration, you can specify which usergroups are allowed to execute certain plugins/events.'); -@define('DELETE_SELECTED_ENTRIES', 'Delete selected entries'); -@define('PLUGIN_AUTHORS_MINCOUNT', 'Show only authors with at least X articles'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET', 'Bookmarklet'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', 'Bookmark this link and then use it on any page you want to blog about to quickly access your Serendipity Blog.'); -@define('IMPORT_WP_PAGES', 'Also fetch attachments and staticpages as normal blog entries?'); -@define('USERCONF_CREATE', 'Disable user / forbid activity?'); -@define('USERCONF_CREATE_DESC', 'If selected, the user will not have any editing or creation possibilities on the blog anymore. When logging in to the backend, he cannot do anything else apart from logging out and viewing his personal configuration.'); -@define('CATEGORY_HIDE_SUB', 'Hide postings made to sub-categories?'); -@define('CATEGORY_HIDE_SUB_DESC', 'By default, when you browse a category also entries of any subcategory are displayed. If this option is turned on, only postings of the currently selected category are displayed.'); -@define('PINGBACK_SENDING', 'Sending pingback to URI %s...'); -@define('PINGBACK_SENT', 'Pingback successful'); -@define('PINGBACK_FAILED', 'Pingback failed: %s'); -@define('PINGBACK_NOT_FOUND', 'No pingback-URI found.'); -@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', 'Hide archives link when no entries were made in that timespan (requires counting entries)'); -@define('RSS_IMPORT_WPXRSS', 'WordPress eXtended RSS import, requires PHP5 and might take up much memory'); -@define('SET_TO_MODERATED', 'Moderate'); -@define('COMMENT_MODERATED', 'Comment #%s has successfully been set as moderated'); -@define('CENTER', 'center'); -@define('FULL_COMMENT_TEXT', 'Yes, with full comment text'); +@define('INSTALL_PERMALINK_COMMENTSPATH', 'ë§ê¸€ë¡œ 가는 경로'); +@define('PERM_SET_CHILD', '하위 ë””ë ‰í† ë¦¬ì— ëª¨ë‘ ë™ì¼í•œ 권한 ì„¤ì •ì„ í•©ë‹ˆë‹¤'); +@define('PERMISSION_FORBIDDEN_PLUGINS', '사용 ê¸ˆì§€ëœ í”ŒëŸ¬ê·¸ì¸'); +@define('PERMISSION_FORBIDDEN_HOOKS', '사용 ê¸ˆì§€ëœ ì´ë²¤íЏ'); +@define('PERMISSION_FORBIDDEN_ENABLE', 'ì‚¬ìš©ìž ê·¸ë£¹ì— ëŒ€í•œ í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 권한 ì„¤ì •ì„ ì‚¬ìš©í•˜ê¸°'); +@define('PERMISSION_FORBIDDEN_ENABLE_DESC', '"ì‚¬ìš©ìž ê·¸ë£¹ì— ëŒ€í•œ í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 권한 설정"ì„ ì‚¬ìš©í•  경우 ì–´ë–¤ ì‚¬ìš©ìž ê·¸ë£¹ì´ ì–´ë–¤ 플러그ì¸ì´ë‚˜ ì´ë²¤íŠ¸ë¥¼ 사용할 수 있ì„ì§€ 지정할 수 있게 ë©ë‹ˆë‹¤.'); +@define('DELETE_SELECTED_ENTRIES', 'ì„ íƒí•œ 글 삭제하기'); +@define('PLUGIN_AUTHORS_MINCOUNT', '최소 Xê°œì˜ ê¸€ì„ ì“´ 작성ìžë§Œ 보여주기'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET', 'ì¦ê²¨ì°¾ê¸°'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', 'ì´ ë§í¬ë¥¼ ì¦ê²¨ì°¾ê¸°ì— 추가한 다ìŒ, ì ê³ ìž 하는 페ì´ì§€ì— 사용하면 ì´ ì„¸ë Œë””í”¼í‹° 블로그를 빠르게 찾아올 수 있습니다.'); +@define('IMPORT_WP_PAGES', '첨부 파ì¼ê³¼ ê³ ì • 페ì´ì§€ë„ ì¼ë°˜ 블로그 글처럼 불러옵니까?'); +@define('USERCONF_CREATE', '사용ìžë¥¼ 비활성화하거나 활ë™ì„ 금지하기'); +@define('USERCONF_CREATE_DESC', '사용할 경우 해당 사용ìžê°€ 블로그ì—서 ë” ì´ìƒ ê¸€ì„ íŽ¸ì§‘í•˜ê±°ë‚˜ 새로 쓸 수 없게 ë©ë‹ˆë‹¤. ê´€ë¦¬ìž í™”ë©´ì— ë“¤ì–´ì˜¤ë”ë¼ë„ ê°œì¸ ì„¤ì •ì„ í™•ì¸í•˜ê±°ë‚˜ 다시 빠져나가는 것 ë°–ì— í•  수 없습니다.'); +@define('CATEGORY_HIDE_SUB', '하위 범주ì—서 작성한 글 숨기기'); +@define('CATEGORY_HIDE_SUB_DESC', '기본ì ìœ¼ë¡œëŠ” 특정 ë²”ì£¼ì˜ ê¸€ì„ ì—´ëžŒí•  때 하위 ë²”ì£¼ì— ì†í•œ ê¸€ë„ ê°™ì´ ë‚˜íƒ€ë‚©ë‹ˆë‹¤. ì´ ì„¤ì •ì„ ì‚¬ìš©í•  경우 현재 ì„ íƒëœ ë²”ì£¼ì˜ ê¸€ë§Œ 나타납니다.'); +@define('PINGBACK_SENDING', 'í•‘ë°±ì„ URI %s(으)로 보내는 중...'); +@define('PINGBACK_SENT', 'í•‘ë°± 성공'); +@define('PINGBACK_FAILED', 'í•‘ë°± 실패: %s'); +@define('PINGBACK_NOT_FOUND', 'í•‘ë°± URI를 ì°¾ì„ ìˆ˜ 없었ìŒ.'); +@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', '아무런 ê¸€ì´ ìž‘ì„±ë˜ì§€ ì•Šì€ ì‹œê°„ëŒ€ì˜ ê¸€ ëª©ë¡ ë§í¬ë¥¼ 숨김 (글 수를 집계하는 ê¸°ëŠ¥ì„ ì‚¬ìš©í•´ì•¼ 함)'); +@define('RSS_IMPORT_WPXRSS', 'ì›Œë“œí”„ë ˆìŠ¤ì˜ í™•ìž¥ RSS (WordPress eXtended RSS) 불러오기 - PHP5ê°€ 필요하며 메모리를 ë§Žì´ ì°¨ì§€í•  수 있ìŒ'); +@define('SET_TO_MODERATED', '중재하기'); +@define('COMMENT_MODERATED', '%s번 ë§ê¸€ì„ 성공ì ìœ¼ë¡œ 중재하기로 설정함'); +@define('CENTER', '중앙'); +@define('FULL_COMMENT_TEXT', '네, ì „ì²´ ë§ê¸€ì„ í¬í•¨í•©ë‹ˆë‹¤'); -@define('COMMENT_TOKENS', 'Use Tokens for Comment Moderation?'); -@define('COMMENT_TOKENS_DESC', 'If tokens are used, comments can be approved and deleted by clicking the email links without requiring login access to the blog. Note that this is a convenience feature, and if your mails get hijacked, those people can approve/delete the referenced comment without further authentication.'); -@define('COMMENT_NOTOKENMATCH', 'Moderation link has expired or comment #%s has already been approved or deleted'); -@define('TRACKBACK_NOTOKENMATCH', 'Moderation link has expired or trackback #%s has already been approved or deleted'); -@define('BADTOKEN', 'Invalid Moderation Link'); +@define('COMMENT_TOKENS', 'ë§ê¸€ ì¤‘ìž¬ì— í† í° ì‚¬ìš©'); +@define('COMMENT_TOKENS_DESC', '토í°ì„ 사용할 경우 ë¸”ë¡œê·¸ì— ë¡œê·¸ì¸í•˜ì§€ ì•Šê³ ë„ ì „ìžìš°íޏ ë§í¬ë¥¼ 통해 ë§ê¸€ì„ 승ì¸í•˜ê±°ë‚˜ 삭제할 수 있습니다. íŽ¸ì˜ ê¸°ëŠ¥ì´ë¼ëŠ” ì ì— 유ì˜í•˜ì‹­ì‹œì˜¤. 만약 ì „ìžìš°íޏ ê³„ì •ì„ ë‹¤ë¥¸ ì‚¬ëžŒì´ íƒˆì·¨í•  경우 ê·¸ ì‚¬ëžŒì´ ë³„ë„ì˜ ì¸ì¦ ì—†ì´ ë§ê¸€ì„ 승ì¸í•˜ê±°ë‚˜ 삭제할 수 있게 ë©ë‹ˆë‹¤.'); +@define('COMMENT_NOTOKENMATCH', '중재 ë§í¬ì˜ ìœ íš¨ê¸°ê°„ì´ ì§€ë‚¬ê±°ë‚˜ %s번 ë§ê¸€ì´ ì´ë¯¸ ìŠ¹ì¸ ë˜ëŠ” ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤'); +@define('TRACKBACK_NOTOKENMATCH', '중재 ë§í¬ì˜ ìœ íš¨ê¸°ê°„ì´ ì§€ë‚¬ê±°ë‚˜ %s번 íŠ¸ëž™ë°±ì´ ì´ë¯¸ ìŠ¹ì¸ ë˜ëŠ” ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤'); +@define('BADTOKEN', '유효하지 ì•Šì€ ì¤‘ìž¬ ë§í¬'); -@define('CONFIRMATION_MAIL_ALWAYS', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n"); -@define('CONFIRMATION_MAIL_ONCE', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled one-time mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n\nAfter you have done that, you can always post comments on that blog with your username and e-mail address without receiving such notifications."); -@define('INSTALL_SUBSCRIBE_OPTIN', 'Use Double-Opt In for comment subscriptions?'); -@define('INSTALL_SUBSCRIBE_OPTIN_DESC', 'If enabled, when a comment is made where the person wants to be notified via e-mail about new comments to the same entry, he must confirm his subscription to the entry. This Double-Opt In is required by german law, for example.'); -@define('CONFIRMATION_MAIL_SUBSCRIPTION', "Hello %s,\n\nYou have requested to be notified for comments to \"%s\" (<%s>). To approve this subscription (\"Double Opt In\") please click this link:\n<%s>\n."); -@define('NOTIFICATION_CONFIRM_SUBMAIL', 'Your confirmation of your comment subscription has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_MAIL', 'Your confirmation of the comment has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', 'Your comment subscription could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must request a new confirmation mail.'); -@define('NOTIFICATION_CONFIRM_MAIL_FAIL', 'Your comment confirmation could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must send your comment again.'); -@define('PLUGIN_DOCUMENTATION', 'Documentation'); -@define('PLUGIN_DOCUMENTATION_LOCAL', 'Local Documentation'); -@define('PLUGIN_DOCUMENTATION_CHANGELOG', 'Version history'); -@define('SYNDICATION_PLUGIN_BIGIMG', 'Big Image'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file.'); -@define('SYNDICATION_PLUGIN_FEEDNAME', 'Displayed name for "feed"'); -@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', 'Enter an optional custom name for the feeds (defaults to "feed" when empty)'); -@define('SYNDICATION_PLUGIN_COMMENTNAME', 'Displayed name for "comment" feed'); -@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', 'Enter an optional custom name for the comment feed'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(If you enter an absolute URL with http://... here, this URL will be used as the redirection target in case you have enabled the "Force" option for FeedBurner. Note that this can also be a URL independent to FeedBurner. For new Google FeedBurner feeds, you need to enter http://feeds2.feedburner.com/yourfeedname here)'); +@define('CONFIRMATION_MAIL_ALWAYS', "안녕하세요, %s님.\n\n새로운 ë§ê¸€ì„ \"%s\"ì— ì¶”ê°€í•˜ì…¨ìŠµë‹ˆë‹¤. ë‚´ìš©ì€ ë‹¤ìŒê³¼ 같습니다:\n\n%s\n\n블로그 주ì¸ì´ ì „ìžìš°íŽ¸ì„ í†µí•œ ì¸ì¦ì„ 사용하고 있으므로 ë‹¤ìŒ ë§í¬ë¥¼ 눌러서 ë§ê¸€ì„ ì¸ì¦í•˜ì‹œê¸° ë°”ëžë‹ˆë‹¤:\n<%s>\n"); +@define('CONFIRMATION_MAIL_ONCE', "안녕하세요 %s님.\n\n새로운 ë§ê¸€ì„ \"%s\"ì— ì¶”ê°€í•˜ì…¨ìŠµë‹ˆë‹¤. ë‚´ìš©ì€ ë‹¤ìŒê³¼ 같습니다:\n\n%s\n\n블로그 주ì¸ì´ 1회성 ì „ìžìš°íޏ ì¸ì¦ì„ 사용하고 있으므로 ë‹¤ìŒ ë§í¬ë¥¼ 눌러서 ë§ê¸€ì„ ì¸ì¦í•˜ì‹œê¸° ë°”ëžë‹ˆë‹¤:\n<%s>\n\nì¸ì¦ì´ ëœ ì´í›„ì—는 ë™ì¼í•œ ì‚¬ìš©ìž ì´ë¦„ê³¼ ì „ìžìš°íޏ 주소로 ë” ì´ìƒ ì¸ì¦ì„ 안 거치고 ë§ê¸€ì„ 달 수 있게 ë©ë‹ˆë‹¤."); +@define('INSTALL_SUBSCRIBE_OPTIN', 'ë§ê¸€ 구ë…ì„ ìœ„í•´ 2중 ì‚¬ìš©ìž ë™ì˜ 사용'); +@define('INSTALL_SUBSCRIBE_OPTIN_DESC', '사용할 경우 방문ìžê°€ ë§ê¸€ì„ 남긴 후 해당 ê¸€ì— ìƒˆ ë§ê¸€ì´ 달릴 때 ì „ìžìš°íŽ¸ìœ¼ë¡œ ì•Œë¦¼ì„ ë°›ê¸° ì›í•˜ë©´ ê·¸ ê¸€ì— ëŒ€í•œ êµ¬ë… ì—¬ë¶€ë„ ë™ì˜í•´ì•¼ 합니다. ì´ëŸ¬í•œ 2중 ì‚¬ìš©ìž ë™ì˜ëŠ” ë…ì¼ ë“±ì—서 법ì ìœ¼ë¡œ 요구하고 있습니다.'); +@define('CONFIRMATION_MAIL_SUBSCRIPTION', "안녕하세요, %s님.\n\n\"%s\" (<%s>)ì— ëŒ€í•œ ë§ê¸€ì´ 달릴 경우 알려달ë¼ëŠ” ìš”ì²­ì„ í•œ ë°” 있습니다. ì´ êµ¬ë…ì‚¬í•­ì„ ìŠ¹ì¸í•˜ê³ ìž í•  경우 (\"2중 ì‚¬ìš©ìž ë™ì˜\") ë‹¤ìŒ ë§í¬ë¥¼ 누르기 ë°”ëžë‹ˆë‹¤:\n<%s>\n."); +@define('NOTIFICATION_CONFIRM_SUBMAIL', 'ë§ê¸€ 구ë…ì— ëŒ€í•œ 승ì¸ì ˆì°¨ë¥¼ 성공ì ìœ¼ë¡œ 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_MAIL', 'ë§ê¸€ì— 대한 승ì¸ì ˆì°¨ë¥¼ 성공ì ìœ¼ë¡œ 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', 'ë§ê¸€ êµ¬ë… ìŠ¹ì¸ ì—¬ë¶€ë¥¼ 확ì¸í•  수 없었습니다. ìŠ¹ì¸ ì™„ë£Œë¥¼ 위해 누른 ë§í¬ì˜ ìƒíƒœë¥¼ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤. 만약 ë§í¬ê°€ 발송ëœì§€ 3주가 넘었다면 새로운 ìŠ¹ì¸ ë§í¬ë¥¼ ë‹´ì€ ì „ìžìš°íŽ¸ì„ ìš”ì²­í•´ì•¼ 합니다.'); +@define('NOTIFICATION_CONFIRM_MAIL_FAIL', 'ë§ê¸€ì˜ ìŠ¹ì¸ ì—¬ë¶€ë¥¼ 확ì¸í•  수 없었습니다. ìŠ¹ì¸ ì™„ë£Œë¥¼ 위해 누른 ë§í¬ì˜ ìƒíƒœë¥¼ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤. 만약 ë§í¬ê°€ 발송ëœì§€ 3주가 넘었다면 ë§ê¸€ì„ 다시 남겨야 합니다.'); +@define('PLUGIN_DOCUMENTATION', '사용설명서(ê³µì‹ë¬¸ì„œ)'); +@define('PLUGIN_DOCUMENTATION_LOCAL', 'ë‚´ë¶€ì— ì €ìž¥ëœ ì‚¬ìš©ì„¤ëª…ì„œ(ê³µì‹ë¬¸ì„œ)'); +@define('PLUGIN_DOCUMENTATION_CHANGELOG', '버전 ì´ë ¥'); +@define('SYNDICATION_PLUGIN_BIGIMG', '대형 그림'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'ì˜†ì¤„ì— ë‚˜íƒ€ë‚˜ëŠ” 피드 맨 ìœ„ì— (대형) ê·¸ë¦¼ì„ í‘œì‹œí•©ë‹ˆë‹¤. 그림 파ì¼ì— 대한 ì „ì²´ ë˜ëŠ” 절대 경로를 입력합니다.'); +@define('SYNDICATION_PLUGIN_FEEDNAME', 'í”¼ë“œì— í‘œì‹œí•  ì´ë¦„'); +@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', 'í”¼ë“œì— ëŒ€í•œ ì‚¬ìš©ìž ì •ì˜ ì´ë¦„ì„ ìž…ë ¥í•  수 있습니다 (ì„ íƒ ì‚¬í•­ì´ë©°, 비워둘 경우 "feed"로 ìžë™ 표시ë¨)'); +@define('SYNDICATION_PLUGIN_COMMENTNAME', 'ë§ê¸€ í”¼ë“œì— í‘œì‹œí•  ì´ë¦„'); +@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', 'ë§ê¸€ í”¼ë“œì— ëŒ€í•œ ì‚¬ìš©ìž ì •ì˜ ì´ë¦„ì„ ìž…ë ¥í•  수 있습니다 (ì„ íƒ ì‚¬í•­)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(만약 ì—¬ê¸°ì— http://...로 시작하는 절대 경로를 입력했다면 피드버너 설정ì—서 "강제로"를 ì„ íƒí–ˆì„ 때 ì´ ì£¼ì†Œë¥¼ 리다ì´ë ‰íЏ 대ìƒìœ¼ë¡œ 사용하게 ë©ë‹ˆë‹¤. 그리고 ì´ ì£¼ì†ŒëŠ” 피드버너와 ë…립ì ì¼ 수 있다는 ì ë„ 참고하십시오. ì‹ ê·œ 구글 í”¼ë“œë²„ë„ˆì˜ ê²½ìš° http://feeds2.feedburner.com/yourfeedname ì‹ìœ¼ë¡œ 입력해야 합니다.)'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', 'If you set this option to "Force" you can forward the RSS feed to any webservice, not only FeedBurner. Look at the option "Feedburner ID" below to enter an absolute URL)'); -@define('COMMENTS_FILTER_NEED_CONFIRM', 'Pending user confirmation'); -@define('NOT_WRITABLE_SPARTACUS', ' (Only required when you plan to use Spartacus plugin for remote plugin download)'); -@define('MEDIA_ALT', 'ALT-Attribute (depiction or short description)'); -@define('MEDIA_PROPERTY_ALT', 'Depiction (summary for ALT-Attribute)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', 'ì´ ì„¤ì •ì„ "강제로"로 ì„ íƒí–ˆì„ 경우 피드버너 ë¿ë§Œ ì•„ë‹ˆë¼ ë‹¤ë¥¸ 웹 ì„œë¹„ìŠ¤ë¡œë„ RSS 피드를 전달할 수 있습니다. ì•„ëž˜ì˜ "피드버너 ID" ì„¤ì •ì„ ë³´ê³  절대 경로를 입력하십시오.'); +@define('COMMENTS_FILTER_NEED_CONFIRM', 'ì‚¬ìš©ìž ìŠ¹ì¸ ëŒ€ê¸° 중'); +@define('NOT_WRITABLE_SPARTACUS', ' (스파르타쿠스 플러그ì¸ì„ 통해 ì›ê²© 플러그ì¸ì„ ë‚´ë ¤ë°›ì„ ê²½ìš°ì—ë§Œ 필요함)'); +@define('MEDIA_ALT', 'ALT ì†ì„± (묘사 ë˜ëŠ” ì§§ì€ ì„¤ëª…)'); +@define('MEDIA_PROPERTY_ALT', '묘사 (ALT ì†ì„±ì— 대한 요약)'); -@define('MEDIA_TITLE', 'TITLE-Attribute (will be displayed on mouse over)'); +@define('MEDIA_TITLE', 'TITLE ì†ì„± (마우스 커서를 ìœ„ì— ëŒ€ë©´ 표시ë¨)'); -@define('QUICKSEARCH_SORT', 'How should search-results be sorted?'); +@define('QUICKSEARCH_SORT', '검색 결과를 어떻게 정렬하겠습니까?'); -@define('QUICKSEARCH_SORT_RELEVANCE', 'Relevance'); +@define('QUICKSEARCH_SORT_RELEVANCE', '정확ë„'); -@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author'); +@define('PERMISSION_HIDDENGROUP', '숨겨진 그룹 / 비작성ìž'); -@define('SEARCH_FULLENTRY', 'Show full entry'); -@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)'); -@define('NAV_LINK_TEXT', 'Enter the navbar link text'); -@define('NAV_LINK_URL', 'Enter the full URL of your link'); -@define('MODERATE_SELECTED_COMMENTS', 'Accept selected comments'); -@define('WEBLOG', 'Weblog'); -@define('ACTIVE_COMMENT_SUBSCRIPTION', 'Subscribed'); -@define('PENDING_COMMENT_SUBSCRIPTION', 'Pending confirmation'); -@define('NO_COMMENT_SUBSCRIPTION', 'Not subscribed'); -@define('SUMMARY', 'Summary'); +@define('SEARCH_FULLENTRY', '글 전체를 보여주기'); +@define('NAVLINK_AMOUNT', '내비게ì´ì…˜ì— 표시할 ë§í¬ì˜ 수 ìž…ë ¥ (ìŠ¤íƒ€ì¼ ê´€ë¦¬ 페ì´ì§€ë¥¼ 다시 불러들여야 함)'); +@define('NAV_LINK_TEXT', '내비게ì´ì…˜ ë§í¬ì— 표시할 문구 ìž…ë ¥'); +@define('NAV_LINK_URL', 'ë§í¬ì˜ ì „ì²´ 주소(URL) ìž…ë ¥'); +@define('MODERATE_SELECTED_COMMENTS', 'ì„ íƒí•œ ë§ê¸€ 승ì¸'); +@define('WEBLOG', '웹로그'); +@define('ACTIVE_COMMENT_SUBSCRIPTION', '구ë…ë¨'); +@define('PENDING_COMMENT_SUBSCRIPTION', 'êµ¬ë… ëŒ€ê¸° 중'); +@define('NO_COMMENT_SUBSCRIPTION', '구ë…ë˜ì§€ 않ìŒ'); +@define('SUMMARY', '요약'); // Next lines were added on 2012/05/29 -@define('ABOUT_TO_DELETE_FILES', 'You are about to delete a bunch of files at once.
        If you are using these in some of your entries, it will cause dead links or images
        Are you sure you wish to proceed?

        '); -@define('ARCHIVE_SORT_STABLE', 'Stable Archives'); -@define('ARCHIVE_SORT_STABLE_DESC', 'Sort the archive-pages descending, so they are stable and search-crawler do not have to reindex them.'); -@define('PLAIN_ASCII_NAMES', '(no special characters, umlauts)'); +@define('ABOUT_TO_DELETE_FILES', '여러 ê°œì˜ íŒŒì¼ì„ í•œêº¼ë²ˆì— ì§€ìš°ë ¤ê³  하고 있습니다.
        만약 ìž‘ì„±í–ˆë˜ ê¸€ì— ì´ë“¤ 중 ì¼ë¶€ë¥¼ 사용하고 있다면 깨진 ë§í¬ë‚˜ 그림으로 나타날 것입니다.
        ê·¸ëž˜ë„ ê³„ì† ì§„í–‰í•˜ê² ìŠµë‹ˆê¹Œ?

        '); +@define('ARCHIVE_SORT_STABLE', '안정ì ì¸ 글 목ë¡'); +@define('ARCHIVE_SORT_STABLE_DESC', '글 ëª©ë¡ íŽ˜ì´ì§€ë¥¼ 내림차순으로 정렬하여 안정ì ì¸ ìƒíƒœë¥¼ 유지함으로서 검색엔진 ë´‡ì´ ë‹¤ì‹œ 색ì¸í•˜ì§€ ì•Šì•„ë„ ë˜ë„ë¡ í•©ë‹ˆë‹¤.'); +@define('PLAIN_ASCII_NAMES', '(특수 문ìžë‚˜ ë³€ì´ë¶€í˜¸ ë“±ì„ ì“°ì§€ 마십시오)'); // New 2.0 constants -@define('SIMPLE_FILTERS', 'Simplified filters'); -@define('SIMPLE_FILTERS_DESC', 'When enabled, search forms and filter functions are reduced to essential options. When disabled, you will see every possible filter option, i.e. in the media library or the entry editor.'); -@define('TOGGLE_SELECT', 'Mark for selection'); -@define('MORE', 'More'); -@define('ENTRY_STATUS', 'Entry status'); -@define('SCHEDULED', 'Scheduled'); -@define('PUBLISHED', 'Published'); -@define('ENTRY_METADATA', 'Entry metadata'); -@define('NAVIGATION', 'Navigation'); -@define('MAIN_MENU', 'Main menu'); -@define('MENU_PERSONAL', 'Personal menu'); -@define('MENU_DASHBOARD', 'Dashboard'); -@define('MENU_ACTIVITY', 'Activity'); -@define('MENU_SETTINGS', 'Settings'); -@define('MENU_TEMPLATES', 'Templates'); -@define('MENU_PLUGINS', 'Plugins'); -@define('MENU_USERS', 'Users'); -@define('MENU_GROUPS', 'Groups'); -@define('MENU_MAINTENANCE', 'Maintenance'); -@define('ALIGN_TOP', 'Top'); -@define('ALIGN_LEFT', 'Left'); -@define('ALIGN_RIGHT', 'Right'); -@define('SHOW_METADATA', 'Show metadata'); -@define('RANGE_FROM', 'From'); -@define('RANGE_TO', 'To'); -@define('UPLOAD', 'Upload'); -@define('DOWNLOAD', 'Download'); -@define('ENTRY_PUBLISHED', 'Entry #%s published'); -@define('PUBLISH_ERROR', 'Error publishing entry:'); -@define('UPDATE_NOTIFICATION', 'Update notification'); -@define('NEW_VERSION_AVAILABLE', 'New stable Serendipity version available: '); -@define('MOVE', 'Move'); -@define('MOVE_UP', 'Move up'); -@define('MOVE_DOWN', 'Move down'); -@define('INSTALL_NEW_SIDEBAR_PLUGIN', 'Install a new sidebar plugin'); -@define('INSTALL_NEW_EVENT_PLUGIN', 'Install a new event plugin'); -@define('TEMPLATE_OPTIONS', 'Template options'); -@define('CURRENT_TEMPLATE', 'Current Template'); -@define('TEMPLATE_INFO', 'Show template info'); -@define('AVAILABLE_TEMPLATES', 'Available Templates'); -@define('TIMESTAMP_RESET', 'The timestamp has been reset to the current time.'); +@define('SIMPLE_FILTERS', 'ê°„ì†Œí™”ëœ í•„í„°'); +@define('SIMPLE_FILTERS_DESC', '사용할 경우 검색 입력창과 í•„í„° ê¸°ëŠ¥ì„ í•„ìˆ˜ìš”ì†Œë§Œ 남ê¹ë‹ˆë‹¤. 사용하지 ì•Šì„ ê²½ìš° 가능한 모든 í•„í„° ê¸°ëŠ¥ì´ ë‹¤ 나타납니다 - 미디어 보관함ì´ë‚˜ 글 편집기ì—ë„ ë³´ìž…ë‹ˆë‹¤.'); +@define('TOGGLE_SELECT', 'ì„ íƒì‚¬í•­ 표시'); +@define('MORE', 'ë” ë³´ê¸°'); +@define('ENTRY_STATUS', 'ê¸€ì˜ ìƒíƒœ'); +@define('SCHEDULED', '예약ë¨'); +@define('PUBLISHED', '게시ë¨'); +@define('ENTRY_METADATA', 'ê¸€ì˜ ë©”íƒ€ë°ì´í„°'); +@define('NAVIGATION', '내비게ì´ì…˜'); +@define('MAIN_MENU', '주 메뉴'); +@define('MENU_PERSONAL', 'ê°œì¸ ë©”ë‰´'); +@define('MENU_DASHBOARD', '대시보드'); +@define('MENU_ACTIVITY', '활ë™ì‚¬í•­'); +@define('MENU_SETTINGS', '설정'); +@define('MENU_TEMPLATES', '템플릿'); +@define('MENU_PLUGINS', '플러그ì¸'); +@define('MENU_USERS', '사용ìž'); +@define('MENU_GROUPS', '그룹'); +@define('MENU_MAINTENANCE', '유지관리'); +@define('ALIGN_TOP', '위'); +@define('ALIGN_LEFT', '왼쪽'); +@define('ALIGN_RIGHT', '오른쪽'); +@define('SHOW_METADATA', '메타ë°ì´í„° 표시'); +@define('RANGE_FROM', '시작:'); +@define('RANGE_TO', 'ë:'); +@define('UPLOAD', '올려주기(업로드)'); +@define('DOWNLOAD', '내려받기(다운로드)'); +@define('ENTRY_PUBLISHED', '%s번 ê¸€ì„ ê²Œì‹œí•¨'); +@define('PUBLISH_ERROR', 'ê¸€ì„ ê²Œì‹œí•˜ëŠ” 중 오류 ë°œìƒ:'); +@define('UPDATE_NOTIFICATION', 'ì—…ë°ì´íЏ 알림'); +@define('NEW_VERSION_AVAILABLE', 'ì„¸ë Œë””í”¼í‹°ì˜ ìƒˆë¡œìš´ 안정화 ë²„ì „ì´ ìžˆìŠµë‹ˆë‹¤: '); +@define('MOVE', 'ì´ë™'); +@define('MOVE_UP', '위로 ì´ë™'); +@define('MOVE_DOWN', '아래로 ì´ë™'); +@define('INSTALL_NEW_SIDEBAR_PLUGIN', '새로운 옆줄 í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜í•˜ê¸°'); +@define('INSTALL_NEW_EVENT_PLUGIN', '새로운 ì´ë²¤íЏ í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜í•˜ê¸°'); +@define('TEMPLATE_OPTIONS', '템플릿 ì„ íƒ ì‚¬í•­'); +@define('CURRENT_TEMPLATE', '현재 사용 ì¤‘ì¸ í…œí”Œë¦¿'); +@define('TEMPLATE_INFO', '템플릿 ì •ë³´ 보기'); +@define('AVAILABLE_TEMPLATES', '사용할 수 있는 템플릿'); +@define('TIMESTAMP_RESET', 'ìž‘ì„±ì‹œê°„ì„ í˜„ìž¬ì‹œê°„ìœ¼ë¡œ 초기화 했습니다.'); -@define('CLEANCOMPILE_PASS', '[smarty clearCompiledTemplate(%s)]'); -@define('CLEANCOMPILE_FAIL', 'No files available for clearing.'); -@define('CLEANCOMPILE_TITLE', 'Clear template cache'); -@define('CLEANCOMPILE_INFO', 'This will purge all compiled template files of the currently active template. Compiled templates will be automatically re-created on demand by the Smarty framework.'); -@define('INSTALLER_KEY', 'Key'); -@define('INSTALLER_VALUE', 'Value'); -@define('CURRENT_TAB', 'Current tab: '); -@define('PINGBACKS', 'Pingbacks'); -@define('NO_PINGBACKS', 'No Pingbacks'); -@define('GROUP_NAME_DESC', "Use as uppercased eg. 'EXAMPLE_GROUP' name, but not as a constant 'USERLEVEL_XYZ' group name."); -@define('INSTALLER_CLI_TOOLS', 'Server-side command line tools'); -@define('INSTALLER_CLI_TOOLNAME', 'CLI tool'); -@define('INSTALLER_CLI_TOOLSTATUS', 'Executable?'); -@define('VIDEO', 'Video'); -@define('RESET_FILTERS', 'Reset filters'); -@define('UPDATE_FAILMSG', 'Check for new Serendipity version failed. This can happen because either the URL https://raw.github.com/s9y/Serendipity/master/docs/RELEASE is down, your server blocks outgoing connections or there are other connection issues.'); -@define('UPDATE_FAILACTION', 'Disable automatic update check'); -@define('UPDATE_NOTIFICATION_DESC', 'Show the update notification in the Dashboard, and for which channel?'); -@define('FRONTEND', 'Frontend'); -@define('BACKEND', 'Backend'); -@define('MEDIA_UPLOAD_RESIZE', 'Resize before Upload'); -@define('MEDIA_UPLOAD_RESIZE_DESC', 'Resize images before the upload using Javascript. This will also change the uploader to use Ajax and thus remove the Property-Button'); -@define('LOG_LEVEL', 'Log Level'); -@define('LOG_LEVEL_DESC', 'At certain places in the Serendipity code we have placed debugging breakpoints. If this option is set to "Debug", it will write this debug output to templates_c/logs/. You should only enable this option if you are experiencing bugs in those areas, or if you are a developer. Setting this option to "Error" will enable logging PHP errors, overwriting the PHP error_log setting.'); -@define('DEBUG', 'Debug'); -@define('CUSTOM_CONFIG', 'Custom configuration file'); -@define('PLUGIN_ALREADY_INSTALLED', 'Plugin already installed, and does not support multiple installation ("stackable").'); -@define('INSTALL_DBPREFIX_INVALID', 'The database table name prefix must not be empty and may only contain letters, numbers and the underscore character.'); -@define('SYNDICATION_PLUGIN_SUBTOME', 'subToMe'); -@define('SYNDICATION_PLUGIN_SUBTOME_DESC', 'Show the subToMe button, a layer to make feed subscription easier'); -@define('SYNDICATE_THIS_BLOG', 'Subscribe'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file. Set to "none" to show a textlink (the old default)'); -@define('INSTALL_BACKENDPOPUP', 'Enable use of popup windows for the backend'); -@define('INSTALL_BACKENDPOPUP_DESC', 'Do you want to use popup windows for some backend functionality? When disabled (default), inline modal dialogs will be used for e.g. the category selector and media library.'); -@define('UPDATE_STABLE', 'stable'); -@define('UPDATE_BETA', 'beta'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT', 'Feed format'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', 'Which format shall be used for all feeds. Both are supported in all common readers'); -@define('SYNDICATION_PLUGIN_COMMENTFEED', 'Comment feed'); -@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', 'Show an additional link to a comment feed. This should be interesting only to the blogauthor itself'); -@define('SYNDICATION_PLUGIN_FEEDICON', 'Feed icon'); -@define('SYNDICATION_PLUGIN_FEEDICON_DESC', 'Show a (big) icon insteaf of a textlink to the feed. Set to "none" to deactivate, or to "feedburner" to show a feedburner counter if an id is given below'); -@define('SYNDICATION_PLUGIN_CUSTOMURL', 'Custom URL'); -@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', 'If you want to link to the custom feed specified in the blog configuration, enable this option.'); -@define('FEED_CUSTOM', 'Custom feed URL'); -@define('FEED_CUSTOM_DESC', 'If set, a custom feed URL can be set to forward Feedreaders to a specific URL. Useful for statistical analyzers like Feedburner, in which case you would enter your Feedburner-URL here.'); -@define('FEED_FORCE', 'Force custom feed URL?'); -@define('FEED_FORCE_DESC', 'If enabled, the URL entered above will be mandatory for Feedreaders, and your usual feed cannot be accessed from clients.'); -@define('NO_UPDATES', 'No plugin updates are available'); -@define('PLUGIN_GROUP_ALL', 'All categories'); +@define('CLEANCOMPILE_PASS', '컴파ì¼ëœ 템플릿 비우기-[smarty clearCompiledTemplate(%s)]'); +@define('CLEANCOMPILE_FAIL', '삭제할 파ì¼ì´ 없습니다.'); +@define('CLEANCOMPILE_TITLE', '템플릿 ìºì‹œ 비우기'); +@define('CLEANCOMPILE_INFO', '현재 사용 ì¤‘ì¸ í…œí”Œë¦¿ì— ëŒ€í•´ 컴파ì¼ëœ 템플릿 파ì¼ì„ ëª¨ë‘ ì‚­ì œí•˜ëŠ” 기능입니다. 컴파ì¼ëœ í…œí”Œë¦¿ì€ ìŠ¤ë§ˆí‹° 프레임워í¬ì— ì˜í•´ í•„ìš”ì— ë”°ë¼ ìžë™ìœ¼ë¡œ 재ìƒì„±ë©ë‹ˆë‹¤.'); +@define('INSTALLER_KEY', '키'); +@define('INSTALLER_VALUE', 'ê°’'); +@define('CURRENT_TAB', '현재 탭: '); +@define('PINGBACKS', 'í•‘ë°±'); +@define('NO_PINGBACKS', 'í•‘ë°± ì—†ìŒ'); +@define('GROUP_NAME_DESC', "언어 파ì¼ì—서 ì •ì˜ëœ ìƒìˆ˜ë¥¼ ì—¬ê¸°ì— ìž…ë ¥í•  경우 (예: 'USERLEVEL_EDITOR_DESC') ì´ ìƒìˆ˜ì˜ ë²ˆì—­ëœ í˜•íƒœê°€ 표시ë©ë‹ˆë‹¤. ì§ì ‘ ìƒìˆ˜ë¥¼ ì •ì˜í•˜ê³  ê·¸ ì´ë¦„ì„ ì—¬ê¸°ì— ìž…ë ¥í•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. ë²ˆì—­ì´ ë˜ëŠ” 그룹 ì´ë¦„ì„ ì‚¬ìš©í•˜ì§€ 않으려고 한다면 ìƒìˆ˜ ì™¸ì˜ ë¬¸ìžì—´ë¡œ ìžìœ ë¡­ê²Œ 입력하면 ë©ë‹ˆë‹¤."); +@define('INSTALLER_CLI_TOOLS', '서버측 커맨드ë¼ì¸ ë„구'); +@define('INSTALLER_CLI_TOOLNAME', '커맨드ë¼ì¸ ì¸í„°íŽ˜ì´ìФ(CLI) ë„구'); +@define('INSTALLER_CLI_TOOLSTATUS', '실행 가능 ìƒíƒœìž…니까?'); +@define('VIDEO', 'ë™ì˜ìƒ'); +@define('RESET_FILTERS', 'í•„í„° 초기화 하기'); +@define('UPDATE_FAILMSG', '새로운 세렌디피티 ë²„ì „ì„ í™•ì¸í•˜ëŠ”ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. https://raw.github.com/s9y/Serendipity/master/docs/RELEASE ì£¼ì†Œì— ì´ìƒì´ ìƒê²¼ê±°ë‚˜, 서버가 외부 ì ‘ì†ì„ 차단하고 있거나, ê·¸ ì™¸ì˜ ì ‘ì† ë¬¸ì œê°€ ë°œìƒí•œ 것으로 보입니다.'); +@define('UPDATE_FAILACTION', 'ìžë™ ì—…ë°ì´íЏ 확ì¸ì„ 사용하지 않기'); +@define('UPDATE_NOTIFICATION_DESC', 'ëŒ€ì‹œë³´ë“œì— ì—…ë°ì´íЏ ì•Œë¦¼ì„ í‘œì‹œí•˜ê³ , ì–´ë–¤ 채ë„ì— ë‚˜íƒ€ë‚´ê² ìŠµë‹ˆê¹Œ?'); +@define('FRONTEND', '외부 페ì´ì§€'); +@define('BACKEND', '관리 페ì´ì§€'); +@define('MEDIA_UPLOAD_RESIZE', '올리기 ì „ í¬ê¸° ì¡°ì ˆ'); +@define('MEDIA_UPLOAD_RESIZE_DESC', 'ì„œë²„ì— ê·¸ë¦¼ì„ ì˜¬ë¦¬ê¸° ì „ì— ìžë°”스í¬ë¦½íŠ¸ë¡œ í¬ê¸°ë¥¼ 조절합니다. ì´ ê²½ìš° 올리는 ê¸°ëŠ¥ì´ Ajax를 쓰게 ë˜ë¯€ë¡œ 등ë¡ì •ë³´ ë²„íŠ¼ì„ í‘œì‹œí•˜ì§€ 않게 ë©ë‹ˆë‹¤.'); +@define('LOG_LEVEL', '로그 ê¸°ë¡ ìˆ˜ì¤€'); +@define('LOG_LEVEL_DESC', '세렌디피티 코드 ë‚´ì˜ íŠ¹ì • ë¶€ë¶„ì— ë””ë²„ê·¸ 중단ì ì„ 배치해 ë‘었습니다. ì´ ì„¤ì •ì„ "디버그"로 둘 경우 ì´ëŸ¬í•œ 위치ì—서 ë°œìƒí•œ 디버그 ì¶œë ¥ë‚´ì—­ì„ templates_c/logs/ì— ê¸°ë¡í•˜ê²Œ ë©ë‹ˆë‹¤. 특정 부분ì—서 버그가 ë°œìƒí•˜ê³  있거나 본ì¸ì´ 개발ìžì¸ 경우ì—ë§Œ ì´ ì„¤ì •ì„ ì‚¬ìš©í•˜ê¸° ë°”ëžë‹ˆë‹¤. ì´ ì„¤ì •ì„ "오류"로 ë‘ë©´ PHP ì—러를 기ë¡í•˜ê²Œ ë˜ë©° PHP error_log ì„¤ì •ì„ ë®ì–´ì”니다.'); +@define('DEBUG', '디버그'); +@define('CUSTOM_CONFIG', '사용ìží™”ëœ ì„¤ì • 파ì¼'); +@define('PLUGIN_ALREADY_INSTALLED', '플러그ì¸ì´ ì´ë¯¸ 설치ë˜ì—ˆìœ¼ë©°, 다중 설치 ("겹침") ì§€ì›ì„ 하지 않습니다.'); +@define('INSTALL_DBPREFIX_INVALID', 'ë°ì´í„°ë² ì´ìФ í…Œì´ë¸” ì´ë¦„ì˜ ì ‘ë‘사는 비워둘 수 없으며 ì˜ë¬¸ìž, 숫ìž, 그리고 밑줄 문ìž("_")ë§Œ 허용ë©ë‹ˆë‹¤.'); +@define('SYNDICATION_PLUGIN_SUBTOME', '서브투미(subToMe)'); +@define('SYNDICATION_PLUGIN_SUBTOME_DESC', '서브투미(subToMe) ë²„íŠ¼ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. ì´ëŠ” 피드 구ë…ì„ ë” ì‰½ê²Œ 하ë„ë¡ ë„와주는 계층입니다.'); +@define('SYNDICATE_THIS_BLOG', '구ë…하기'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'ì˜†ì¤„ì— ë‚˜íƒ€ë‚˜ëŠ” 피드 맨 ìœ„ì— (대형) ê·¸ë¦¼ì„ í‘œì‹œí•©ë‹ˆë‹¤. 그림 파ì¼ì— 대한 ì „ì²´ ë˜ëŠ” 절대 경로를 입력합니다. "ì—†ìŒ"으로 설정하면 ë¬¸ìž ë§í¬ë¥¼ 표시합니다(예전 기본 설정).'); +@define('INSTALL_BACKENDPOPUP', '관리 페ì´ì§€ì—서 íŒì—… ì°½ì„ ì‚¬ìš©í•  수 있게 함'); +@define('INSTALL_BACKENDPOPUP_DESC', 'ì¼ë¶€ 관리 페ì´ì§€ 기능ì—서 íŒì—… ì°½ì„ ì‚¬ìš©í•˜ê³ ìž í•©ë‹ˆê¹Œ? 사용하지 ì•Šì„ ê²½ìš° (기본값) ì¸ë¼ì¸ 모달 대화ìƒìžë¥¼ 범주 ì„ íƒ, 미디어 보관함 ë“±ì— ì‚¬ìš©í•˜ê²Œ ë©ë‹ˆë‹¤.'); +@define('UPDATE_STABLE', '안정화 버전'); +@define('UPDATE_BETA', '베타 버전'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT', '피드 규격'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', '모든 í”¼ë“œì— ì‚¬ìš©í•  ê·œê²©ì„ ì„ íƒí•©ë‹ˆë‹¤. 둘 다 ì¼ë°˜ì ì¸ 리ë”ì—서 ëª¨ë‘ ì§€ì›í•©ë‹ˆë‹¤.'); +@define('SYNDICATION_PLUGIN_COMMENTFEED', 'ë§ê¸€ 피드'); +@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', 'ë§ê¸€ 피드를 추가로 표시합니다. 대개 블로그 작성ìžì—게만 ê´€ì‹¬ì´ ê°ˆ 것입니다.'); +@define('SYNDICATION_PLUGIN_FEEDICON', '피드 ì•„ì´ì½˜'); +@define('SYNDICATION_PLUGIN_FEEDICON_DESC', 'í”¼ë“œì— ë¬¸ìž ë§í¬ 대신 (대형) ì•„ì´ì½˜ì„ 표시합니다. "ì—†ìŒ"으로 설정하면 나타나지 않으며, "피드버너"를 ì„ íƒí•  경우 ì•„ëž˜ì— ID를 입력하면 피드버너 카운터를 표시합니다.'); +@define('SYNDICATION_PLUGIN_CUSTOMURL', '사용ìží™”ëœ ì£¼ì†Œ(URL)'); +@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', '블로그 ì„¤ì •ì— ì§€ì •í•œ 사용ìží™”ëœ í”¼ë“œë¡œ ë§í¬ë¥¼ í•  경우 ì´ ì„¤ì •ì„ ì‚¬ìš©í•©ë‹ˆë‹¤.'); +@define('FEED_CUSTOM', '사용ìží™”ëœ í”¼ë“œì˜ ì£¼ì†Œ(URL)'); +@define('FEED_CUSTOM_DESC', '사용할 경우 피드 리ë”ê°€ 특정 주소로 방문하ë„ë¡ ë³„ë„ì˜ ì‚¬ìš©ìží™”ëœ í”¼ë“œ 주소를 설정할 수 있습니다. 피드버너와 ê°™ì´ í†µê³„ ë¶„ì„ ê¸°ëŠ¥ì´ ìžˆì„ ë•Œ 유용하며, ì´ ê²½ìš° 피드버너 주소(URL)를 입력하면 ë©ë‹ˆë‹¤.'); +@define('FEED_FORCE', '사용ìží™”ëœ í”¼ë“œì˜ ì£¼ì†Œë¥¼ 강제로 사용합니까?'); +@define('FEED_FORCE_DESC', '사용할 경우 ìœ„ì— ìž…ë ¥í•œ 주소가 모든 피드 리ë”ì—서 ì˜ë¬´ì ìœ¼ë¡œ 사용ë˜ë©° ì¼ë°˜ì ì¸ 피드는 접근할 수 없게 ë©ë‹ˆë‹¤.'); +@define('NO_UPDATES', 'í”ŒëŸ¬ê·¸ì¸ ì—…ë°ì´íŠ¸ê°€ 없습니다'); +@define('PLUGIN_GROUP_ALL', '모든 범주'); -@define('CONF_USE_AUTOSAVE', 'Enable autosave-feature'); -@define('CONF_USE_AUTOSAVE_DESC', 'When enabled, the text you enter into blog entries will be periodically saved in your browser\'s session storage. If your browser crashes during writing, the next time you create a new entry, the text will be restored from this autosave.'); -@define('INSTALL_CAT_FEEDS', 'Feed Settings'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'Toolbar for WYSIWYG editor'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'Sets the list of available toolbar buttons for the WYSIWYG-Editor. If you need to further change those presets, you can create a file templates/XXX/admin/ckeditor_custom_config.js. For further details please check out the files htmlarea/ckeditor_s9y_config.js and htmlarea/ckeditor_s9y_plugin.js.'); -@define('USERCONF_WYSIWYG_PRESET_S9Y', 'Serendipity (default)'); -@define('USERCONF_WYSIWYG_PRESET_BASIC', 'Reduced'); -@define('USERCONF_WYSIWYG_PRESET_FULL', 'Full'); -@define('USERCONF_WYSIWYG_PRESET_STANDARD', 'Alternate'); -@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', 'Force: Serendipity'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', 'Force: Reduced'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Force: Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Force: Alternate'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Force: CKEditor Full'); +@define('CONF_USE_AUTOSAVE', 'ìžë™ 저장 기능 사용'); +@define('CONF_USE_AUTOSAVE_DESC', '사용할 경우 블로그 ê¸€ì— ìž…ë ¥í•œ ë‚´ìš©ì„ ë¸Œë¼ìš°ì €ì˜ 세션 ì €ìž¥ì†Œì— ì£¼ê¸°ì ìœ¼ë¡œ 저장하게 ë©ë‹ˆë‹¤. 글 작성 중 브ë¼ìš°ì €ê°€ ë¹„ì •ìƒ ì¢…ë£Œë  ê²½ìš° ë‹¤ìŒ ë²ˆì— ìƒˆë¡œ ê¸€ì„ ìž‘ì„±í•  때 본문 ë‚´ìš©ì´ ìžë™ 저장ì—서 복구ë˜ì–´ 표시ë©ë‹ˆë‹¤.'); +@define('INSTALL_CAT_FEEDS', '피드 설정'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'WYSIWYG íŽ¸ì§‘ê¸°ì˜ ë„구 모ìŒ'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'WYSIWYG íŽ¸ì§‘ê¸°ì— í‘œì‹œí•  수 있는 ë„구 ëª¨ìŒ ë²„íŠ¼ì˜ ëª©ë¡ì„ 설정합니다. 기본 설정 묶ìŒ(프리셋)ì„ ì¶”ê°€ì ìœ¼ë¡œ ë³€ê²½í•˜ê³ ìž í•  경우 templates/XXX/admin/ckeditor_custom_config.js 파ì¼ì„ 만들면 ë©ë‹ˆë‹¤. 보다 ìžì„¸í•œ ì‚¬í•­ì€ htmlarea/ckeditor_s9y_config.js ë° htmlarea/ckeditor_s9y_plugin.js 파ì¼ì„ 참고하기 ë°”ëžë‹ˆë‹¤.'); +@define('USERCONF_WYSIWYG_PRESET_S9Y', '세렌디피티 (기본값)'); +@define('USERCONF_WYSIWYG_PRESET_BASIC', 'ê°„ì†Œí™”ëœ ê¸°ëŠ¥'); +@define('USERCONF_WYSIWYG_PRESET_FULL', 'ì „ì²´ 기능'); +@define('USERCONF_WYSIWYG_PRESET_STANDARD', '대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor ì „ì²´ 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', 'ê°•ì œ 사용: 세렌디피티'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', 'ê°•ì œ 사용: ê°„ì†Œí™”ëœ ê¸°ëŠ¥'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'ê°•ì œ 사용: ì „ì²´ 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'ê°•ì œ 사용: 대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'ê°•ì œ 사용: CKEditor ì „ì²´ 기능'); -@define('CATEGORY_PLUGIN_SHOWALL', 'Show a link to "All categories"?'); -@define('CATEGORY_PLUGIN_SHOWALL', 'If enabled, a link for the visitor to display the blog with no category restriction will be added.'); -@define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity requires a PHP version >= %2$s - you are running a lower version (%1$s) and need to upgrade your PHP version. Most providers offer you to switch to newer PHP versions through their admin panels or .htaccess directives.'); -@define('TOGGLE_VIEW', 'Switch category view mode'); -@define('PUBLISH_NOW', 'Publish this entry now (sets current time and date)'); -@define('EDITOR_TAGS', 'Tags'); -@define('EDITOR_NO_TAGS', 'No tags'); -@define('DASHBOARD_ENTRIES', 'In Progress'); -@define('INSTALL_PASSWORD2', 'Admin password (verify)'); -@define('INSTALL_PASSWORD2_DESC', 'Password for admin login, enter again to verify.'); -@define('INSTALL_PASSWORD_INVALID', 'Your entered passwords for the administrator user do not match.'); -@define('INSTALL_BACKENDPOPUP_GRANULAR', 'Force specific backend popups'); -@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'If you generally disable backend popups, you can specifically force using popups for specific places by entering a comma seperated list of places here. Available places are: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open %1$s manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. Return to previous page.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. Return to previous page.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. Note: This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('CATEGORY_PLUGIN_SHOWALL', '"모든 범주"ì— ëŒ€í•œ ë§í¬ 표시'); +@define('CATEGORY_PLUGIN_SHOWALL', '사용할 경우 범주 제한 ì—†ì´ ë¸”ë¡œê·¸ë¥¼ 보여주는 ë§í¬ë¥¼ 방문ìžê°€ ë³¼ 수 있게 추가합니다.'); +@define('SERENDIPITY_PHPVERSION_FAIL', '세렌디피티는 PHP 버전 %2$s ì´ìƒì´ 필요합니다. 현재 ì‹œìŠ¤í…œì€ ë” ë‚®ì€ ë²„ì „ (%1$s)ì„ ì‚¬ìš©í•˜ê³  있으므로 업그레ì´ë“œ 해야 합니다. ëŒ€ë¶€ë¶„ì˜ í˜¸ìŠ¤íŒ… 서비스 제공ìžë“¤ì€ ê´€ë¦¬ìž í™”ë©´ì´ë‚˜ .htaccess 지시어 ë“±ì„ í†µí•´ 새로운 PHP 버전으로 업그레ì´ë“œí•  수 있는 ê¸°ëŠ¥ì„ ì œê³µí•©ë‹ˆë‹¤.'); +@define('TOGGLE_VIEW', '범주 표시 방법 변경'); +@define('PUBLISH_NOW', 'ì´ ê¸€ì„ ì§€ê¸ˆ 게시 (현재 날짜와 시간으로 설정)'); +@define('EDITOR_TAGS', '태그'); +@define('EDITOR_NO_TAGS', '태그 ì—†ìŒ'); +@define('DASHBOARD_ENTRIES', '작성 중'); +@define('INSTALL_PASSWORD2', 'ê´€ë¦¬ìž ì•”í˜¸ (다시 ìž…ë ¥)'); +@define('INSTALL_PASSWORD2_DESC', 'ê²€ì¦ì„ 위해 ê´€ë¦¬ìž ë¡œê·¸ì¸ì„ 위한 암호를 다시 입력합니다.'); +@define('INSTALL_PASSWORD_INVALID', '입력한 ê´€ë¦¬ìž ì•”í˜¸ê°€ ì¼ì¹˜í•˜ì§€ 않습니다.'); +@define('INSTALL_BACKENDPOPUP_GRANULAR', '특정 ê´€ë¦¬ìž í™”ë©´ íŒì—… ì°½ì„ ê°•ì œë¡œ 표시'); +@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'ì¼ë°˜ì ìœ¼ë¡œ ê´€ë¦¬ìž í™”ë©´ì˜ íŒì—… ì°½ì„ ì‚¬ìš©í•˜ê³  있지 ì•Šì„ ê²½ìš°ë¼ë„ íŒì—… ì°½ì„ ê°•ì œë¡œ ì‚¬ìš©í•˜ê³ ìž í•˜ëŠ” ê³³ì´ ìžˆìœ¼ë©´ ì—¬ê¸°ì— í•´ë‹¹ ìž¥ì†Œë“¤ì„ ê°ê° 쉼표로 분리하여 입력해둘 수 있습니다. 사용 가능한 장소는: '); +@define('START_UPDATE', 'ì—…ë°ì´íЏ 시작...'); +@define('UPDATE_ALL', 'ëª¨ë‘ ì—…ë°ì´íЏ'); +@define('JS_FAILURE', 'ì„¸ë Œë””í”¼í‹°ì˜ ìžë°”스í¬ë¦½íЏ ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ ë¶ˆëŸ¬ë“¤ì¼ ìˆ˜ 없습니다. ì´ëŠ” PHP나 í”ŒëŸ¬ê·¸ì¸ ì˜¤ë¥˜ ë•Œë¬¸ì— ë°œìƒí•  ìˆ˜ë„ ìžˆê³  브ë¼ìš°ì € ìºì‹œê°€ 비정ìƒì ì¼ 경우ì—ë„ ê²½í—˜í•  수 있습니다. 정확한 ìƒí™©ì„ íŒŒì•…í•˜ê³ ìž í•œë‹¤ë©´ %1$s 주소를 브ë¼ìš°ì €ì—서 수ë™ìœ¼ë¡œ ì—´ê³  오류 ë‚´ìš©ì„ í™•ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤.'); +@define('THEMES_PREVIEW_BLOG', 'blog.s9y.orgì—서 ì‹œì—°ì„ í™•ì¸'); +@define('SYNDICATION_PLUGIN_XML_DESC', 'ë¬¸ìž ë§í¬ë§Œ 보여주기를 ì›í•  경우 "ì—†ìŒ"으로 설정합니다.'); +@define('MULTICHECK_NO_ITEM', 'ì„ íƒí•œ ì•„ì´í…œì´ 없습니다. 최소한 한 개를 ì„ íƒí•˜ì‹­ì‹œì˜¤. ì´ì „ 페ì´ì§€ë¡œ ëŒì•„가기.'); +@define('MULTICHECK_NO_DIR', 'ì„ íƒí•œ 디렉토리가 없습니다. 최고한 한 êµ°ë°ë¥¼ ì„ íƒí•˜ì‹­ì‹œì˜¤. ì´ì „ 페ì´ì§€ë¡œ ëŒì•„가기.'); +@define('BULKMOVE_INFO', '대량으로 ì´ë™í•˜ê¸°'); +@define('BULKMOVE_INFO_DESC', '여러 파ì¼ì„ ì„ íƒí•˜ì—¬ í•œêº¼ë²ˆì— ìƒˆë¡œìš´ 위치로 ì´ë™ì‹œí‚¬ 수 있습니다. 주ì˜: ì´ ìž‘ì—…ì€ ì—¬ëŸ¬ 파ì¼ì˜ 대량 삭제와 마찬가지로 ë˜ëŒë¦´ 수 없습니다. ì„ íƒí•œ 파ì¼ì€ 물리ì ìœ¼ë¡œ ì´ë™ë˜ë©° ì´ë¥¼ 참조하는 블로그 ê¸€ì€ ìƒˆ 위치를 참조하ë„ë¡ ìž¬ìž‘ì„±ë©ë‹ˆë‹¤.'); +@define('FIRST_PAGE', '첫 페ì´ì§€'); +@define('LAST_PAGE', '마지막 페ì´ì§€'); +@define('MEDIA_PROPERTIES_DONE', '%dë²ˆì˜ ë“±ë¡ì •ë³´ê°€ 변경ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('DIRECTORY_INFO', '디렉토리 ì •ë³´'); +@define('DIRECTORY_INFO_DESC', '디렉토리는 물리ì ì¸ í´ë”/디렉토리 ì´ë¦„ì„ ë°˜ì˜í•©ë‹ˆë‹¤. ì•„ì´í…œì„ í¬í•¨í•˜ê³  있는 디렉토리를 변경하거나 ì´ë™í•  경우 ë‘ ë°©ë²• 중 하나를 ì„ íƒí•´ì•¼ 합니다. ì›í•˜ëŠ” 디렉토리 ë˜ëŠ” 하위 디렉토리를 만든 ë‹¤ìŒ ë¯¸ë””ì–´ ë³´ê´€í•¨ì„ í†µí•´ 새 디렉토리로 ì•„ì´í…œì„ ì´ë™í•˜ê³  나면 ì›ëž˜ 디렉토리를 삭제하는 ê²ƒì´ í•œ 방법입니다. 다른 ë°©ë²•ì€ ì•„ëž˜ì˜ ë””ë ‰í† ë¦¬ 편집 ë²„íŠ¼ì„ ì‚¬ìš©í•˜ì—¬ ì›ëž˜ 디렉토리를 통째로 변경하고서 ì›í•˜ë˜ 다른 ì´ë¦„ (기존 하위 디렉토리/ + 새 ì´ë¦„)으로 바꾸는 것입니다. ì´ë ‡ê²Œ 하면 모든 디렉토리와 ì•„ì´í…œì„ ì´ë™ì‹œí‚¤ê³  참조하는 모든 블로그 ê¸€ì„ ë³€ê²½í•˜ê²Œ ë©ë‹ˆë‹¤.'); +@define('MEDIA_RESIZE_EXISTS', 'ë™ì¼í•œ í­ê³¼ 높ì´ë¥¼ 가진 파ì¼ì´ ì´ë¯¸ 존재합니다!'); +@define('USE_CACHE', 'ìºì‹œ 사용하기'); +@define('USE_CACHE_DESC', '특정 ë°ì´í„°ë² ì´ìФ 질ì˜ë¥¼ 반복하지 않ë„ë¡ ë‚´ë¶€ ìºì‹œë¥¼ 사용하ë„ë¡ í•©ë‹ˆë‹¤. 중간ì—서 ë†’ì€ ì ‘ì†ëŸ‰ì´ 걸리는 ì„œë²„ì˜ ë¶€í•˜ë¥¼ 줄ì´ë©° 페ì´ì§€ë¥¼ 불러오는 ì†ë„를 í–¥ìƒì‹œí‚µë‹ˆë‹¤.'); +@define('CONFIG_PERMALINK_PATH_DESC', '세렌디피티가 주소(URL)와 ìž‘ì—…ì„ ì œëŒ€ë¡œ ì—°ë™ì‹œí‚¬ 수 있ë„ë¡ ë°˜ë“œì‹œ ì ‘ë‘사를 지정해야 한다는 ì ì— 유ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤. ì ‘ë‘사는 고유한 ì´ë¦„ì´ë©´ 아무렇게나 지정할 수 있지만 비워둘 수는 없습니다. ì´ëŠ” 모든 ì ‘ë‘사 ì§€ì •ì‚¬í•­ì— ëŒ€í•´ ë™ì¼í•˜ê²Œ ì ìš©ë©ë‹ˆë‹¤.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_nl.inc.php b/lang/UTF-8/serendipity_lang_nl.inc.php index ce5fcdf8..babee8fa 100644 --- a/lang/UTF-8/serendipity_lang_nl.inc.php +++ b/lang/UTF-8/serendipity_lang_nl.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_no.inc.php b/lang/UTF-8/serendipity_lang_no.inc.php index 047a1637..9e5dae5d 100644 --- a/lang/UTF-8/serendipity_lang_no.inc.php +++ b/lang/UTF-8/serendipity_lang_no.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_pl.inc.php b/lang/UTF-8/serendipity_lang_pl.inc.php index 0d8007f4..869818ea 100644 --- a/lang/UTF-8/serendipity_lang_pl.inc.php +++ b/lang/UTF-8/serendipity_lang_pl.inc.php @@ -1110,3 +1110,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'a', 'A', 'b', 'B', 'c', 'C', 'c', 'C @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_pt.inc.php b/lang/UTF-8/serendipity_lang_pt.inc.php index c4818b27..40af2baf 100644 --- a/lang/UTF-8/serendipity_lang_pt.inc.php +++ b/lang/UTF-8/serendipity_lang_pt.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_pt_PT.inc.php b/lang/UTF-8/serendipity_lang_pt_PT.inc.php index 157b7ea1..8ff54930 100644 --- a/lang/UTF-8/serendipity_lang_pt_PT.inc.php +++ b/lang/UTF-8/serendipity_lang_pt_PT.inc.php @@ -1123,3 +1123,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ro.inc.php b/lang/UTF-8/serendipity_lang_ro.inc.php index f666a5e9..4830e1c9 100644 --- a/lang/UTF-8/serendipity_lang_ro.inc.php +++ b/lang/UTF-8/serendipity_lang_ro.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ru.inc.php b/lang/UTF-8/serendipity_lang_ru.inc.php index e70d6ec5..1bf9523e 100644 --- a/lang/UTF-8/serendipity_lang_ru.inc.php +++ b/lang/UTF-8/serendipity_lang_ru.inc.php @@ -1115,3 +1115,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_sa.inc.php b/lang/UTF-8/serendipity_lang_sa.inc.php index 1d316ba5..15691e52 100644 --- a/lang/UTF-8/serendipity_lang_sa.inc.php +++ b/lang/UTF-8/serendipity_lang_sa.inc.php @@ -1031,3 +1031,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_se.inc.php b/lang/UTF-8/serendipity_lang_se.inc.php index b47b4fab..c026f6d6 100644 --- a/lang/UTF-8/serendipity_lang_se.inc.php +++ b/lang/UTF-8/serendipity_lang_se.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_sk.inc.php b/lang/UTF-8/serendipity_lang_sk.inc.php index 6a698630..86e6c757 100644 --- a/lang/UTF-8/serendipity_lang_sk.inc.php +++ b/lang/UTF-8/serendipity_lang_sk.inc.php @@ -1102,3 +1102,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ta.inc.php b/lang/UTF-8/serendipity_lang_ta.inc.php index 8701dd2e..a63f9397 100644 --- a/lang/UTF-8/serendipity_lang_ta.inc.php +++ b/lang/UTF-8/serendipity_lang_ta.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_tn.inc.php b/lang/UTF-8/serendipity_lang_tn.inc.php index 72382ca5..f8213b57 100644 --- a/lang/UTF-8/serendipity_lang_tn.inc.php +++ b/lang/UTF-8/serendipity_lang_tn.inc.php @@ -1116,3 +1116,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_tr.inc.php b/lang/UTF-8/serendipity_lang_tr.inc.php index d11c9148..f3d095e3 100644 --- a/lang/UTF-8/serendipity_lang_tr.inc.php +++ b/lang/UTF-8/serendipity_lang_tr.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_tw.inc.php b/lang/UTF-8/serendipity_lang_tw.inc.php index 89592c8d..ca902c1e 100644 --- a/lang/UTF-8/serendipity_lang_tw.inc.php +++ b/lang/UTF-8/serendipity_lang_tw.inc.php @@ -1117,3 +1117,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_zh.inc.php b/lang/UTF-8/serendipity_lang_zh.inc.php index 2c748917..b8223582 100644 --- a/lang/UTF-8/serendipity_lang_zh.inc.php +++ b/lang/UTF-8/serendipity_lang_zh.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/addlang.txt b/lang/addlang.txt index 8067a758..d56113f9 100644 --- a/lang/addlang.txt +++ b/lang/addlang.txt @@ -1,13 +1 @@ -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. Return to previous page.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. Return to previous page.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. Note: This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); -@define('HIDE_SUBDIR_FILES', 'Hide Files of Subdirectories'); -@define('USE_CACHE', 'USe Cache'); -@define('USE_CACHE_DESC', 'Use an internal cache to not repeat database reads. This reduces the load on servers with medium to high traffic and improves page load time.'); \ No newline at end of file +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/plugin_lang.php b/lang/plugin_lang.php index 6c7403ce..e06f2e11 100644 --- a/lang/plugin_lang.php +++ b/lang/plugin_lang.php @@ -92,3 +92,10 @@ foreach($const['missing'] AS $file => $constants) { @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_bg.inc.php b/lang/serendipity_lang_bg.inc.php index ef40c6d7..2a6d49e2 100644 --- a/lang/serendipity_lang_bg.inc.php +++ b/lang/serendipity_lang_bg.inc.php @@ -1104,3 +1104,10 @@ $i18n_filename_to = array('-', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_cn.inc.php b/lang/serendipity_lang_cn.inc.php index a4d5395f..d418e6ff 100644 --- a/lang/serendipity_lang_cn.inc.php +++ b/lang/serendipity_lang_cn.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_cs.inc.php b/lang/serendipity_lang_cs.inc.php index 44038e13..5a8183e9 100644 --- a/lang/serendipity_lang_cs.inc.php +++ b/lang/serendipity_lang_cs.inc.php @@ -1143,3 +1143,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_cz.inc.php b/lang/serendipity_lang_cz.inc.php index 844ceaaa..b067d31d 100644 --- a/lang/serendipity_lang_cz.inc.php +++ b/lang/serendipity_lang_cz.inc.php @@ -1144,3 +1144,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_da.inc.php b/lang/serendipity_lang_da.inc.php index 3f375eff..bb3529bd 100644 --- a/lang/serendipity_lang_da.inc.php +++ b/lang/serendipity_lang_da.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_de.inc.php b/lang/serendipity_lang_de.inc.php index 151d4c5a..663c6f28 100644 --- a/lang/serendipity_lang_de.inc.php +++ b/lang/serendipity_lang_de.inc.php @@ -1084,6 +1084,7 @@ @define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Erzwingen: Vollständig'); @define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Erzwingen: Alternative'); @define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Erzwingen: CKEditor Vollständig'); + @define('CATEGORY_PLUGIN_SHOWALL', 'Zeige einen Link zu "Alle Kategorien"?'); @define('CATEGORY_PLUGIN_SHOWALL', 'Falls aktiviert wird Besuchern ein Link angezeigt, das Blog ohne Einschränkung der Kategorien darzustellen.'); @define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity benötigt eine PHP-Version >= %2$s - Sie benutzen eine ältere Version (%1$s) und müssen auf eine neuere upgraden. Die meisten Provider gestatten den Wechsel auf neuere PHP-Versionen über einen Schalter in der Admin-Oberfläche oder eine Anweisung in der .htaccess.'); @@ -1097,18 +1098,26 @@ @define('INSTALL_PASSWORD_INVALID', 'Die eingebenen Administrator-Passwörter stimmen nicht überein.'); @define('INSTALL_BACKENDPOPUP_GRANULAR', 'Popups in speziellen Bereichen erzwingen'); @define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'Wenn Popups generell deaktiviert wurden, kann an speziellen Stellen dennoch der Einsatz von Popups forciert werden, indem die Liste jener Stellen hier aufgeführt wird (kommasepariert). Die vollständige Liste ist: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open %1$s manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. Return to previous page.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. Return to previous page.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. Note: This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); + +@define('START_UPDATE', 'Starte Update ...'); +@define('UPDATE_ALL', 'Alles updaten'); +@define('JS_FAILURE', 'Die Javascript-Bibliothek von Serendipity konnte nicht geladen werden. Das kann aufgrund von PHP- oder Pluginfehlern, eventuell auch aufgrund eines zerstörten Browsercaches vorkommen. Um die genaue Fehlermeldung zu sehen, öffnen Sie bitte %1$s von Hand im Browser und suchen nach Fehlermeldungen.'); +@define('THEMES_PREVIEW_BLOG', 'Siehe Demo auf blog.s9y.org'); +@define('SYNDICATION_PLUGIN_XML_DESC', 'Auf "none" setzen um nur einen Textlink anzuzeigen.'); +@define('MULTICHECK_NO_ITEM', 'Kein Element ausgewählt, bitte mindestens eins auswählen. Zurück zur vorigen Seite.'); +@define('MULTICHECK_NO_DIR', 'Kein Verzeichnis ausgewählt, bitte mindestens eins auswählen. Zurück zur vorigen Seite.'); +@define('BULKMOVE_INFO', 'Gleichzeitiges Verschieben mehrerer Dateien'); +@define('BULKMOVE_INFO_DESC', 'Sie können mehrere Dateien auswählen, um sie gleichzeitig an einen neuen Ort zu verschieben. Hinweis: Diese Aktion kann nicht rückgängig gemacht werden, genau wie das gleichzeitige Löschen mehrerer Dateien. Alle ausgewählten Dateien werden physikalisch verschoben; Blogeinträge, welche diese Dateien referenzieren, werden umgeschrieben, um auf den neuen Ort zu verweisen.'); +@define('FIRST_PAGE', 'Erste Seite'); +@define('LAST_PAGE', 'Letzte Seite'); +@define('MEDIA_PROPERTIES_DONE', 'Eigenschaften von #%d geändert.'); +@define('DIRECTORY_INFO', 'Verzeichnis-Info'); +@define('DIRECTORY_INFO_DESC', 'Verzeichnisse entsprechen dem Namen ihrer zugehörigen phsikalischen Ordner. Wollen Sie Verzeichnisse, die Dateien enthalten, ändern oder verschieben, haben Sie zwei Optionen. Sie können entweder das gewünschte Ziel(unter)verzeichnis anlegen, die Elemente über die Medienbibliothek dorthin verschieben und das leere Ursprungsverzeichnis löschen; oder Sie können das gesamte Ursprungsverzeichnis über den Button "Verzeichnis bearbeiten" ändern und frei umbenennen. Letzteres wird alle Unterverzeichnisse und Elemente verschieben und die darauf verweisenden Blogeinträge anpassen.'); +@define('MEDIA_RESIZE_EXISTS', 'Datei-Dimensionen existieren bereits!'); +@define('USE_CACHE', 'Caching aktivieren'); +@define('USE_CACHE_DESC', 'Aktiviert einen internen Cache, um die Wiederholung bestimmter Datenbank-Abfragen zu umgehen. Das reduziert die Last auf Server mit mittlerem bis hohem Traffic und verbessert die Ladezeit der Seite.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Beachten Sie bitte, dass Sie ein Präfix verwenden müssen, damit Serendipity die URL korrekt der richtigen Aktion zuordnen kann. Sie dürfen das Präfix in jeden beliebigen einzigartigen Namen ändern, aber nicht komplett entfernen. Das gilt für alle Definitionen für Pfad-Präfixe.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Erlaube, Daten über lokale URLs abzurufen'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'Standardmäßig ist es aus Sicherheitsgründen verboten, Daten über lokale URLs abzurufen, um Server Side Request Forgers (SSRF) zu vermeiden. Wenn Sie ein lokales Intranet verwenden können sie die Datenabfrage über diese Option explizit erlauben.'); +@define('REMOTE_FILE_INVALID', 'Die angegebene URL scheint eine lokale zu sein und darf nicht abgerufen werden. Sie können dies explizit gestatten, indem Sie in der Konfiguration die Option "Erlaube, Daten über lokale URLs abzurufen" setzen.'); +@define('URL_NOT_FOUND', 'Die angeforderte Seite konnte nicht gefunden werden (404). Dies ist die Standardseite.'); \ No newline at end of file diff --git a/lang/serendipity_lang_en.inc.php b/lang/serendipity_lang_en.inc.php index 94d694fe..ed92bcae 100644 --- a/lang/serendipity_lang_en.inc.php +++ b/lang/serendipity_lang_en.inc.php @@ -1113,3 +1113,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_es.inc.php b/lang/serendipity_lang_es.inc.php index f747636e..666719dc 100644 --- a/lang/serendipity_lang_es.inc.php +++ b/lang/serendipity_lang_es.inc.php @@ -1130,3 +1130,10 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ?? @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_fa.inc.php b/lang/serendipity_lang_fa.inc.php index 7a65a95d..63f13265 100644 --- a/lang/serendipity_lang_fa.inc.php +++ b/lang/serendipity_lang_fa.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_fi.inc.php b/lang/serendipity_lang_fi.inc.php index 9bec73ea..a77de5bf 100644 --- a/lang/serendipity_lang_fi.inc.php +++ b/lang/serendipity_lang_fi.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_fr.inc.php b/lang/serendipity_lang_fr.inc.php index 7516dd69..a2a535f5 100644 --- a/lang/serendipity_lang_fr.inc.php +++ b/lang/serendipity_lang_fr.inc.php @@ -1119,3 +1119,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_hu.inc.php b/lang/serendipity_lang_hu.inc.php index 05fa2523..2ad41551 100644 --- a/lang/serendipity_lang_hu.inc.php +++ b/lang/serendipity_lang_hu.inc.php @@ -1110,3 +1110,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_is.inc.php b/lang/serendipity_lang_is.inc.php index 88f823e6..e68b5293 100644 --- a/lang/serendipity_lang_is.inc.php +++ b/lang/serendipity_lang_is.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_it.inc.php b/lang/serendipity_lang_it.inc.php index 3361340e..a90c4d8e 100644 --- a/lang/serendipity_lang_it.inc.php +++ b/lang/serendipity_lang_it.inc.php @@ -1115,3 +1115,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ja.inc.php b/lang/serendipity_lang_ja.inc.php index d5abe4f6..258024e8 100644 --- a/lang/serendipity_lang_ja.inc.php +++ b/lang/serendipity_lang_ja.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ko.inc.php b/lang/serendipity_lang_ko.inc.php index f586c982..94f4a3fd 100644 --- a/lang/serendipity_lang_ko.inc.php +++ b/lang/serendipity_lang_ko.inc.php @@ -1,8 +1,8 @@ -# (c) 2005 http://www.tool-box.info/ +# Translated by: Wesley Woo-Duk Hwang-Chung +# (c) 2005, 2016 http://www.tool-box.info/ /* vim: set sts=4 ts=4 expandtab : */ @define('LANG_CHARSET', 'UTF-8'); @@ -19,7 +19,7 @@ @define('SERENDIPITY_ADMIN_SUITE', '세렌디피티 관리 ë„구'); @define('HAVE_TO_BE_LOGGED_ON', 'ì´ íŽ˜ì´ì§€ë¥¼ 보려면 로그ì¸í•´ì•¼ 합니다'); @define('WRONG_USERNAME_OR_PASSWORD', 'ì•„ì´ë”” ë˜ëŠ” 암호가 잘못 ìž…ë ¥ë˜ì—ˆìŠµë‹ˆë‹¤'); -@define('APPEARANCE', '시ê°ì  요소'); +@define('APPEARANCE', '외관'); @define('MANAGE_STYLES', 'ìŠ¤íƒ€ì¼ ê´€ë¦¬'); @define('CONFIGURE_PLUGINS', 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì •'); @define('CONFIGURATION', '기능 설정'); @@ -31,9 +31,9 @@ @define('SAVE', '저장'); @define('NAME', 'ì´ë¦„'); @define('CREATE_NEW_CAT', '새로운 범주 만들기'); -@define('I_WANT_THUMB', 'ê¸€ì— ìž‘ì€ ê·¸ë¦¼ì„ ì ìš©í•©ë‹ˆë‹¤.'); -@define('I_WANT_BIG_IMAGE', 'ê¸€ì— í° ê·¸ë¦¼ì„ ì ìš©í•©ë‹ˆë‹¤.'); -@define('I_WANT_NO_LINK', '그림 ìžì²´ë¡œ ë³´ì—¬ì¤ë‹ˆë‹¤'); +@define('I_WANT_THUMB', 'ê¸€ì— ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œ 추가합니다.'); +@define('I_WANT_BIG_IMAGE', 'ê¸€ì— ì›ë³¸ 그림으로 추가합니다.'); +@define('I_WANT_NO_LINK', '그림으로만 ë³´ì—¬ì¤ë‹ˆë‹¤'); @define('I_WANT_IT_TO_LINK', 'ê·¸ë¦¼ì„ ë‹¤ìŒ ì£¼ì†Œì˜ ë§í¬ë¡œ 만듭니다:'); @define('BACK', '뒤로'); @define('FORWARD', '앞으로'); @@ -51,7 +51,7 @@ @define('SAVE', '저장'); @define('UP', '위로'); @define('DOWN', '아래로'); -@define('ENTRIES', 'ê°œì˜ ê¸€'); +@define('ENTRIES', '블로그 글'); @define('NEW_ENTRY', '새로운 글'); @define('EDIT_ENTRIES', '글 편집하기'); @define('CATEGORIES', '범주'); @@ -69,9 +69,9 @@ @define('ADD_COMMENT', 'ë§ê¸€ 추가'); @define('NO_COMMENTS', 'ë§ê¸€ ì—†ìŒ'); @define('POSTED_BY', '작성ìž:'); -@define('ON', ':'); -@define('A_NEW_COMMENT_BLAHBLAH', 'ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ "%s"ì— ìžˆëŠ” "%s"(ì´)ë¼ëŠ” ê¸€ì— ìƒˆë¡œìš´ ë§ê¸€ì´ 달렸습니다.'); -@define('A_NEW_TRACKBACK_BLAHBLAH', '"%s"(ì´)ë¼ëŠ” ê¸€ì— ìƒˆë¡œìš´ íŠ¸ëž™ë°±ì´ ìƒì„±ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('ON', '작성ì¼:'); +@define('A_NEW_COMMENT_BLAHBLAH', 'ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ "%s"ì— ìžˆëŠ” 글 "%s"ì— ìƒˆë¡œìš´ ë§ê¸€ì´ 달렸습니다.'); +@define('A_NEW_TRACKBACK_BLAHBLAH', '블로그 글 "%s"ì— ìƒˆë¡œìš´ íŠ¸ëž™ë°±ì´ ìƒì„±ë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('NO_CATEGORY', '범주 ì—†ìŒ'); @define('ENTRY_BODY', '본문'); @define('EXTENDED_BODY', '추가 ë‚´ìš©'); @@ -102,14 +102,14 @@ @define('SHOWS_TOP_SITES', '블로그로 가장 ìžì£¼ ë§í¬ë¥¼ ê±´ 사ì´íЏ 보기'); @define('TOP_EXITS', 'ìƒìœ„ ì§„ì¶œ ë§í¬'); @define('SHOWS_TOP_EXIT', '블로그ì—서 가장 ìžì£¼ 타고 나간 ë§í¬ 보기'); -@define('SYNDICATION', '배급'); -@define('SHOWS_RSS_BLAHBLAH', 'RSS 배급 ë§í¬ 보여주기'); +@define('SYNDICATION', '중개'); +@define('SHOWS_RSS_BLAHBLAH', 'RSS 중개 ë§í¬ 보여주기'); @define('ADVERTISES_BLAHBLAH', 'ë¸”ë¡œê·¸ì˜ ì œìž‘ ë„구를 광고함'); @define('HTML_NUGGET', 'HTML ë©ì–´ë¦¬'); @define('HOLDS_A_BLAHBLAH', 'ì˜†ì¤„ì— HTMLì´ ë“¤ì–´ìžˆëŠ” ë©ì–´ë¦¬ë¥¼ 넣기'); @define('TITLE_FOR_NUGGET', 'ë©ì–´ë¦¬ 제목'); @define('THE_NUGGET', 'HTML ë©ì–´ë¦¬ë¥¼ 넣으세요!'); -@define('SYNDICATE_THIS_BLOG', '블로그 배급받기'); +@define('SYNDICATE_THIS_BLOG', '블로그 중개하기'); @define('YOU_CHOSE', '%s(ì„)를 골ëžìŠµë‹ˆë‹¤'); @define('IMAGE_ROTATE_LEFT', '시계 반대방향으로 90ë„ íšŒì „í•˜ê¸°'); @define('IMAGE_ROTATE_RIGHT', '시계 방향으로 90ë„ íšŒì „í•˜ê¸°'); @@ -124,20 +124,20 @@ @define('VIEW_TOPICS', '주제 보기'); @define('AT', 'ìž…ë ¥:'); @define('SET_AS_TEMPLATE', '템플릿으로 지정하기'); -@define('IN', '범주:'); +@define('IN', '다ìŒì— í¬í•¨:'); @define('EXCERPT', '발췌'); @define('TRACKED', 'ì¶”ì ë¨'); @define('LINK_TO_ENTRY', 'ê¸€ì— ëŒ€í•œ ë§í¬'); -@define('LINK_TO_REMOTE_ENTRY', '먼 ê¸€ì— ëŒ€í•œ ë§í¬'); +@define('LINK_TO_REMOTE_ENTRY', 'ì›ê²© ê¸€ì— ëŒ€í•œ ë§í¬'); @define('IP_ADDRESS', 'IP 주소'); @define('USER', '사용ìž'); -@define('THUMBNAIL_USING_OWN', '%s(ì€)는 ì´ë¯¸ 충분히 작으므로 ê·¸ ìžì²´ê°€ ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œë„ ì‚¬ìš©ë©ë‹ˆë‹¤.'); +@define('THUMBNAIL_USING_OWN', '%s 파ì¼ì€ ì´ë¯¸ 충분히 작으므로 ê·¸ ìžì²´ë¥¼ ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œë„ ì‚¬ìš©í•©ë‹ˆë‹¤.'); @define('THUMBNAIL_FAILED_COPY', '%s ìžì²´ë¥¼ ìž‘ì€ ê·¸ë¦¼ìœ¼ë¡œ 사용하려고 했으나 ë³µì‚¬ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤.'); @define('AUTHOR', '작성ìž'); @define('LAST_UPDATED', '최종 ì—…ë°ì´íЏ'); @define('TRACKBACK_SPECIFIC', 'ì´ ê¸€ì— ëŒ€í•œ 트랙백 ì „ìš© URI'); @define('DIRECT_LINK', 'ì´ ê¸€ì— ëŒ€í•œ ì§ì ‘ ë§í¬'); -@define('COMMENT_ADDED', 'ë§ê¸€ì´ 성공ì ìœ¼ë¡œ 달렸습니다. '); +@define('COMMENT_ADDED', 'ë§ê¸€ì´ 성공ì ìœ¼ë¡œ 달렸습니다.'); @define('COMMENT_ADDED_CLICK', '%s여기를 눌러%s ë§ê¸€ 목ë¡ìœ¼ë¡œ ëŒì•„가거나 %s여기를 눌러%s ì´ ì°½ì„ ë‹«ìŠµë‹ˆë‹¤.'); @define('COMMENT_NOT_ADDED_CLICK', '%s여기를 눌러%s ë§ê¸€ 목ë¡ìœ¼ë¡œ ëŒì•„가거나 %s여기를 눌러%s ì´ ì°½ì„ ë‹«ìŠµë‹ˆë‹¤.'); @define('COMMENTS_DISABLE', 'ì´ ê¸€ì— ë§ê¸€ì„ 금지하기'); @@ -145,10 +145,10 @@ @define('COMMENTS_CLOSED', '작성ìžê°€ ì´ ê¸€ì— ë§ê¸€ì„ 금지했습니다'); @define('EMPTY_COMMENT', 'ë§ê¸€ ë‚´ìš©ì´ ë¹„ì–´ 있으므로 %sëŒì•„가서%s 다시 작성하십시오'); @define('ENTRIES_FOR', '%s: ìž‘ì„±ëœ ê¸€'); -@define('DOCUMENT_NOT_FOUND', '%së¼ëŠ” 문서를 찾지 못했습니다.'); +@define('DOCUMENT_NOT_FOUND', '%s(ì´)ë¼ëŠ” 문서를 찾지 못했습니다.'); @define('USERNAME', 'ì•„ì´ë””'); @define('PASSWORD', '암호'); -@define('AUTOMATIC_LOGIN', 'ì •ë³´ 저장'); +@define('AUTOMATIC_LOGIN', 'ë¡œê·¸ì¸ ì •ë³´ 저장'); @define('SERENDIPITY_INSTALLATION', '세렌디피티 설치'); @define('LEFT', '왼쪽'); @define('RIGHT', '오른쪽'); @@ -168,7 +168,7 @@ @define('CATEGORY_SAVED', '범주가 저장ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('SELECT_TEMPLATE', 'ë¸”ë¡œê·¸ì— ì‚¬ìš©í•  í…œí”Œë¦¿ì„ ì„ íƒí•˜ì‹­ì‹œì˜¤.'); @define('ENTRIES_NOT_SUCCESSFULLY_INSERTED', 'ê¸€ì´ ì„±ê³µì ìœ¼ë¡œ 삽입ë˜ì§€ 않았습니다.'); -@define('MT_DATA_FILE', 'ì´ë™ 가능 í˜•íƒœì˜ ë°ì´í„° 파ì¼'); +@define('MT_DATA_FILE', '무버블 타입 웹로그용 ë°ì´í„° 파ì¼'); @define('FORCE', '강제로'); @define('CREATE_AUTHOR', 'ìž‘ì„±ìž \'%s\'(ì„)를 ìƒì„±í•©ë‹ˆë‹¤.'); @define('CREATE_CATEGORY', '범주 \'%s\'(ì„)를 ìƒì„±í•©ë‹ˆë‹¤.'); @@ -204,14 +204,14 @@ @define('RESIZING', 'í¬ê¸° 조절중'); @define('RESIZE_DONE', '완료 (%sê°œì˜ ê·¸ë¦¼ì˜ í¬ê¸°ë¥¼ 조절함).'); @define('SYNCING', 'ë°ì´í„°ë² ì´ìŠ¤ë¥¼ 그림 í´ë”와 ë™ê¸°í™”합니다'); -@define('SYNC_OPTION_LEGEND', 'Thumbnail Synchronization Options'); -@define('SYNC_OPTION_KEEPTHUMBS', 'Keep all existing thumbnails'); -@define('SYNC_OPTION_SIZECHECKTHUMBS', 'Keep existing thumbnails only if they are the correct size'); -@define('SYNC_OPTION_DELETETHUMBS', 'Regenerate all thumbnails'); +@define('SYNC_OPTION_LEGEND', 'ìž‘ì€ ê·¸ë¦¼ ë™ê¸°í™” ì„ íƒì‚¬í•­'); +@define('SYNC_OPTION_KEEPTHUMBS', 'ê¸°ì¡´ì˜ ìž‘ì€ ê·¸ë¦¼ ëª¨ë‘ ìœ ì§€'); +@define('SYNC_OPTION_SIZECHECKTHUMBS', 'ì•Œë§žì€ í¬ê¸°ì¼ ê²½ìš°ì¼ ë•Œë§Œ ê¸°ì¡´ì˜ ìž‘ì€ ê·¸ë¦¼ 유지'); +@define('SYNC_OPTION_DELETETHUMBS', 'ìž‘ì€ ê·¸ë¦¼ ëª¨ë‘ ìž¬ìƒì„±'); @define('SYNC_DONE', '완료 (%sê°œì˜ ê·¸ë¦¼ì„ ë™ê¸°í™”함).'); -@define('FILE_NOT_FOUND', '%së¼ëŠ” ì´ë¦„ì˜ íŒŒì¼ì„ 찾지 못했습니다. ì´ë¯¸ ì‚­ì œë˜ì—ˆì„ 수 있습니다.'); +@define('FILE_NOT_FOUND', '%s(ì´)ë¼ëŠ” ì´ë¦„ì˜ íŒŒì¼ì„ 찾지 못했습니다. ì´ë¯¸ ì‚­ì œë˜ì—ˆì„ 수 있습니다.'); @define('ABORT_NOW', '지금 중지'); -@define('REMOTE_FILE_NOT_FOUND', 'ì›ê²© 서버ì—서 파ì¼ì„ 찾지 못했습니다. %s (ì´)ë¼ëŠ” 주소가 정확합니까?'); +@define('REMOTE_FILE_NOT_FOUND', 'ì›ê²© 서버ì—서 파ì¼ì„ 찾지 못했습니다. %s(ì´)ë¼ëŠ” 주소가 정확합니까?'); @define('FILE_FETCHED', '%s(ì„)를 %s(으)로 가져옴'); @define('FILE_UPLOADED', 'íŒŒì¼ %s(ì´)ê°€ %s(으)로 성공ì ìœ¼ë¡œ 업로드ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('WORD_OR', 'ë˜ëŠ”'); @@ -231,8 +231,8 @@ @define('SYNDICATION_PLUGIN_20', 'RSS 2.0 피드'); @define('SYNDICATION_PLUGIN_20c', 'RSS 2.0 ë§ê¸€'); @define('SYNDICATION_PLUGIN_ATOM03', 'ATOM 0.3 피드'); -@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor" 필드'); -@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster" 필드'); +@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor"(편집ì¸) 필드'); +@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster"(웹마스터) 필드'); @define('SYNDICATION_PLUGIN_BANNERURL', 'RSS 피드를 위한 그림 파ì¼'); @define('SYNDICATION_PLUGIN_BANNERWIDTH', '그림 í­'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT', '그림 높ì´'); @@ -241,9 +241,9 @@ @define('SYNDICATION_PLUGIN_BANNERURL_DESC', 'GIF/JPEG/PNG로 ëœ ê·¸ë¦¼ 파ì¼ì˜ 주소 (빈 ìƒíƒœ: 세렌디피티 로고 그림)'); @define('SYNDICATION_PLUGIN_BANNERWIDTH_DESC', '픽셀 단위 (최고 144)'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT_DESC', '픽셀 단위 (최고 400)'); -@define('SYNDICATION_PLUGIN_TTL', '"ttl" 필드 (ìƒì¡´ì‹œê°„)'); +@define('SYNDICATION_PLUGIN_TTL', '"ttl"(ìƒì¡´ì‹œê°„) 필드'); @define('SYNDICATION_PLUGIN_TTL_DESC', '외부 사ì´íЏ ë˜ëŠ” í”„ë¡œê·¸ëž¨ì— ì˜í•´ì„œ ë” ì´ìƒ 저장ë˜ì§€ ì•Šì„ ì‹œì ì„ ë¶„ 단위로 ìž…ë ¥ (빈 ìƒíƒœ: 숨김) [RSS 2.0]'); -@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate" 필드'); +@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate"(게시ì¼ìž) 필드'); @define('SYNDICATION_PLUGIN_PUBDATE_DESC', 'RSS 채ë„ì— "pubDate" 필드를 넣어서 최신으로 올ë¼ì˜¨ ê¸€ì˜ ë‚ ì§œë¥¼ 보여주겠습니까?'); @define('CONTENT', 'ë‚´ìš©'); @define('TYPE', '종류'); @@ -277,12 +277,12 @@ @define('SORT_ORDER_WIDTH', '그림 í­'); @define('SORT_ORDER_HEIGHT', '그림 높ì´'); @define('SORT_ORDER_DATE', '업로드 시간'); -@define('SORT_ORDER_ASC', '오름차'); -@define('SORT_ORDER_DESC', '내림차'); +@define('SORT_ORDER_ASC', '오름차순'); +@define('SORT_ORDER_DESC', '내림차순'); @define('THUMBNAIL_SHORT', 'ìž‘ì€ ê·¸ë¦¼'); -@define('ORIGINAL_SHORT', 'ì›ëž˜ 그림'); +@define('ORIGINAL_SHORT', 'ì›ë³¸ 그림'); @define('APPLY_MARKUP_TO', '%sì— ë§ˆí¬ì—… ì ìš©'); -@define('CALENDAR_BEGINNING_OF_WEEK', '한 ì£¼ì˜ ì‹œìž‘ì '); +@define('CALENDAR_BEGINNING_OF_WEEK', '한 ì£¼ì˜ ì‹œìž‘ì¼'); @define('SERENDIPITY_NEEDS_UPGRADE', '세렌디피티 현재 설치 ë²„ì „ì´ %sì¸ ê²ƒìœ¼ë¡œ 나타났습니다. 버전 %s로 업그레ì´ë“œë¥¼ ê³„ì† ì§„í–‰í•˜ë ¤ë©´ 여기를 누르십시오.'); @define('SERENDIPITY_UPGRADER_WELCOME', '세렌디피티 업그레ì´ë“œ ì—ì´ì „íŠ¸ì— ì˜¤ì‹  ê²ƒì„ í™˜ì˜í•©ë‹ˆë‹¤.'); @define('SERENDIPITY_UPGRADER_PURPOSE', 'ì„¤ì¹˜ëœ ì„¸ë Œë””í”¼í‹° %sì˜ ì—…ê·¸ë ˆì´ë“œë¥¼ ë„와드리겠습니다.'); @@ -306,12 +306,12 @@ @define('CREATED_USER', '새로운 ì‚¬ìš©ìž %s(ì´)ê°€ ìƒì„±ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('MODIFIED_USER', '%sì˜ ì„¤ì •ì´ ë³€ê²½ë˜ì—ˆìŠµë‹ˆë‹¤'); @define('USER_LEVEL', 'ì‚¬ìš©ìž ë ˆë²¨'); -@define('DELETE_USER', 'ì‚¬ìš©ìž %dë²ˆì¸ %s(ì„)를 삭제하게 ë©ë‹ˆë‹¤. ê³„ì† í•˜ì‹œê² ìŠµë‹ˆê¹Œ? ì´ ì‚¬ìš©ìžê°€ 작성한 ê¸€ì´ ë” ì´ìƒ ì¼ë°˜ 페ì´ì§€ì— 나타나지 않게 ë©ë‹ˆë‹¤.'); -@define('DELETED_USER', 'ì‚¬ìš©ìž %dë²ˆì¸ %s(ì´)ê°€ ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('DELETE_USER', '%d번 사용ìžì¸ %s(ì„)를 삭제하게 ë©ë‹ˆë‹¤. ê³„ì† í•˜ì‹œê² ìŠµë‹ˆê¹Œ? ì´ ì‚¬ìš©ìžê°€ 작성한 ê¸€ì´ ë” ì´ìƒ 외부 페ì´ì§€ì— 나타나지 않게 ë©ë‹ˆë‹¤.'); +@define('DELETED_USER', '%d번 사용ìžì¸ %s(ì´)ê°€ ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('LIMIT_TO_NUMBER', '몇 ê°œì˜ ì•„ì´í…œì„ 표시하겠습니까?'); @define('ENTRIES_PER_PAGE', '한 페ì´ì§€ì— 표시할 글'); @define('XML_IMAGE_TO_DISPLAY', 'XML 버튼'); -@define('XML_IMAGE_TO_DISPLAY_DESC','XML í”¼ë“œì— ì´ ê·¸ë¦¼ì´ ë‚˜íƒ€ë‚©ë‹ˆë‹¤. 비운 ìƒíƒœë©´ 기본 ê·¸ë¦¼ì´ ë³´ì´ê³  \'none\'ì„ ìž…ë ¥í•˜ë©´ 나타나지 않습니다.'); +@define('XML_IMAGE_TO_DISPLAY_DESC','XML í”¼ë“œì— ì´ ê·¸ë¦¼ì´ ë‚˜íƒ€ë‚©ë‹ˆë‹¤. 비운 ìƒíƒœë©´ 기본 ê·¸ë¦¼ì´ ë³´ì´ê³  \'ì—†ìŒ\'ì„ ìž…ë ¥í•˜ë©´ 나타나지 않습니다.'); @define('DIRECTORIES_AVAILABLE', '하위 디렉토리 목ë¡ì—서 디렉토리 ì´ë¦„ì„ ëˆ„ë¥´ë©´ ê·¸ 디렉토리 ì•ˆì— ìƒˆ 디렉토리를 만들 수 있습니다.'); @define('ALL_DIRECTORIES', '모든 디렉토리'); @@ -320,8 +320,8 @@ @define('PARENT_DIRECTORY', 'ìƒìœ„ 디렉토리'); @define('CONFIRM_DELETE_DIRECTORY', '디렉토리 %sì— í¬í•¨ëœ 모든 ë‚´ìš©ì„ ì‚­ì œí•˜ê² ìŠµë‹ˆê¹Œ?'); @define('ERROR_NO_DIRECTORY', '오류: 디렉토리 %s(ì´)ê°€ 존재하지 않습니다'); -@define('CHECKING_DIRECTORY', '디렉토리 %s ë‚´ì˜ íŒŒì¼ ì ê²€ì¤‘'); -@define('DELETING_FILE', 'íŒŒì¼ %s 삭제중...'); +@define('CHECKING_DIRECTORY', '디렉토리 %s ë‚´ì˜ íŒŒì¼ ì ê²€ 중'); +@define('DELETING_FILE', 'íŒŒì¼ %s ì‚­ì œ 중...'); @define('ERROR_DIRECTORY_NOT_EMPTY', '비어 있지 ì•Šì€ ë””ë ‰í† ë¦¬ë¥¼ 삭제할 수 없습니다. 남아있는 파ì¼ë„ 제거하려면 "ê°•ì œ ì‚­ì œ"를 ì²´í¬í•˜ê³  다시 시ë„하십시오. 남아있는 파ì¼ì€:'); @define('DIRECTORY_DELETE_FAILED', '디렉토리 %s ì‚­ì œì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. 권한 설정ì´ë‚˜ ìœ„ì˜ ë©”ì‹œì§€ë¥¼ 확ì¸í•˜ì‹­ì‹œì˜¤.'); @define('DIRECTORY_DELETE_SUCCESS', '디렉토리 %s(ì´)ê°€ 성공ì ìœ¼ë¡œ ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤.'); @@ -334,10 +334,10 @@ @define('TOP_LEVEL', '최ìƒìœ„ (본문)'); @define('SYNDICATION_PLUGIN_GENERIC_FEED', '%s 피드'); @define('PERMISSIONS', '권한 설정'); -@define('INTEGRITY', 'Verify Installation Integrity'); -@define('CHECKSUMS_NOT_FOUND', 'Unable to compare checksums! (No checksums.inc.php in main directory)'); -@define('CHECKSUMS_PASS', 'All required files verified.'); -@define('CHECKSUM_FAILED', '%s corrupt or modified: failed verification'); +@define('INTEGRITY', '설치ìƒíƒœ 무결성 ê²€ì¦'); +@define('CHECKSUMS_NOT_FOUND', 'ì²´í¬ì„¬ì„ 비êµí•˜ì§€ 못했습니다! (ë©”ì¸ ë””ë ‰í† ë¦¬ì— checksums.inc.php 파ì¼ì´ ì—†ìŒ)'); +@define('CHECKSUMS_PASS', '필수 파ì¼ì´ ëª¨ë‘ ê²€ì¦ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('CHECKSUM_FAILED', '%s 파ì¼ì´ ì†ìƒë˜ê±°ë‚˜ 수정ë˜ì—ˆìŠµë‹ˆë‹¤: ê²€ì¦ ì‹¤íŒ¨'); @define('SETTINGS_SAVED_AT', '새로운 ì„¤ì •ì´ %sì— ì €ìž¥ë˜ì—ˆìŠµë‹ˆë‹¤'); /* DATABASE SETTINGS */ @@ -358,19 +358,19 @@ /* PATHS */ @define('INSTALL_CAT_PATHS', '경로'); -@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 ë° íŒŒì¼ì— 대한 경로를 지정합니다. 디렉토리 ëì— ìŠ¬ëž˜ì‹œ 추가하는 ê²ƒì„ ìžŠì§€ 마십시오.'); +@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 ë° íŒŒì¼ì— 대한 경로를 지정합니다. 디렉토리 ëì— ìŠ¬ëž˜ì‹œ(/) 추가하는 ê²ƒì„ ìžŠì§€ 마십시오.'); @define('INSTALL_FULLPATH', 'ì „ì²´ 경로'); -@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 ìœ„ì¹˜ì˜ ì ˆëŒ€ 경로'); +@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 ìœ„ì¹˜ì˜ ì ˆëŒ€ì ì´ê³  ì „ì²´ì ì¸ 경로'); @define('INSTALL_UPLOADPATH', '업로드 경로'); -@define('INSTALL_UPLOADPATH_DESC', 'ì—…ë¡œë“œëœ íŒŒì¼ì´ 저장ë˜ëŠ” ìœ„ì¹˜ë¡œì¨ \'ì „ì²´ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로임 - ì¼ë°˜ì ìœ¼ë¡œ \'uploads/\''); +@define('INSTALL_UPLOADPATH_DESC', 'ì—…ë¡œë“œëœ íŒŒì¼ì´ 저장ë˜ëŠ” 위치로서 \'ì „ì²´ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로 - ì¼ë°˜ì ìœ¼ë¡œ \'uploads/\''); @define('INSTALL_RELPATH', 'ìƒëŒ€ 경로'); -@define('INSTALL_RELPATH_DESC', '브ë¼ìš°ì €ì— 나타날 ì„¸ë Œë””í”¼í‹°ì˜ ê²½ë¡œìž„ - ì¼ë°˜ì ìœ¼ë¡œ \'/serendipity/\''); +@define('INSTALL_RELPATH_DESC', '브ë¼ìš°ì €ì— 나타날 ì„¸ë Œë””í”¼í‹°ì˜ ê²½ë¡œ - ì¼ë°˜ì ìœ¼ë¡œ \'/serendipity/\''); @define('INSTALL_RELTEMPLPATH', '템플릿 ìƒëŒ€ 경로'); -@define('INSTALL_RELTEMPLPATH_DESC', 'í…œí”Œë¦¿ì´ ì €ìž¥ëœ ë””ë ‰í† ë¦¬ì˜ ê²½ë¡œë¡œì¨ \'ìƒëŒ€ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로임'); +@define('INSTALL_RELTEMPLPATH_DESC', 'í…œí”Œë¦¿ì´ ì €ìž¥ëœ ë””ë ‰í† ë¦¬ì˜ ê²½ë¡œë¡œì„œ \'ìƒëŒ€ 경로\'를 기준으로 한 ìƒëŒ€ 경로'); @define('INSTALL_RELUPLOADPATH', '업로드 ìƒëŒ€ 경로'); -@define('INSTALL_RELUPLOADPATH_DESC', '브ë¼ìš°ì €ì— 나타날 업로드 ê²½ë¡œë¡œì¨ \'ìƒëŒ€ 경로\'ì— ëŒ€í•œ ìƒëŒ€ 경로임'); +@define('INSTALL_RELUPLOADPATH_DESC', '브ë¼ìš°ì €ì— 나타날 업로드 경로로서 \'ìƒëŒ€ 경로\'를 기준으로 한 ìƒëŒ€ 경로'); @define('INSTALL_URL', '블로그 주소'); -@define('INSTALL_URL_DESC', '세렌디피티 설치가 ëœ ê¸°ë³¸ ì¸í„°ë„· 주소'); +@define('INSTALL_URL_DESC', '세렌디피티가 ì„¤ì¹˜ëœ ê¸°ë³¸ ì¸í„°ë„· 주소(URL)'); @define('INSTALL_INDEXFILE', 'ì¸ë±ìФ 파ì¼'); @define('INSTALL_INDEXFILE_DESC', '세렌디피티 ì¸ë±ìФ 파ì¼ì˜ ì´ë¦„'); @@ -390,13 +390,13 @@ @define('INSTALL_BLOGNAME', '블로그 ì´ë¦„'); @define('INSTALL_BLOGNAME_DESC', 'ë¸”ë¡œê·¸ì— ì‚¬ìš©í•  제목'); @define('INSTALL_BLOGDESC', '블로그 설명'); -@define('INSTALL_BLOGDESC_DESC', 'ë¸”ë¡œê·¸ì˜ ë‚´ìš©ì„ ì ìŒ'); +@define('INSTALL_BLOGDESC_DESC', '블로그를 설명하는 ë‚´ìš©ì„ ì ìŒ'); @define('INSTALL_LANG', '언어'); @define('INSTALL_LANG_DESC', 'ë¸”ë¡œê·¸ì— ì‚¬ìš©í•  언어 ì„ íƒ'); /* APPEARANCE AND OPTIONS */ -@define('INSTALL_CAT_DISPLAY', '시ê°ì  요소 ë° ì˜µì…˜'); -@define('INSTALL_CAT_DISPLAY_DESC', 'ì„¸ë Œë””í”¼í‹°ì˜ ì§ê´€ì ì¸ 모습과 ëŠë‚Œì„ 정합니다.'); +@define('INSTALL_CAT_DISPLAY', '외관 ë° ì„ íƒì‚¬í•­'); +@define('INSTALL_CAT_DISPLAY_DESC', 'ì„¸ë Œë””í”¼í‹°ì˜ ê²‰ëª¨ìŠµê³¼ ì¸ìƒì„ 정합니다.'); @define('INSTALL_WYSIWYG', 'WYSIWYG 편집기 사용'); @define('INSTALL_WYSIWYG_DESC', 'WYSIWYG 편집기를 사용하겠습니까? (ì¸í„°ë„· ìµìŠ¤í”Œë¡œëŸ¬ 5 ì´ìƒì—서 ìž‘ë™, ëª¨ì§ˆë¼ 1.3 ì´ìƒì—서 부분 ìž‘ë™)'); @define('INSTALL_XHTML11', 'XHTML 1.1 ê·œê²©ì„ ê°•ì œë¡œ 따름'); @@ -406,31 +406,31 @@ @define('INSTALL_EMBED', '세렌디피티가 ë‚´ìž¥ëœ í˜•íƒœìž…ë‹ˆê¹Œ?'); @define('INSTALL_EMBED_DESC', 'ì¼ë°˜ 페ì´ì§€ ì†ì— 세렌디피티를 내장시키려면 "예"를 ì„ íƒí•˜ì—¬ í—¤ë”ê°€ ì œì™¸ëœ ë‚´ìš© 부분만 출력시키게 합니다. indexFile ì˜µì…˜ì„ ì‚¬ìš©í•˜ì—¬ ì¼ë°˜ì ì¸ 웹페ì´ì§€ í—¤ë”ì— wrapper í´ëž˜ìŠ¤ë¥¼ ì ìš©í•  수 있습니다. 보다 ìžì„¸í•œ ì‚¬í•­ì€ README 파ì¼ì„ 참조하십시오.'); @define('INSTALL_TOP_AS_LINKS', 'ìƒìœ„ ì§„ì¶œ/ì§„ìž… ì‚¬í•­ì„ ë§í¬ë¡œ 표시'); -@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•˜ê¸° 위해 ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì„ ì¼ë°˜ 글로 표시합니다. "예": ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì— ë§í¬ë¥¼ ê²ë‹ˆë‹¤. "기본값": ì  ì²´ ì„¤ì •ì— ë”°ë¦…ë‹ˆë‹¤(추천).'); -@define('INSTALL_BLOCKREF', 'ì§„ìž… 표시 통제'); -@define('INSTALL_BLOCKREF_DESC', 'ì§„ìž… ì‚¬í•­ì— í‘œì‹œë˜ì§€ 않았으면 하는 호스트가 ìžˆì„ ê²½ìš° ê° í˜¸ìŠ¤íŠ¸ë¥¼ \';\'로 분리해서 입력합니다. 표시 통제는 부분 ê²€ìƒ‰ì„ ì‚¬ìš©í•©ë‹ˆë‹¤(지정한 ì´ë¦„ì´ í˜¸ìŠ¤íŠ¸ì˜ ì¼ë¶€ì¼ 경우 통제ë¨).'); -@define('INSTALL_REWRITE', '주소 재기ë¡'); -@define('INSTALL_REWRITE_DESC', '주소 ìƒì„±ì‹œ 사용할 ê·œì¹™ì„ ì •í•©ë‹ˆë‹¤. ìž¬ê¸°ë¡ ê·œì¹™ì„ í™œì„±í™”ì‹œí‚¤ë©´ ë¸”ë¡œê·¸ì— ëŒ€í•œ 주소가 ê¹”ë”해지고 구글과 ê°™ì€ ê²€ìƒ‰ì—”ì§„ì— ì˜í•´ ì¸ë±ì‹±ì´ 잘 ë©ë‹ˆë‹¤. 웹서버가 세렌디피티 ë””ë ‰í† ë¦¬ì— ëŒ€í•´ mod_rewrite나 "AllowOverride All"ì„ ì§€ì›í•´ì•¼ 합니다. 기본 ì„¤ì •ì€ ìžë™ 검출ë©ë‹ˆë‹¤.'); +@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•˜ê¸° 위해 ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì„ ì¼ë°˜ 글로 표시합니다. "예": ì§„ì¶œ ë° ì§„ìž… ì‚¬í•­ì— ë§í¬ë¥¼ ê²ë‹ˆë‹¤. "기본값": ì „ì²´ ì„¤ì •ì— ë”°ë¦…ë‹ˆë‹¤(추천).'); +@define('INSTALL_BLOCKREF', 'ì°¨ë‹¨ëœ ì§„ìž… 경로'); +@define('INSTALL_BLOCKREF_DESC', 'ì§„ìž… ì‚¬í•­ì— í‘œì‹œë˜ì§€ 않았으면 하는 호스트가 ìžˆì„ ê²½ìš° ê° í˜¸ìŠ¤íŠ¸ë¥¼ \';\'로 분리해서 입력합니다. ê¸€ìž ì¼ë¶€ë¶„ì´ ì¼ì¹˜í•´ë„ 차단ë¨ì— 유ì˜í•˜ì‹­ì‹œì˜¤(지정한 ì´ë¦„ì´ í˜¸ìŠ¤íŠ¸ì˜ ì¼ë¶€ì¼ 경우 차단ë¨).'); +@define('INSTALL_REWRITE', 'ì¸í„°ë„· 주소(URL) 재작성'); +@define('INSTALL_REWRITE_DESC', 'ì¸í„°ë„· 주소 ìƒì„±ì‹œ 사용할 ê·œì¹™ì„ ì •í•©ë‹ˆë‹¤. 재작성 ê·œì¹™ì„ í™œì„±í™”ì‹œí‚¤ë©´ ë¸”ë¡œê·¸ì— ëŒ€í•œ 주소가 ê¹”ë”해지고 구글과 ê°™ì€ ê²€ìƒ‰ì—”ì§„ì— ì˜í•´ ì¸ë±ì‹±ì´ 잘 ë©ë‹ˆë‹¤. 웹서버가 세렌디피티 ë””ë ‰í† ë¦¬ì— ëŒ€í•´ mod_rewrite나 "AllowOverride All"ì„ ì§€ì›í•´ì•¼ 합니다. 기본 ì„¤ì •ì€ ìžë™ ì¸ì‹ë©ë‹ˆë‹¤.'); /* IMAGECONVERSION SETTINGS */ @define('INSTALL_CAT_IMAGECONV', '그림 변환 설정'); @define('INSTALL_CAT_IMAGECONV_DESC', '세렌디피티가 ê·¸ë¦¼ì„ ì–´ë–»ê²Œ ë‹¤ë£°ì§€ì— ëŒ€í•œ 정보를 입력합니다.'); @define('INSTALL_IMAGEMAGICK', 'ImageMagick 사용하기'); -@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagickì´ ì„¤ì¹˜ë˜ì–´ 있으며 그림 í¬ê¸°ë¥¼ ì¡°ì ˆí•˜ëŠ”ë° ì‚¬ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'); +@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagickì´ ì„¤ì¹˜ë˜ì–´ 있으며 ì´ë¥¼ 그림 í¬ê¸° ì¡°ì ˆì— ì‚¬ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'); @define('INSTALL_IMAGEMAGICKPATH', '변환 ë°”ì´ë„ˆë¦¬ 경로'); -@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagickì˜ ë³€í™˜ ë°”ì´ë„ˆë¦¬(프로그램)ì˜ ì´ë¦„ ë° ì „ì²´ 경로'); +@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagick 변환 ë°”ì´ë„ˆë¦¬(프로그램)ì˜ ì´ë¦„ ë° ì „ì²´ 경로'); @define('INSTALL_THUMBSUFFIX', 'ìž‘ì€ ê·¸ë¦¼ ì ‘ë‘사'); @define('INSTALL_THUMBSUFFIX_DESC', 'ìž‘ì€ ê·¸ë¦¼ì€ ì›ëž˜ì´ë¦„.[ì ‘ë‘사].í™•ìž¥ìž ì‹ì˜ ì´ë¦„으로 ìƒì„±ë©ë‹ˆë‹¤'); -@define('INSTALL_THUMBWIDTH', 'ìž‘ì€ ê·¸ë¦¼ í¬ê¸°'); +@define('INSTALL_THUMBWIDTH', 'ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸°'); @define('INSTALL_THUMBWIDTH_DESC', 'ìžë™ ìƒì„±ë˜ëŠ” ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸°'); -@define('INSTALL_THUMBDIM', 'Thumbnail constrained dimension'); -@define('INSTALL_THUMBDIM_LARGEST', 'Largest'); -@define('INSTALL_THUMBDIM_WIDTH', 'Width'); -@define('INSTALL_THUMBDIM_HEIGHT', 'Height'); -@define('INSTALL_THUMBDIM_DESC', 'Dimension to be constrained to the thumbnail max size. The default "' . - INSTALL_THUMBDIM_LARGEST . '" limits both dimensions, so neither can be greater than the max size; "' . - INSTALL_THUMBDIM_WIDTH . '" and "' . INSTALL_THUMBDIM_HEIGHT . - '" only limit the chosen dimension, so the other could be larger than the max size.'); +@define('INSTALL_THUMBDIM', 'ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸° 제약 기준'); +@define('INSTALL_THUMBDIM_LARGEST', 'ì–‘ë°©í–¥ 모ë‘'); +@define('INSTALL_THUMBDIM_WIDTH', 'í­'); +@define('INSTALL_THUMBDIM_HEIGHT', '높ì´'); +@define('INSTALL_THUMBDIM_DESC', 'ìž‘ì€ ê·¸ë¦¼ì˜ ìµœëŒ€ í¬ê¸°ë¥¼ 정하기 위한 ì œì•½ì˜ ê¸°ì¤€. ê¸°ë³¸ê°’ì¸ "' . + INSTALL_THUMBDIM_LARGEST . '" ì„ íƒ ì‹œ í­ê³¼ 높ì´ë¥¼ ëª¨ë‘ ì œí•œí•˜ë¯€ë¡œ ì–´ëŠ ìª½ë„ ìµœëŒ€ í¬ê¸°ë¥¼ 초과할 수 없으며 "' . + INSTALL_THUMBDIM_WIDTH . '"ê³¼ "' . INSTALL_THUMBDIM_HEIGHT . + '"는 ì„ íƒëœ 방향으로만 제한하므로 다른 한 ë°©í–¥ì€ ìµœëŒ€ í¬ê¸°ë³´ë‹¤ í´ ìˆ˜ 있습니다.'); /* Personal details */ @define('USERCONF_CAT_PERSONAL', '사용ìžì˜ ê°œì¸ ì •ë³´'); @@ -449,7 +449,7 @@ @define('USERCONF_ALLOWPUBLISH_DESC', 'ì´ ì‚¬ìš©ìžê°€ ê¸€ì„ ìž‘ì„±í•  ê¶Œí•œì´ ìžˆìŠµë‹ˆê¹Œ?'); @define('SUCCESS', '성공'); @define('POWERED_BY_SHOW_TEXT', '"세렌디피티"를 í…스트로 출력'); -@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웨블로그"를 í…스트로 출력함'); +@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웹로그"를 í…스트로 출력함'); @define('POWERED_BY_SHOW_IMAGE', '"세렌디피티"를 로고로 출력'); @define('POWERED_BY_SHOW_IMAGE_DESC', '세렌디피티 로고를 보여줌'); @define('PLUGIN_ITEM_DISPLAY', 'ì•„ì´í…œì´ ì–´ë””ì— í‘œì‹œë©ë‹ˆê¹Œ?'); @@ -481,7 +481,7 @@ @define('PLUGIN_SUPERUSER_HTTPS', '로그ì¸ì— https 사용'); @define('PLUGIN_SUPERUSER_HTTPS_DESC', 'ë¡œê·¸ì¸ ë§í¬ê°€ https 위치로 향하ë„ë¡ í•©ë‹ˆë‹¤. 웹서버가 ì´ ê¸°ëŠ¥ì„ ì§€ì›í•´ì•¼ 합니다.'); @define('INSTALL_SHOW_EXTERNAL_LINKS', '외부 ë§í¬ë¥¼ í´ë¦­í•  수 있게 하기'); -@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬(ìƒìœ„ ì§„ì¶œ, ìƒìœ„ ì§„ìž…, ì‚¬ìš©ìž ë§ê¸€)는 보여지지 않거나 ì¼ë°˜ í…스트로 표시ë˜ì–´ 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•©ë‹ˆë‹¤(추천). "예": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬ê°€ 하ì´í¼ë§í¬ë¡œ 걸립니다. 옆줄 í”ŒëŸ¬ê·¸ì¸ ì„¤ì •ì—서 별ë„로 ì •í•  수 있습니다.'); +@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬(ìƒìœ„ ì§„ì¶œ, ìƒìœ„ ì§„ìž…, ì‚¬ìš©ìž ë§ê¸€)는 보여지지 않거나 ì¼ë°˜ í…스트로 표시ë˜ì–´ 구글 ìŠ¤íŒ¸ì„ ë°©ì§€í•©ë‹ˆë‹¤(추천). "예": 확ì¸ë˜ì§€ ì•Šì€ ì™¸ë¶€ ë§í¬ê°€ 하ì´í¼ë§í¬ë¡œ 나타납니다. 옆줄 í”ŒëŸ¬ê·¸ì¸ ì„¤ì •ì—서 별ë„로 ì •í•  수 있습니다.'); @define('PAGE_BROWSE_COMMENTS', '%s번째 페ì´ì§€ | ì´ %s 페ì´ì§€ | ì´ %sê°œ ë§ê¸€'); @define('FILTERS', 'í•„í„°'); @define('FIND_ENTRIES', '글 찾기'); @@ -489,7 +489,7 @@ @define('FIND_MEDIA', '미디어 찾기'); @define('FILTER_DIRECTORY', '디렉토리'); @define('SORT_BY', 'ì •ë ¬ 순서'); -@define('TRACKBACK_COULD_NOT_CONNECT', 'íŠ¸ëž™ë°±ì´ ë³´ë‚´ì§€ì§€ 않ìŒ: %sì— ëŒ€í•´ì„œ í¬íЏ %dì—서 ì—´ 수 없었ìŒ'); +@define('TRACKBACK_COULD_NOT_CONNECT', 'íŠ¸ëž™ë°±ì´ ë³´ë‚´ì§€ì§€ 않ìŒ: %s애서 %d번 í¬íŠ¸ë¥¼ ì—´ 수 없었ìŒ'); @define('MEDIA', '미디어'); @define('MEDIA_LIBRARY', '미디어 보관함'); @define('ADD_MEDIA', '미디어 추가'); @@ -525,10 +525,10 @@ @define('TRACKBACK_SENT', '트랙백 성공'); @define('TRACKBACK_FAILED', '트랙백 실패: %s'); @define('TRACKBACK_NOT_FOUND', '트랙백 URI를 찾지 못했습니다.'); -@define('TRACKBACK_URI_MISMATCH', 'ìžë™ ê²€ìƒ‰ëœ íŠ¸ëž™ë°± URI는 목표 URI와 ë§žì§€ 않습니다.'); +@define('TRACKBACK_URI_MISMATCH', 'ìžë™ ê²€ìƒ‰ëœ íŠ¸ëž™ë°± URI는 ëŒ€ìƒ URI와 ë§žì§€ 않습니다.'); @define('TRACKBACK_CHECKING', 'íŠ¸ëž™ë°±ì´ ìžˆëŠ”ì§€ %s 확ì¸ì¤‘...'); -@define('TRACKBACK_NO_DATA', '목표가 ë°ì´í„°ë¥¼ ë‹´ê³  있지 않습니다.'); -@define('TRACKBACK_SIZE', '목표 URIê°€ 최개 íŒŒì¼ í¬ê¸°ì¸ %s ë°”ì´íŠ¸ë¥¼ 초과합니다.'); +@define('TRACKBACK_NO_DATA', '대ìƒì´ ë°ì´í„°ë¥¼ ë‹´ê³  있지 않습니다.'); +@define('TRACKBACK_SIZE', 'ëŒ€ìƒ URIê°€ 최대 íŒŒì¼ í¬ê¸°ì¸ %s ë°”ì´íŠ¸ë¥¼ 초과합니다.'); @define('COMMENTS_VIEWMODE_THREADED', 'ì—®ì€ í˜•íƒœ'); @define('COMMENTS_VIEWMODE_LINEAR', '나열 형태'); @define('DISPLAY_COMMENTS_AS', 'ë§ê¸€ 표시 ë°©ì‹:'); @@ -543,7 +543,7 @@ @define('MONTHS', 'ì›”'); @define('DAYS', 'ì¼'); @define('ARCHIVE_FREQUENCY', '표시 ì•„ì´í…œì˜ 주기'); -@define('ARCHIVE_FREQUENCY_DESC', '목ë¡ì— 있는 ê° ì•„ì´í…œì˜ 달력 ìƒì˜ 주기 단위'); +@define('ARCHIVE_FREQUENCY_DESC', '목ë¡ì— 있는 ê° ì•„ì´í…œì˜ 달력 ìƒ ì£¼ê¸° 단위'); @define('ARCHIVE_COUNT', '목ë¡ì— í‘œì‹œë  ì•„ì´í…œ 수'); @define('ARCHIVE_COUNT_DESC', '표시할 달, 주, ë˜ëŠ” ë‚ ì˜ ì´ ê°œìˆ˜'); @define('BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS', 'ì„¤ì¹˜ëœ í”ŒëŸ¬ê·¸ì¸ì˜ 목ë¡ìž…니다.'); @@ -555,9 +555,11 @@ @define('ALREADY_INSTALLED', 'ì´ë¯¸ 설치ë¨'); @define('SELECT_A_PLUGIN_TO_ADD', '설치하고 ì‹¶ì€ í”ŒëŸ¬ê·¸ì¸ì„ ì„ íƒí•˜ì‹­ì‹œì˜¤.'); @define('INSTALL_OFFSET', '서버 ì‹œê°„ê³¼ì˜ ì‹œê°„ ì°¨ì´'); +@define('INSTALL_OFFSET_ON_SERVER_TIME', '서버 시간대를 기준으로 ì°¨ì´ë¥¼ 설정합니까?'); +@define('INSTALL_OFFSET_ON_SERVER_TIME_DESC', '서버 시간대를 기준으로 ê¸€ì˜ í‘œì‹œ 시간 ì°¨ì´ë¥¼ ì„¤ì •í• ì§€ì˜ ì—¬ë¶€ë¥¼ 정합니다. 예를 고르면 서버 시간대를 기준으로 하고 아니오를 고르면 GMT를 기준으로 합니다.'); @define('STICKY_POSTINGS', 'ê¼­ëŒ€ê¸°ì— í‘œì‹œí•  글'); @define('INSTALL_FETCHLIMIT', '한 페ì´ì§€ì— 표시할 글 수'); -@define('INSTALL_FETCHLIMIT_DESC', 'ì¼ë°˜ 페ì´ì§€ ê°ê°ì— 표시할 ê¸€ì˜ ìˆ˜'); +@define('INSTALL_FETCHLIMIT_DESC', 'ê° ì™¸ë¶€ 페ì´ì§€ì— 표시할 ê¸€ì˜ ìˆ˜'); @define('IMPORT_ENTRIES', 'ë°ì´í„° 불러오기'); @define('EXPORT_ENTRIES', '글 내보내기'); @define('IMPORT_WELCOME', 'ì„¸ë Œë””í”¼í‹°ì˜ ë°ì´í„° 불러오기 유틸리티입니다'); @@ -576,13 +578,13 @@ @define('ACTIVATE_AUTODISCOVERY', '글 ì†ì— ë°œê²¬ëœ ë§í¬ë¡œ íŠ¸ëž™ë°±ì„ ë³´ëƒ„'); @define('WELCOME_TO_ADMIN', '세렌디피티 관리 ë„êµ¬ì— ì˜¤ì‹  ê²ƒì„ í™˜ì˜í•©ë‹ˆë‹¤.'); @define('PLEASE_ENTER_CREDENTIALS', 'ì¸ì¦ 정보를 ì•„ëž˜ì— ìž…ë ¥í•˜ì‹­ì‹œì˜¤.'); -@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s ë° PHP %s로 작성ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s ë° PHP %s(으)로 작성ë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('INSTALL_USEGZIP', 'Gzip ì••ì¶• 페ì´ì§€ 사용'); -@define('INSTALL_USEGZIP_DESC', '페ì´ì§€ 전송 ì†ë„를 í–¥ìƒì‹œí‚¤ê¸° 위해, 사용ìžì˜ 브ë¼ìš°ì €ê°€ 기능 ì§€ì›ì„ í•  경우 페ì´ì§€ë¥¼ 압축해서 전송할 수 있습니다. 추천 사항입니다.'); +@define('INSTALL_USEGZIP_DESC', '사용ìžì˜ 브ë¼ìš°ì €ê°€ ì§€ì›ì„ í•  경우 페ì´ì§€ 전송 ì†ë„를 í–¥ìƒì‹œí‚¤ê¸° 위해 페ì´ì§€ë¥¼ 압축해서 전송할 수 있습니다. 추천 사항입니다.'); @define('INSTALL_SHOWFUTURE', 'ë¯¸ëž˜ì— ìž‘ì„±í•œ 글 ë³´ì´ê¸°'); @define('INSTALL_SHOWFUTURE_DESC', 'ì´ ê¸°ëŠ¥ì„ ì‚¬ìš©í•  경우 작성 날짜가 ë¯¸ëž˜ì¸ ê¸€ë„ ëª¨ë‘ ë¸”ë¡œê·¸ì— í‘œì‹œí•˜ê²Œ ë©ë‹ˆë‹¤. ê¸°ë³¸ê°’ì€ ì´ëŸ¬í•œ ê¸€ì„ ìž‘ì„± 날짜가 다다를 때까지 숨기는 것입니다.'); @define('INSTALL_DBPERSISTENT', 'ì§€ì†ì ì¸ ì ‘ì† ì‚¬ìš©'); -@define('INSTALL_DBPERSISTENT_DESC', 'ì§€ì†ì ìœ¼ë¡œ ë°ì´í„°íŽ˜ì´ìŠ¤ì— ì ‘ì†í•˜ëŠ” ê¸°ëŠ¥ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. 여기ì—서 ìžì„¸í•œ 정보를 ì½ì„ 수 있습니다. ì¼ë°˜ì ìœ¼ë¡œ 비추천 사항입니다.'); +@define('INSTALL_DBPERSISTENT_DESC', 'ì§€ì†ì ìœ¼ë¡œ ë°ì´í„°íŽ˜ì´ìŠ¤ì— ì ‘ì†í•˜ëŠ” ê¸°ëŠ¥ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. 여기ì—서 ìžì„¸í•œ 정보를 ì½ì„ 수 있습니다. ì¼ë°˜ì ìœ¼ë¡œ 추천하지 않습니다.'); @define('NO_IMAGES_FOUND', 'ê·¸ë¦¼ì´ ì—†ìŠµë‹ˆë‹¤'); @define('PERSONAL_SETTINGS', 'ê°œì¸ ì„¤ì •'); @define('REFERER', 'ì§„ìž… 경로'); @@ -606,7 +608,7 @@ @define('THEY_DONT', '그렇지 않ìŒ'); @define('SIMPLE_INSTALLATION', '간단한 설치'); @define('EXPERT_INSTALLATION', '전문가 설치'); -@define('COMPLETE_INSTALLATION', '설치 ë내기'); +@define('COMPLETE_INSTALLATION', '설치 완료하기'); @define('WONT_INSTALL_DB_AGAIN', 'ë°ì´í„°ë² ì´ìŠ¤ë¥¼ 다시 설치하지 않습니다'); @define('CHECK_DATABASE_EXISTS', 'ë°ì´í„°ë² ì´ìФ ë° í…Œì´ë¸”ì´ ì´ë¯¸ 존재하는지 확ì¸í•©ë‹ˆë‹¤'); @define('CREATING_PRIMARY_AUTHOR', '기본 ìž‘ì„±ìž \'%s\' ìƒì„±ì¤‘'); @@ -629,26 +631,26 @@ @define('PROBLEM_PERMISSIONS_HOWTO', '권한 ì„¤ì •ì€ ë¬¸ì œê°€ ë°œìƒí•œ ë””ë ‰í† ë¦¬ì— ëŒ€í•´ 쉘 명령어 `%s`를 실행하거나 FTP í”„ë¡œê·¸ëž¨ì„ í†µí•´ ì´ë¥¼ ì„¤ì •í•¨ìœ¼ë¡œì¨ ë°”ë¡œìž¡ì„ ìˆ˜ 있습니다.'); @define('WARNING_TEMPLATE_DEPRECATED', '경고: ì‚¬ìš©ì¤‘ì¸ í…œí”Œë¦¿ì´ êµ¬ì‹ í…œí”Œë¦¿ ë°©ì‹ì„ 사용하고 있습니다. 가능하다면 ì—…ë°ì´íЏ 하십시오.'); @define('ENTRY_PUBLISHED_FUTURE', 'ì´ ê¸€ì€ ì•„ì§ ê²Œì‹œë˜ì§€ 않았습니다.'); -@define('ENTRIES_BY', '%sì— ì˜í•œ 글'); +@define('ENTRIES_BY', '%sì˜ ê¸€'); @define('PREVIOUS', 'ì´ì „'); @define('NEXT', '다ìŒ'); @define('APPROVE', '승ì¸'); @define('DO_MARKUP_DESCRIPTION', 'í…ìŠ¤íŠ¸ì— ë§ˆí¬ì—… 변환(ì´ëª¨í‹°ì½˜, *, /, _ ë“±ì„ í™œìš©í•œ 마í¬ì—…)ì„ ì ìš©í•©ë‹ˆë‹¤. 사용하지 않으면 입력한 HTML 코드가 ëª¨ë‘ ë³´ì¡´ë©ë‹ˆë‹¤.'); @define('CATEGORY_ALREADY_EXIST', '"%s"(ì´)ë¼ëŠ” 범주가 ì´ë¯¸ 존재합니다.'); -@define('ERROR_FILE_FORBIDDEN', '액티브 컨í…츠가 담긴 파ì¼ì„ 업로드할 수 없습니다.'); +@define('ERROR_FILE_FORBIDDEN', '사용 ì¤‘ì¸ ë‚´ìš©ì´ ë‹´ê¸´ 파ì¼ì„ 업로드할 수 없습니다.'); @define('ADMIN', '관리 사항'); @define('ADMIN_FRONTPAGE', '기본 페ì´ì§€'); @define('QUOTE', 'ì¸ìš©'); @define('IFRAME_SAVE', '세렌디피티가 ê¸€ì„ ì €ìž¥í•˜ë©´ì„œ íŠ¸ëž™ë°±ì„ ìƒì„±í•˜ê³  XML-RPC í˜¸ì¶œì„ ìˆ˜í–‰í•˜ëŠ” 중입니다. 약간 ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다.'); @define('IFRAME_SAVE_DRAFT', 'ì´ ê¸€ì˜ ì´ˆì•ˆì´ ì €ìž¥ë˜ì—ˆìŠµë‹ˆë‹¤.'); @define('IFRAME_PREVIEW', '세렌디피티가 미리보기를 ìƒì„±í•˜ê³  있습니다...'); -@define('IFRAME_WARNING', '브ë¼ìš°ì €ê°€ iframesì— ëŒ€í•œ ê°œë…ì„ ì§€ì›í•˜ì§€ 않습니다. serendipity_config.inc.php 파ì¼ì„ 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); +@define('IFRAME_WARNING', '브ë¼ìš°ì €ê°€ iframeì— ëŒ€í•œ ê°œë…ì„ ì§€ì›í•˜ì§€ 않습니다. serendipity_config.inc.php 파ì¼ì„ 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); @define('NONE', 'ì—†ìŒ'); @define('USERCONF_CAT_DEFAULT_NEW_ENTRY', '새 ê¸€ì— ëŒ€í•œ 기본 설정'); @define('UPGRADE', '업그레ì´ë“œ'); @define('UPGRADE_TO_VERSION', '버전 %s(으)로 업그레ì´ë“œ'); @define('DELETE_DIRECTORY', '디렉토리 ì‚­ì œ'); -@define('DELETE_DIRECTORY_DESC', '미디어 파ì¼ì´ 담긴 ë””ë ‰í† ë¦¬ì˜ ë‚´ìš©ì„ ì‚­ì œí•˜ë ¤ê³  합니다. ì´ íŒŒì¼ë“¤ì€ ë³¸ë¬¸ì— ì‚¬ìš©ì¤‘ì¼ ìˆ˜ 있습니다.'); +@define('DELETE_DIRECTORY_DESC', '미디어 파ì¼ì´ 담긴 ë””ë ‰í† ë¦¬ì˜ ë‚´ìš©ì„ ì‚­ì œí•˜ë ¤ê³  합니다. ì´ íŒŒì¼ë“¤ì€ ë³¸ë¬¸ì— ì‚¬ìš© ì¤‘ì¼ ìˆ˜ 있습니다.'); @define('FORCE_DELETE', 'ì´ ë””ë ‰í† ë¦¬ì— ìžˆëŠ” 모든 íŒŒì¼ (세렌디피티가 모르는 종류 í¬í•¨) ì‚­ì œ'); @define('CREATE_DIRECTORY', '디렉토리 ìƒì„±'); @define('CREATE_NEW_DIRECTORY', '새 디렉토리 ìƒì„±'); @@ -664,24 +666,24 @@ @define('RECHECK_INSTALLATION', '설치 ìƒíƒœ ìž¬í™•ì¸ í•„ìš”'); @define('IMAGICK_EXEC_ERROR', '실행할 수 ì—†ìŒ: "%s", 오류: %s, 리턴 변수: %d'); @define('INSTALL_OFFSET_DESC', 'ì›¹ì„œë²„ì˜ ì‹œê°„(현재: %clock%)ê³¼ 사용ìžì˜ ì‹œê°„ëŒ€ì™€ì˜ ì°¨ì´ë¥¼ 시간 단위로 입력함'); -@define('UNMET_REQUIREMENTS', '요구사항 불충족: %s'); +@define('UNMET_REQUIREMENTS', '요구사항 미달: %s'); @define('CHARSET', '문ìžì—´ 종류'); @define('AUTOLANG', '방문ìžì˜ 브ë¼ìš°ì € 언어 ì„¤ì •ì„ ê¸°ë³¸ìœ¼ë¡œ 따름'); @define('AUTOLANG_DESC', '사용할 경우 방문ìžì˜ 브ë¼ìš°ì € 언어 ì„¤ì •ì„ í™•ì¸í•˜ì—¬ í™”ë©´ì— í‘œì‹œë˜ëŠ” 언어 ë° ê¸€ì˜ ì–¸ì–´ë¥¼ 결정합니다.'); @define('INSTALL_AUTODETECT_URL', 'ì‚¬ìš©ëœ HTTP 호스트를 ìžë™ ê°ì§€'); @define('INSTALL_AUTODETECT_URL_DESC', '사용할 경우 방문ìžê°€ 사용한 HTTP 호스트를 세렌디피티가 기본 ì¸í„°ë„· 주소로 쓰게 ë©ë‹ˆë‹¤. ì´ë ‡ê²Œ ë˜ë©´ 세렌디피티 블로그를 여러 ê°œì˜ ë„ë©”ì¸ ì´ë¦„ í•˜ì— ì‚¬ìš©í•  수 있게 ë˜ë©°, 해당 ë„ë©”ì¸ì„ 방문ìžê°€ 블로그를 ë°©ë¬¸í•˜ëŠ”ë° ì‚¬ìš©í•œ 추가 ë§í¬ì— 사용할 수 있게 ë©ë‹ˆë‹¤.'); -@define('CONVERT_HTMLENTITIES', 'HTML 본체 ìžë™ ë³€í™˜ì„ ì‹œë„하겠습니까?'); +@define('CONVERT_HTMLENTITIES', 'HTML 엔티티로 í‘œí˜„ëœ ë¬¸ìžì˜ ìžë™ ë³€í™˜ì„ ì‹œë„하겠습니까?'); @define('EMPTY_SETTING', '"%s"ì— ëŒ€í•œ 유효한 ê°’ì„ ì§€ì •í•˜ì§€ 않았습니다.'); @define('USERCONF_REALNAME', '실제 ì´ë¦„'); -@define('USERCONF_REALNAME_DESC', '작성ìžì˜ 실제 ì´ë¦„으로ì¨, ë…ìžê°€ 보게 ë˜ëŠ” ì´ë¦„입니다.'); +@define('USERCONF_REALNAME_DESC', '작성ìžì˜ 실제 ì´ë¦„으로서, ë…ìžê°€ 보게 ë˜ëŠ” ì´ë¦„입니다.'); @define('HOTLINK_DONE', '파ì¼ì´ í•«ë§í¬ ë˜ì—ˆìŠµë‹ˆë‹¤.
        완료.'); @define('ENTER_MEDIA_URL_METHOD', '불러오기 ë°©ì‹:'); -@define('ADD_MEDIA_BLAHBLAH_NOTE', '주ì˜: 서버ì—서 í•«ë§í¬ë¥¼ 하게 ë  ê²½ìš°, 해당 사ì´íЏì—서 í•«ë§í¬ í—ˆë½ì„ 받아놓거나 ìžì‹ ì˜ 사ì´íŠ¸ì¸ ê²½ìš°ì— ëŒ€í•´ 하기 ë°”ëžë‹ˆë‹¤. í•«ë§í¬ë¥¼ 하게 ë˜ë©´ 외부 ê·¸ë¦¼ì„ ë”°ë¡œ 저장하지 않고 쓸 수 있게 ë©ë‹ˆë‹¤.'); +@define('ADD_MEDIA_BLAHBLAH_NOTE', '주ì˜: 서버ì—서 í•«ë§í¬ 하기는 해당 사ì´íЏì—서 í•«ë§í¬ í—ˆë½ì„ 미리 받아놓거나 ìžì‹ ì˜ 사ì´íŠ¸ì¸ ê²½ìš°ì— ëŒ€í•´ 하기 ë°”ëžë‹ˆë‹¤. í•«ë§í¬ë¥¼ 하게 ë˜ë©´ 외부 ê·¸ë¦¼ì„ ë”°ë¡œ 저장하지 않고 쓸 수 있게 ë©ë‹ˆë‹¤.'); @define('MEDIA_HOTLINKED', 'í•«ë§í¬ ë¨'); @define('FETCH_METHOD_IMAGE', 'ì´ìª½ 서버로 ê·¸ë¦¼ì„ ë‹¤ìš´ë¡œë“œí•˜ê¸°'); @define('FETCH_METHOD_HOTLINK', '서버로 í•«ë§í¬ 걸기'); @define('DELETE_HOTLINK_FILE', '%s(ì´)ë¼ëŠ” í•«ë§í¬ íŒŒì¼ ì‚­ì œë¨'); -@define('SYNDICATION_PLUGIN_SHOW_MAIL', 'ì´ë©”ì¼ ì£¼ì†Œ 표시?'); +@define('SYNDICATION_PLUGIN_SHOW_MAIL', 'ì´ë©”ì¼ ì£¼ì†Œë¥¼ 표시합니까?'); @define('IMAGE_MORE_INPUT', '그림 추가'); @define('BACKEND_TITLE', 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì • í™”ë©´ì— ì¶”ê°€ ì •ë³´ 표시'); @define('BACKEND_TITLE_FOR_NUGGET', 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì • í™”ë©´ì— HTML ë©ì–´ë¦¬ 플러그ì¸ì˜ 설명과 함께 í‘œì‹œë  ë³„ë„ì˜ ë¬¸ìž¥ì„ ì§ì ‘ ì •í•  수 있습니다. ì œëª©ì´ ì—†ëŠ” 여러 ê°œì˜ HTML ë©ì–´ë¦¬ë¥¼ 쓸 경우 ê°ê°ì„ 구별하기 쉽게 ë©ë‹ˆë‹¤.'); @@ -724,18 +726,18 @@ @define('SYNDICATION_PLUGIN_FEEDBURNERID', '피드버너 ì•„ì´ë””'); @define('SYNDICATION_PLUGIN_FEEDBURNERID_DESC', 'ê²Œì‹œí•˜ê³ ìž í•˜ëŠ” í”¼ë“œì˜ ì•„ì´ë””'); @define('SYNDICATION_PLUGIN_FEEDBURNERIMG', '피드버너 그림'); -@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.comì— ì¡´ìž¬í•¨)ì˜ ì´ë¦„ (fbapix.gif 형태ì´ë©°, 비워ë‘ë©´ ì¹´ìš´í„° 표시)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.comì— ìžˆìŒ)ì˜ ì´ë¦„ (fbapix.gif 형태ì´ë©°, 비워ë‘ë©´ ì¹´ìš´í„° 표시)'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE', '피드버너 제목'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE_DESC', '그림 ì˜†ì— í‘œì‹œí•  제목 (ìžˆì„ ê²½ìš°)'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT', '피드버너 그림 설명'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT_DESC', '그림 ìœ„ì— ì»¤ì„œë¥¼ 댈 때 표시할 설명 (ìžˆì„ ê²½ìš°)'); @define('INSTALL_DBPORT', 'ë°ì´í„°ë² ì´ìФ í¬íЏ'); @define('INSTALL_DBPORT_DESC', 'ë°ì´í„°ë² ì´ìФ ì„œë²„ì— ì ‘ì†í•  때 사용하는 í¬íЏ 번호'); -@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', 'ì¼ë°˜ 페ì´ì§€: 외부 서비스'); -@define('PLUGIN_GROUP_FRONTEND_FEATURES', 'ì¼ë°˜ 페ì´ì§€: 부가 기능'); -@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', 'ì¼ë°˜ 페ì´ì§€: 개조 사항'); -@define('PLUGIN_GROUP_FRONTEND_VIEWS', 'ì¼ë°˜ 페ì´ì§€: 표시 ìƒíƒœ'); -@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', 'ì¼ë°˜ 페ì´ì§€: 글 관련'); +@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', '외부 페ì´ì§€: 외부 서비스'); +@define('PLUGIN_GROUP_FRONTEND_FEATURES', '외부 페ì´ì§€: 부가 기능'); +@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', '외부 페ì´ì§€: 개조 사항'); +@define('PLUGIN_GROUP_FRONTEND_VIEWS', '외부 페ì´ì§€: 표시 ìƒíƒœ'); +@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', '외부 페ì´ì§€: 글 관련'); @define('PLUGIN_GROUP_BACKEND_EDITOR', '관리 페ì´ì§€: 편집기'); @define('PLUGIN_GROUP_BACKEND_USERMANAGEMENT', '관리 페ì´ì§€: ì‚¬ìš©ìž ê´€ë¦¬'); @define('PLUGIN_GROUP_BACKEND_METAINFORMATION', '관리 페ì´ì§€: 메타 ì •ë³´'); @@ -780,7 +782,7 @@ @define('CATEGORIES_PARENT_BASE', '하위 범주만 ë³´ì´ê¸°'); @define('CATEGORIES_PARENT_BASE_DESC', 'í•˜ë‚˜ì˜ ìƒìœ„ 범주를 골ë¼ì„œ ê·¸ ì•„ëž˜ì— ìžˆëŠ” 범주만 ë³´ì´ë„ë¡ í•  수 있습니다.'); @define('CATEGORIES_HIDE_PARALLEL', '범주 íŠ¸ë¦¬ì— ì†í•˜ì§€ 않는 범주 숨기기'); -@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 íŠ¸ë¦¬ì— ì†í•´ 있는 범주를 ë³´ì´ì§€ 않게 하려면 ì´ê²ƒì„ 사용하십시오. "ë²”ì£¼ì˜ ì†ì„±/템플릿" 플러그ì¸ì„ ì ìš©í•œ 멀티-블로그와 함께 사용할 때 가장 ì˜ë¯¸ê°€ 있습니다.'); +@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 íŠ¸ë¦¬ì— ì†í•´ 있는 범주를 ë³´ì´ì§€ 않게 하려면 ì´ê²ƒì„ 사용하십시오. "ë²”ì£¼ì˜ ì†ì„±/템플릿" 플러그ì¸ì„ ì ìš©í•œ 멀티블로그와 함께 사용할 때 가장 ì˜ë¯¸ê°€ 있습니다.'); @define('PERMISSION_ADMINIMAGESVIEWOTHERS', 'adminImagesViewOthers: 다른 사용ìžì˜ 미디어 íŒŒì¼ ë³´ê¸°'); @define('CHARSET_NATIVE', '지역 ì „ìš©'); @@ -794,323 +796,330 @@ @define('PERM_DENIED', 'ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'); @define('INSTALL_ACL', 'ë²”ì£¼ì— ëŒ€í•œ ì½ê¸° 권한 ì ìš©'); -@define('INSTALL_ACL_DESC', '사용할 경우, 로그ì¸í•œ 사용ìžê°€ ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ë¥¼ ì½ì„ 때 ê° ë²”ì£¼ì— ëŒ€í•´ 지정한 ì‚¬ìš©ìž ê¶Œí•œ ì„¤ì •ì´ ì ìš©ë©ë‹ˆë‹¤. 사용하지 ì•Šì„ ê²½ìš° ë²”ì£¼ì— ëŒ€í•œ ì½ê¸° ê¶Œí•œì´ ì ìš©ë˜ì§€ 않게 ë˜ì§€ë§Œ 블로그 ì†ë„ê°€ 약간 빨ë¼ì§€ëŠ” 장ì ì´ 있습니다. 그러므로 ë¸”ë¡œê·¸ì— ëŒ€í•œ 다중 ì‚¬ìš©ìž ì½ê¸° ê¶Œí•œì´ í•„ìš” 없다면 ì´ ì„¤ì •ì„ ë„십시오.'); +@define('INSTALL_ACL_DESC', '사용할 경우 로그ì¸í•œ 사용ìžê°€ ë‹¹ì‹ ì˜ ë¸”ë¡œê·¸ë¥¼ ì½ì„ 때 ê° ë²”ì£¼ì— ëŒ€í•´ 지정한 ì‚¬ìš©ìž ê¶Œí•œ ì„¤ì •ì´ ì ìš©ë©ë‹ˆë‹¤. 사용하지 ì•Šì„ ê²½ìš° ë²”ì£¼ì— ëŒ€í•œ ì½ê¸° ê¶Œí•œì´ ì ìš©ë˜ì§€ 않게 ë˜ì§€ë§Œ 블로그 ì†ë„ê°€ 약간 빨ë¼ì§€ëŠ” 장ì ì´ 있습니다. 그러므로 ë¸”ë¡œê·¸ì— ëŒ€í•œ 다중 ì‚¬ìš©ìž ì½ê¸° ê¶Œí•œì´ í•„ìš” 없다면 ì´ ì„¤ì •ì„ ë„십시오.'); @define('PLUGIN_API_VALIDATE_ERROR', '옵션 "%s"ì— ëŒ€í•œ 설정 êµ¬ë¬¸ì´ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤. "%s" ì¢…ë¥˜ì— í•´ë‹¹í•˜ëŠ” ë‚´ìš©ì´ í•„ìš”í•©ë‹ˆë‹¤.'); @define('USERCONF_CHECK_PASSWORD', 'ì´ì „ 암호'); @define('USERCONF_CHECK_PASSWORD_DESC', 'ìœ„ì˜ ì ížŒ 암호를 변경하려면 ì—¬ê¸°ì— í˜„ìž¬ ì‚¬ìš©ì¤‘ì¸ ì•”í˜¸ë¥¼ ì ìœ¼ì‹­ì‹œì˜¤.'); @define('USERCONF_CHECK_PASSWORD_ERROR', 'ì´ì „ 암호가 올바르지 않으므로 새 암호로 변경할 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤. ì„¤ì •ì´ ì €ìž¥ë˜ì§€ 않았습니다.'); -@define('ERROR_XSRF', '브ë¼ìš°ì €ê°€ 유효한 HTTP ì§„ìž…ìž(referrer) 문ìžì—´ì„ ë³´ë‚´ì§€ 않았습니다. 브ë¼ìš°ì €/프ë¡ì‹œ ì„¤ì •ì´ ìž˜ëª»ë˜ì—ˆê±°ë‚˜ ë‹¹ì‹ ì„ ê²¨ëƒ¥í•œ ìƒí˜¸ 사ì´íЏ 요청 위조(XSRF) 때문ì´ì—ˆì„ 수 있습니다. 요청한 ì‚¬í•­ì„ ì²˜ë¦¬í•  수 없었습니다.'); +@define('ERROR_XSRF', '브ë¼ìš°ì €ê°€ 유효한 HTTP ì§„ìž… 경로(referrer) 문ìžì—´ì„ ë³´ë‚´ì§€ 않았습니다. 브ë¼ìš°ì €/프ë¡ì‹œ ì„¤ì •ì´ ìž˜ëª»ë˜ì—ˆê±°ë‚˜ ë‹¹ì‹ ì„ ê²¨ëƒ¥í•œ ìƒí˜¸ 사ì´íЏ 요청 위조(XSRF) 때문ì´ì—ˆì„ 수 있습니다. 요청한 ì‚¬í•­ì„ ì²˜ë¦¬í•  수 없었습니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', '특정 사용ìžì˜ RSS 피드를 보기 위한 ìƒëŒ€ì ì¸ ì¸í„°ë„· 주소 구조를 %id%, %realname%, %username%, %email% ë“±ì˜ ë³€ìˆ˜ì™€ ì¼ë°˜ 글ìžë¥¼ 활용해서 ì •ì˜í•  수 있습니다. ì „ì²´ 주소는 사ì´íŠ¸ì˜ ê¸°ë³¸ 주소를 기초로 해서 시작합니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR', '작성ìžì— 따른 RSS 피드 ê³ ì • ë§í¬ 주소 구조'); -@define('INSTALL_PERMALINK_AUTHORSPATH', '작성ìžë¡œì˜ 경로'); +@define('INSTALL_PERMALINK_AUTHORSPATH', '작성ìžë¡œ 가는 경로'); @define('AUTHORS', '작성ìž'); @define('AUTHORS_ALLOW_SELECT', '방문ìžê°€ 한 ë²ˆì— ì—¬ëŸ¬ 작성ìžì˜ ê¸€ì„ ë³¼ 수 있게 합니까?'); -@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우, ì´ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ 표시ë˜ëŠ” ê° ìž‘ì„±ìž ì´ë¦„ ì˜†ì— ì²´í¬ë°•스가 표시ë©ë‹ˆë‹¤. ì„ íƒ ì—¬ë¶€ì— ë”°ë¼ ì›í•˜ëŠ” ì¡°ê±´ì˜ ê¸€ì„ ë³¼ 수 있게 ë©ë‹ˆë‹¤.'); +@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우 ì´ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ 표시ë˜ëŠ” ê° ìž‘ì„±ìž ì´ë¦„ ì˜†ì— ì²´í¬ë°•스가 표시ë©ë‹ˆë‹¤. ì„ íƒ ì—¬ë¶€ì— ë”°ë¼ ì›í•˜ëŠ” ì¡°ê±´ì˜ ê¸€ì„ ë³¼ 수 있게 ë©ë‹ˆë‹¤.'); @define('AUTHOR_PLUGIN_DESC', '작성ìžì˜ ëª©ë¡ ë³´ì´ê¸°'); @define('CATEGORY_PLUGIN_TEMPLATE', '스마티 템플릿 사용'); @define('CATEGORY_PLUGIN_TEMPLATE_DESC', '사용할 경우, ì´ í”ŒëŸ¬ê·¸ì¸ì€ 스마티 템플릿 ê¸°ëŠ¥ì„ í™œìš©í•˜ì—¬ 범주 목ë¡ì„ 출력하게 ë©ë‹ˆë‹¤. êµ¬ì„±ì€ "plugin_categories.tpl" 템플릿 파ì¼ì„ 편집하여 ê³ ì¹  수 있습니다. 성능 저하를 가져오게 ë˜ë¯€ë¡œ 특화시키지 ì•Šì„ ê²½ìš° 꺼ë‘십시오.'); -@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 당 ê¸€ì˜ ìˆ˜ ë³´ì´ê¸°'); +@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 별 ê¸€ì˜ ìˆ˜ ë³´ì´ê¸°'); @define('AUTHORS_SHOW_ARTICLE_COUNT', 'ìž‘ì„±ìž ì´ë¦„ ì˜†ì— ê¸€ì˜ ìˆ˜ ë³´ì´ê¸°'); @define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '사용할 경우, ê° ìž‘ì„±ìžì˜ ì´ë¦„ 옆 괄호 ì†ì— 해당 작성ìžê°€ ì“´ ê¸€ì˜ ìˆ˜ë¥¼ 표시합니다.'); -@define('CUSTOM_ADMIN_INTERFACE', 'Custom admin interface available'); +@define('CUSTOM_ADMIN_INTERFACE', '사용ìží™”ëœ ê´€ë¦¬ 화면 ì¸í„°íŽ˜ì´ìŠ¤ë¥¼ 사용할 수 있ìŒ'); -@define('COMMENT_NOT_ADDED', 'ë§ê¸€ 금지가 ë˜ì–´ 있어 ë§ê¸€ì„ 추가하지 못했습니다. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.' -@define('INSTALL_TRACKREF', 'Enable referrer tracking?'); -@define('INSTALL_TRACKREF_DESC', 'Enabling the referrer tracking will show you which sites refer to your articles. Today this is often abused for spamming, so you can disable it if you want.'); -@define('CATEGORIES_HIDE_PARENT', 'Hide the selected parent category?'); -@define('CATEGORIES_HIDE_PARENT_DESC', 'If you restrict the listing of categories to a specific category, by default you will see that parent category within the output listing. If you disable this option, the parent category name will not be displayed.'); -@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.'); -@define('INSTALL_RSSFETCHLIMIT', 'Entries to display in Feeds'); -@define('INSTALL_RSSFETCHLIMIT_DESC', 'Number of entries to display for each page on the RSS Feed.'); -@define('INSTAL_DB_UTF8', 'Enable DB-charset conversion'); -@define('INSTAL_DB_UTF8_DESC', 'Issues a MySQL "SET NAMES" query to indicate the required charset for the database. Turn this on or off, if you see weird characters in your blog.'); -@define('ONTHEFLYSYNCH', 'Enable on-the-fly media synchronization'); -@define('ONTHEFLYSYNCH_DESC', 'If enabled, Serendipity will compare the media database with the files stored on your server and synchronize the database and directory contents.'); -@define('USERCONF_CHECK_USERNAME_ERROR', 'The username cannot be left blank.'); -@define('FURTHER_LINKS', 'Further Links'); -@define('FURTHER_LINKS_S9Y', 'Serendipity Homepage'); -@define('FURTHER_LINKS_S9Y_DOCS', 'Serendipity Documentation'); -@define('FURTHER_LINKS_S9Y_BLOG', 'Official Blog'); -@define('FURTHER_LINKS_S9Y_FORUMS', 'Forums'); -@define('FURTHER_LINKS_S9Y_SPARTACUS', 'Spartacus'); -@define('COMMENT_IS_DELETED', '(Comment removed)'); +@define('COMMENT_NOT_ADDED', 'ì´ ê¸€ì— ë§ê¸€ 금지가 ë˜ì–´ 있거나, 유효하지 ì•Šì€ ë°ì´í„°ë¥¼ 입력했거나, 스팸방지 ê¸°ëŠ¥ì— ì˜í•´ 차단ë˜ì–´ ë§ê¸€ì„ 추가하지 못했습니다. '); +@define('INSTALL_TRACKREF', 'ì§„ìž… 경로 ì¶”ì ì„ 사용하기'); +@define('INSTALL_TRACKREF_DESC', 'ì§„ìž… 경로 ì¶”ì ì„ 사용하면 ì–´ë–¤ 사ì´íŠ¸ê°€ ë‹¹ì‹ ì˜ ê¸€ì„ ì°¸ì¡°í•˜ê³  있는지 ë³¼ 수 있습니다. 오늘날 ì´ ê¸°ëŠ¥ì€ ìŠ¤íŒ¸ì— ì•…ìš©ë˜ëŠ” 경우가 많으므로 ì›í•  경우 ëŒ ìˆ˜ 있습니다.'); +@define('CATEGORIES_HIDE_PARENT', 'ì„ íƒí•œ ìƒìœ„ 범주를 숨기기'); +@define('CATEGORIES_HIDE_PARENT_DESC', '범주 ëª©ë¡ ë‚˜ì—´ì„ íŠ¹ì • 범주로 국한시킬 경우 기본ì ìœ¼ë¡œ ìƒìœ„ 범주가 목ë¡ì— 나타납니다. ì´ ê¸°ëŠ¥ì„ ë„ë©´ ìƒìœ„ 범주 ì´ë¦„ì´ ë‚˜íƒ€ë‚˜ì§€ 않습니다.'); +@define('WARNING_NO_GROUPS_SELECTED', '경고: 아무런 그룹 소ì†ë„ ì„ íƒí•˜ì§€ 않았습니다. ì´ ê²½ìš° ì‚¬ìš©ìž ê·¸ë£¹ 관리ì—서 ê°•ì œ 퇴장하는 것과 같으므로 그룹 소ì†ì„ 변경하지 않았습니다.'); +@define('INSTALL_RSSFETCHLIMIT', 'í”¼ë“œì— ë³´ì—¬ì¤„ 글 수'); +@define('INSTALL_RSSFETCHLIMIT_DESC', 'ê° RSS 피드 페ì´ì§€ì— 보여줄 ê¸€ì˜ ìˆ˜ìž…ë‹ˆë‹¤.'); +@define('INSTAL_DB_UTF8', 'ë°ì´í„°ë² ì´ìФ-문ìžì—´ 변환 사용하기'); +@define('INSTAL_DB_UTF8_DESC', 'ë°ì´í„°ë² ì´ìŠ¤ì— í•„ìš”í•œ 문ìžì—´ 종류를 지정하기 위해 MySQL "SET NAMES" 질ì˜ë¥¼ 실행합니다. ë¸”ë¡œê·¸ì— ì´ìƒí•œ 글ìžê°€ ë³´ì¼ ê²½ìš° ì´ë¥¼ 켜거나 꺼보십시오.'); +@define('ONTHEFLYSYNCH', '즉ê°ì ì¸ 미디어 ë™ê¸°í™” 사용하기'); +@define('ONTHEFLYSYNCH_DESC', '사용할 경우 세렌디피티가 미디어 ë°ì´í„°ë² ì´ìŠ¤ì™€ 서버 저장 파ì¼ë“¤ì„ 비êµí•˜ì—¬ ë°ì´í„°ë² ì´ìФ ë° ë””ë ‰í† ë¦¬ ë‚´ìš©ì„ ë™ê¸°í™”합니다.'); +@define('USERCONF_CHECK_USERNAME_ERROR', 'ì‚¬ìš©ìž ì´ë¦„ì€ ë¹„ì›Œë‘˜ 수 없습니다.'); +@define('FURTHER_LINKS', '추가 ë§í¬'); +@define('FURTHER_LINKS_S9Y', '세렌디피티 홈페ì´ì§€'); +@define('FURTHER_LINKS_S9Y_DOCS', '세렌디피티 사용설명서'); +@define('FURTHER_LINKS_S9Y_BLOG', 'ê³µì‹ ë¸”ë¡œê·¸'); +@define('FURTHER_LINKS_S9Y_FORUMS', '게시íŒ'); +@define('FURTHER_LINKS_S9Y_SPARTACUS', '스파르타쿠스'); +@define('COMMENT_IS_DELETED', '(ë§ê¸€ ì‚­ì œë¨)'); -@define('CURRENT_AUTHOR', 'Current author'); +@define('CURRENT_AUTHOR', '현재 작성ìž'); -@define('WORD_NEW', 'New'); -@define('SHOW_MEDIA_TOOLBAR', 'Show toolbar within media selector popup?'); -@define('MEDIA_KEYWORDS', 'Media keywords'); -@define('MEDIA_KEYWORDS_DESC', 'Enter a list of ";" separated words that you want to use as pre-defined keywords for media items.'); -@define('MEDIA_EXIF', 'Import EXIF/JPEG image data'); -@define('MEDIA_EXIF_DESC', 'If enabled, existing EXIF/JPEG metadata of images will be parsed and stored in the database for display in the media gallery.'); -@define('MEDIA_PROP', 'Media properties'); +@define('WORD_NEW', 'ì‹ ê·œ'); +@define('SHOW_MEDIA_TOOLBAR', '미디어 ì„ íƒ íŒì—… ì•ˆì— íˆ´ë°” 보여주기'); +@define('MEDIA_KEYWORDS', '미디어 키워드'); +@define('MEDIA_KEYWORDS_DESC', '미디어 ì•„ì´í…œì˜ 키워드로 사용하기 위해 미리 ì •ì˜í•´ë‘˜ ë‹¨ì–´ë“¤ì„ ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_EXIF', 'EXIF/JPEG 그림 ë°ì´í„°ë¥¼ 불러오기'); +@define('MEDIA_EXIF_DESC', '사용할 경우 ê·¸ë¦¼ì— í¬í•¨ë˜ì–´ 있는 EXIF/JPEG 메타ë°ì´í„°ë¥¼ 불러들여 ë°ì´í„°ë² ì´ìŠ¤ì— ì €ìž¥í•˜ê²Œ ë˜ë©° 차후 미디어 갤러리ì—서 ë³¼ 수 있게 ë©ë‹ˆë‹¤.'); +@define('MEDIA_PROP', '미디어 등ë¡ì •ë³´'); -@define('GO_ADD_PROPERTIES', 'Go & enter properties'); -@define('MEDIA_PROPERTY_DPI', 'DPI'); -@define('MEDIA_PROPERTY_COPYRIGHT', 'Copyright'); -@define('MEDIA_PROPERTY_COMMENT1', 'Short Comment'); -@define('MEDIA_PROPERTY_COMMENT2', 'Long Comment'); -@define('MEDIA_PROPERTY_TITLE', 'Title'); -@define('MEDIA_PROP_DESC', 'Enter a list of ";" separated property fields you want to define for each media file'); -@define('MEDIA_PROP_MULTIDESC', '(You can append ":MULTI" after any item to indicate that this item will contain long text instead of just some characters)'); +@define('GO_ADD_PROPERTIES', '등ë¡ì •ë³´ 입력하러 가기'); +@define('MEDIA_PROPERTY_DPI', 'ë°€ë„(DPI)'); +@define('MEDIA_PROPERTY_COPYRIGHT', '저작권'); +@define('MEDIA_PROPERTY_COMMENT1', 'ì§§ì€ ì„¤ëª…'); +@define('MEDIA_PROPERTY_COMMENT2', '긴 설명'); +@define('MEDIA_PROPERTY_TITLE', '제목'); +@define('MEDIA_PROP_DESC', 'ê° ë¯¸ë””ì–´ 파ì¼ì— ì •ì˜í•˜ê³ ìž 하는 등ë¡ì •ë³´ 필드를 ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_PROP_MULTIDESC', '(특정 ì•„ì´í…œì´ ê¸€ìž ëª‡ ìžê°€ ì•„ë‹ˆë¼ ê¸´ ê¸€ì´ í¬í•¨ë˜ì–´ 있다는 ê²ƒì„ í‘œì‹œí•˜ê³ ìž í•  경우 해당 ì•„ì´í…œ ë’¤ì— ":MULTI"를 ë¶™ì¼ ìˆ˜ 있습니다)'); -@define('STYLE_OPTIONS_NONE', 'This theme/style has no specific options. To see how your template can specify options, read the Technical Documentation on www.s9y.org about "Configuration of Theme options".'); -@define('STYLE_OPTIONS', 'Theme/Style options'); +@define('STYLE_OPTIONS_NONE', 'ì´ í…œí”Œë¦¿ì´ë‚˜ 스타ì¼ì€ 별ë„ì˜ ì„ íƒì‚¬í•­ì´ 없습니다. í…œí”Œë¦¿ì— ì„ íƒì‚¬í•­ì„ 추가할 수 있는 ë°©ë²•ì€ www.s9y.orgì— ìžˆëŠ” 기술문서(Technical Documentation) 중 "Configuration of Theme options" í•­ëª©ì„ ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤.'); +@define('STYLE_OPTIONS', '템플릿/ìŠ¤íƒ€ì¼ ì„ íƒì‚¬í•­'); -@define('PLUGIN_AVAILABLE_COUNT', 'Total: %d plugins.'); +@define('PLUGIN_AVAILABLE_COUNT', 'ì´ í”ŒëŸ¬ê·¸ì¸ ìˆ˜: %dê°œ.'); -@define('SYNDICATION_RFC2616', 'Activate strict RFC2616 RSS-Feed compliance'); -@define('SYNDICATION_RFC2616_DESC', 'NOT Enforcing RFC2616 means that all Conditional GETs to Serendipity will return entries last modified since the time of the last request. With that setting to "false", your visitors will get all articles since their last request, which is considered a good thing. However, some Agents like Planet act weird, if that happens, at it also violates RFC2616. So if you set this option to "TRUE" you will comply with that RFC, but readers of your RSS feed might miss items in their holidays. So either way, either it hearts Aggregators like Planet, or it hurts actual readers of your blog. If you are facing complaints from either side, you can toggle this option. Reference: SourceForge'); -@define('MEDIA_PROPERTY_DATE', 'Associated Date'); -@define('MEDIA_PROPERTY_RUN_LENGTH', 'Run-Length'); -@define('FILENAME_REASSIGNED', 'Automagically assigned new file name: %s'); -@define('MEDIA_UPLOAD_SIZE', 'Max. file upload size'); -@define('MEDIA_UPLOAD_SIZE_DESC', 'Enter the maximum filesize for uploaded files in bytes. This setting can be overruled by server-side settings in PHP.ini: upload_max_filesize, post_max_size, max_input_time all take precedence over this option. An empty string means to only use the server-side limits.'); -@define('MEDIA_UPLOAD_SIZEERROR', 'Error: You cannot upload files larger than %s bytes!'); -@define('MEDIA_UPLOAD_MAXWIDTH', 'Max. width of image files for upload'); -@define('MEDIA_UPLOAD_MAXWIDTH_DESC', 'Enter the maximum image width in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_MAXHEIGHT', 'Max. height of image files for upload'); -@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', 'Enter the maximum image height in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_DIMERROR', 'Error: You cannot upload image files larger than %s x %s pixels!'); +@define('SYNDICATION_RFC2616', '엄격한 RFC2616 RSS 피드 준수 사용하기'); +@define('SYNDICATION_RFC2616_DESC', 'RFC2616ì„ ê°•ì œí•˜ì§€ ì•Šì„ ê²½ìš° ì¡°ê±´ë¶€ GET ìš”ì²­ì„ ì„¸ë Œë””í”¼í‹°ê°€ 받으면 마지막 요청 ì´í›„ì— ìˆ˜ì •ëœ ê¸€ì„ ë³´ë‚´ê²Œ ë©ë‹ˆë‹¤. 그러므로 ì´ ì„¤ì •ì„ ë„ë©´ 방문ìžë“¤ì€ 마지막 요청 ì´í›„ ìž‘ì„±ëœ ëª¨ë“  ê¸€ì„ ë°›ê²Œ ë˜ì–´ 대부분 좋게 받아들입니다. 하지만 Planetê³¼ ê°™ì€ ì¼ë¶€ ì—ì´ì „íŠ¸ì˜ ê²½ìš° ì´ë ‡ê²Œ ë˜ë©´ RFC2616ì„ ìœ„ë°˜í•˜ê¸° ë•Œë¬¸ì— ì´ìƒí•˜ê²Œ ìž‘ë™í•©ë‹ˆë‹¤. ì´ ì„¤ì •ì„ ì¼œë©´ RFC 준수를 하게 ë˜ì§€ë§Œ RSS 피드 구ë…ìžë“¤ì´ 휴가를 ê°„ ë™ì•ˆ 놓치는 ê¸€ì´ ìƒê¸¸ 수 있습니다. ê²°êµ­ Planetê³¼ ê°™ì€ ê³³ì´ë‚˜ 블로그를 ì§ì ‘ 구ë…하는 사람들 중 한 ìª½ì€ ë¬¸ì œê°€ ë°œìƒí•  것입니다. ì–´ëŠ í•œ 쪽ì—서 ë¶ˆë§Œì´ ìžˆì„ ê²½ìš° ì´ ì„¤ì •ì„ ë³€ê²½í•´ 보기 ë°”ëžë‹ˆë‹¤. 참조할 ë‚´ìš©: 소스í¬ì§€'); +@define('MEDIA_PROPERTY_DATE', '관계ëœ(작성ëœ) ë‚ ì§œ'); +@define('MEDIA_PROPERTY_RUN_LENGTH', '실행 길ì´'); +@define('FILENAME_REASSIGNED', 'ìžë™ìœ¼ë¡œ 새로운 íŒŒì¼ ì´ë¦„ì„ ë¶™ì˜€ìŠµë‹ˆë‹¤: %s'); +@define('MEDIA_UPLOAD_SIZE', '올리는 파ì¼ì˜ 최대 í¬ê¸°'); +@define('MEDIA_UPLOAD_SIZE_DESC', '올리는 파ì¼ì˜ 최대 í¬ê¸°ë¥¼ ë°”ì´íЏ 단위로 입력합니다. ì´ ì„¤ì •ë³´ë‹¤ 서버 ì¸¡ì— ìžˆëŠ” php.ini ë‚´ë¶€ ì„¤ì •ì´ ìš°ì„ ë©ë‹ˆë‹¤: upload_max_filesize, post_max_size, max_input_time ë“±ì´ ëª¨ë‘ ì´ ì„¤ì •ë³´ë‹¤ ìš°ì„  ì ìš©ë©ë‹ˆë‹¤. 비워둘 경우 서버 측 설정만 따르게 ë©ë‹ˆë‹¤.'); +@define('MEDIA_UPLOAD_SIZEERROR', '오류: %së°”ì´íŠ¸ë³´ë‹¤ í° íŒŒì¼ì„ 올릴 수 없습니다!'); +@define('MEDIA_UPLOAD_MAXWIDTH', '올릴 그림 파ì¼ì˜ 최대 í­'); +@define('MEDIA_UPLOAD_MAXWIDTH_DESC', '올릴 그림 파ì¼ì˜ 최대 í­ì„ 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_MAXHEIGHT', '올릴 그림 파ì¼ì˜ 최대 높ì´'); +@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', '올릴 그림 파ì¼ì˜ 최대 높ì´ë¥¼ 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_DIMERROR', '오류: %s x %s 픽셀보다 í° ê·¸ë¦¼ 파ì¼ì„ 올릴 수 없습니다!'); -@define('MEDIA_TARGET', 'Target for this link'); -@define('MEDIA_TARGET_JS', 'Popup window (via JavaScript, adaptive size)'); -@define('MEDIA_ENTRY', 'Isolated Entry'); -@define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)'); +@define('MEDIA_TARGET', 'ì´ ë§í¬ì˜ 표시 대ìƒ'); +@define('MEDIA_TARGET_JS', 'íŒì—… ì°½ (ìžë°”스í¬ë¦½íЏ 사용, 가변 í¬ê¸°)'); +@define('MEDIA_ENTRY', 'ë…ë¦½ëœ ê¸€'); +@define('MEDIA_TARGET_BLANK', 'íŒì—… ì°½ (target=_blank 사용)'); -@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?'); -@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.'); +@define('MEDIA_DYN_RESIZE', 'ë™ì  그림 í¬ê¸° ë³€í™˜ì„ ì‚¬ìš©í•˜ê¸°'); +@define('MEDIA_DYN_RESIZE_DESC', '사용할 경우 미디어 ì„ íƒ í™”ë©´ì´ GET 변수를 통해 요청한 í¬ê¸°ì— ë§žë„ë¡ ê·¸ë¦¼ì„ ë¶ˆëŸ¬ì˜¬ 수 있습니다. ìƒì„±ëœ 파ì¼ì€ ìºì‹œì— 저장ë˜ë¯€ë¡œ ìžì£¼ 사용할 경우 ìš©ëŸ‰ì„ ë§Žì´ ì°¨ì§€í•  수 있습니다.'); -@define('MEDIA_DIRECTORY_MOVED', 'Directory and files were successfully moved to %s'); -@define('MEDIA_DIRECTORY_MOVE_ERROR', 'Directory and files could not be moved to %s!'); -@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'On Non-MySQL databases, iterating through every article to replace the old directory URLs with new directory URLs is not possible. You will need to manually edit your entries to fix new URLs. You can still move your old directory back to where it was, if that is too cumbersome for you.'); -@define('MEDIA_DIRECTORY_MOVE_ENTRIES', 'Moved the URL of the moved directory in %s entries.'); -@define('PLUGIN_ACTIVE', 'Active'); -@define('PLUGIN_INACTIVE', 'Inactive'); -@define('PREFERENCE_USE_JS', 'Enable advanced JS usage?'); -@define('PREFERENCE_USE_JS_DESC', 'If enabled, advanced JavaScript sections will be enabled for better usability, like in the Plugin Configuration section you can use drag and drop for re-ordering plugins.'); +@define('MEDIA_DIRECTORY_MOVED', '디렉토리와 파ì¼ì´ %s(으)로 ì´ë™í•˜ëŠ”ë° ì„±ê³µí–ˆìŠµë‹ˆë‹¤'); +@define('MEDIA_DIRECTORY_MOVE_ERROR', '디렉토리와 파ì¼ì„ %s(으)로 ì´ë™í•  수 없었습니다!'); +@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'MySQLì´ ì•„ë‹Œ ë°ì´í„°ë² ì´ìФì—서는 ì´ì „ 디렉토리 주소를 새 디렉토리 주소로 바꾸기 위해 모든 ê¸€ì„ í•˜ë‚˜ì”© 살펴가는 ìž‘ì—…ì„ í•  수 없습니다. 수작업으로 ê° ê¸€ì— ëŒ€í•´ 주소 êµì²´ ìž‘ì—…ì„ í•´ì•¼ 합니다. ì´ê²ƒì´ 너무 번거로울 경우 디렉토리를 ì›ëž˜ 위치로 다시 ë˜ëŒë¦´ 수 있습니다.'); +@define('MEDIA_DIRECTORY_MOVE_ENTRIES', '%sê°œì˜ ê¸€ì—서 ì´ë™í•œ 디렉토리로 주소를 변경했습니다.'); +@define('PLUGIN_ACTIVE', '사용 중'); +@define('PLUGIN_INACTIVE', '미사용'); +@define('PREFERENCE_USE_JS', '고급 ìžë°”스í¬ë¦½íЏ 기능 사용'); +@define('PREFERENCE_USE_JS_DESC', '사용할 경우 고급 ìžë°”스í¬ë¦½íЏ 기능 ë¶€ë¶„ì„ í™œìš©í•˜ê²Œ ë˜ì–´ ì‚¬ìš©ì„±ì´ í–¥ìƒë©ë‹ˆë‹¤. 대표ì ìœ¼ë¡œ í”ŒëŸ¬ê·¸ì¸ ì„¤ì •ì—서 플러그ì¸ì„ ëŒì–´ì„œ ì´ë™í•˜ì—¬ 순서를 바꿀 수 있게 ë©ë‹ˆë‹¤.'); -@define('PREFERENCE_USE_JS_WARNING', '(This page uses advanced JavaScripting. If you are having functionality issues, please disable the use of advanced JS usage in your personal preferences or disable your browser\'s JavaScript)'); +@define('PREFERENCE_USE_JS_WARNING', '(ì´ íŽ˜ì´ì§€ëŠ” 고급 ìžë°”스í¬ë¦½íЏ ê¸°ëŠ¥ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. 기능 ì‚¬ìš©ì— ë¬¸ì œê°€ ìžˆì„ ê²½ìš° ê°œì¸ ì„¤ì •ì—서 고급 ìžë°”스í¬ë¦½íЏ ê¸°ëŠ¥ì„ ë„거나 브ë¼ìš°ì €ì˜ ìžë°”스í¬ë¦½íЏ ê¸°ëŠ¥ì„ ë„ë„ë¡ í•©ë‹ˆë‹¤)'); -@define('INSTALL_PERMALINK_COMMENTSPATH', 'Path to comments'); -@define('PERM_SET_CHILD', 'Set the same permissions on all child directories'); -@define('PERMISSION_FORBIDDEN_PLUGINS', 'Forbidden plugins'); -@define('PERMISSION_FORBIDDEN_HOOKS', 'Forbidden events'); -@define('PERMISSION_FORBIDDEN_ENABLE', 'Enable Plugin ACL for usergroups?'); -@define('PERMISSION_FORBIDDEN_ENABLE_DESC', 'If the option "Plugin ACL for usergroups" is enabled in the configuration, you can specify which usergroups are allowed to execute certain plugins/events.'); -@define('DELETE_SELECTED_ENTRIES', 'Delete selected entries'); -@define('PLUGIN_AUTHORS_MINCOUNT', 'Show only authors with at least X articles'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET', 'Bookmarklet'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', 'Bookmark this link and then use it on any page you want to blog about to quickly access your Serendipity Blog.'); -@define('IMPORT_WP_PAGES', 'Also fetch attachments and staticpages as normal blog entries?'); -@define('USERCONF_CREATE', 'Disable user / forbid activity?'); -@define('USERCONF_CREATE_DESC', 'If selected, the user will not have any editing or creation possibilities on the blog anymore. When logging in to the backend, he cannot do anything else apart from logging out and viewing his personal configuration.'); -@define('CATEGORY_HIDE_SUB', 'Hide postings made to sub-categories?'); -@define('CATEGORY_HIDE_SUB_DESC', 'By default, when you browse a category also entries of any subcategory are displayed. If this option is turned on, only postings of the currently selected category are displayed.'); -@define('PINGBACK_SENDING', 'Sending pingback to URI %s...'); -@define('PINGBACK_SENT', 'Pingback successful'); -@define('PINGBACK_FAILED', 'Pingback failed: %s'); -@define('PINGBACK_NOT_FOUND', 'No pingback-URI found.'); -@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', 'Hide archives link when no entries were made in that timespan (requires counting entries)'); -@define('RSS_IMPORT_WPXRSS', 'WordPress eXtended RSS import, requires PHP5 and might take up much memory'); -@define('SET_TO_MODERATED', 'Moderate'); -@define('COMMENT_MODERATED', 'Comment #%s has successfully been set as moderated'); -@define('CENTER', 'center'); -@define('FULL_COMMENT_TEXT', 'Yes, with full comment text'); +@define('INSTALL_PERMALINK_COMMENTSPATH', 'ë§ê¸€ë¡œ 가는 경로'); +@define('PERM_SET_CHILD', '하위 ë””ë ‰í† ë¦¬ì— ëª¨ë‘ ë™ì¼í•œ 권한 ì„¤ì •ì„ í•©ë‹ˆë‹¤'); +@define('PERMISSION_FORBIDDEN_PLUGINS', '사용 ê¸ˆì§€ëœ í”ŒëŸ¬ê·¸ì¸'); +@define('PERMISSION_FORBIDDEN_HOOKS', '사용 ê¸ˆì§€ëœ ì´ë²¤íЏ'); +@define('PERMISSION_FORBIDDEN_ENABLE', 'ì‚¬ìš©ìž ê·¸ë£¹ì— ëŒ€í•œ í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 권한 ì„¤ì •ì„ ì‚¬ìš©í•˜ê¸°'); +@define('PERMISSION_FORBIDDEN_ENABLE_DESC', '"ì‚¬ìš©ìž ê·¸ë£¹ì— ëŒ€í•œ í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 권한 설정"ì„ ì‚¬ìš©í•  경우 ì–´ë–¤ ì‚¬ìš©ìž ê·¸ë£¹ì´ ì–´ë–¤ 플러그ì¸ì´ë‚˜ ì´ë²¤íŠ¸ë¥¼ 사용할 수 있ì„ì§€ 지정할 수 있게 ë©ë‹ˆë‹¤.'); +@define('DELETE_SELECTED_ENTRIES', 'ì„ íƒí•œ 글 삭제하기'); +@define('PLUGIN_AUTHORS_MINCOUNT', '최소 Xê°œì˜ ê¸€ì„ ì“´ 작성ìžë§Œ 보여주기'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET', 'ì¦ê²¨ì°¾ê¸°'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', 'ì´ ë§í¬ë¥¼ ì¦ê²¨ì°¾ê¸°ì— 추가한 다ìŒ, ì ê³ ìž 하는 페ì´ì§€ì— 사용하면 ì´ ì„¸ë Œë””í”¼í‹° 블로그를 빠르게 찾아올 수 있습니다.'); +@define('IMPORT_WP_PAGES', '첨부 파ì¼ê³¼ ê³ ì • 페ì´ì§€ë„ ì¼ë°˜ 블로그 글처럼 불러옵니까?'); +@define('USERCONF_CREATE', '사용ìžë¥¼ 비활성화하거나 활ë™ì„ 금지하기'); +@define('USERCONF_CREATE_DESC', '사용할 경우 해당 사용ìžê°€ 블로그ì—서 ë” ì´ìƒ ê¸€ì„ íŽ¸ì§‘í•˜ê±°ë‚˜ 새로 쓸 수 없게 ë©ë‹ˆë‹¤. ê´€ë¦¬ìž í™”ë©´ì— ë“¤ì–´ì˜¤ë”ë¼ë„ ê°œì¸ ì„¤ì •ì„ í™•ì¸í•˜ê±°ë‚˜ 다시 빠져나가는 것 ë°–ì— í•  수 없습니다.'); +@define('CATEGORY_HIDE_SUB', '하위 범주ì—서 작성한 글 숨기기'); +@define('CATEGORY_HIDE_SUB_DESC', '기본ì ìœ¼ë¡œëŠ” 특정 ë²”ì£¼ì˜ ê¸€ì„ ì—´ëžŒí•  때 하위 ë²”ì£¼ì— ì†í•œ ê¸€ë„ ê°™ì´ ë‚˜íƒ€ë‚©ë‹ˆë‹¤. ì´ ì„¤ì •ì„ ì‚¬ìš©í•  경우 현재 ì„ íƒëœ ë²”ì£¼ì˜ ê¸€ë§Œ 나타납니다.'); +@define('PINGBACK_SENDING', 'í•‘ë°±ì„ URI %s(으)로 보내는 중...'); +@define('PINGBACK_SENT', 'í•‘ë°± 성공'); +@define('PINGBACK_FAILED', 'í•‘ë°± 실패: %s'); +@define('PINGBACK_NOT_FOUND', 'í•‘ë°± URI를 ì°¾ì„ ìˆ˜ 없었ìŒ.'); +@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', '아무런 ê¸€ì´ ìž‘ì„±ë˜ì§€ ì•Šì€ ì‹œê°„ëŒ€ì˜ ê¸€ ëª©ë¡ ë§í¬ë¥¼ 숨김 (글 수를 집계하는 ê¸°ëŠ¥ì„ ì‚¬ìš©í•´ì•¼ 함)'); +@define('RSS_IMPORT_WPXRSS', 'ì›Œë“œí”„ë ˆìŠ¤ì˜ í™•ìž¥ RSS (WordPress eXtended RSS) 불러오기 - PHP5ê°€ 필요하며 메모리를 ë§Žì´ ì°¨ì§€í•  수 있ìŒ'); +@define('SET_TO_MODERATED', '중재하기'); +@define('COMMENT_MODERATED', '%s번 ë§ê¸€ì„ 성공ì ìœ¼ë¡œ 중재하기로 설정함'); +@define('CENTER', '중앙'); +@define('FULL_COMMENT_TEXT', '네, ì „ì²´ ë§ê¸€ì„ í¬í•¨í•©ë‹ˆë‹¤'); -@define('COMMENT_TOKENS', 'Use Tokens for Comment Moderation?'); -@define('COMMENT_TOKENS_DESC', 'If tokens are used, comments can be approved and deleted by clicking the email links without requiring login access to the blog. Note that this is a convenience feature, and if your mails get hijacked, those people can approve/delete the referenced comment without further authentication.'); -@define('COMMENT_NOTOKENMATCH', 'Moderation link has expired or comment #%s has already been approved or deleted'); -@define('TRACKBACK_NOTOKENMATCH', 'Moderation link has expired or trackback #%s has already been approved or deleted'); -@define('BADTOKEN', 'Invalid Moderation Link'); +@define('COMMENT_TOKENS', 'ë§ê¸€ ì¤‘ìž¬ì— í† í° ì‚¬ìš©'); +@define('COMMENT_TOKENS_DESC', '토í°ì„ 사용할 경우 ë¸”ë¡œê·¸ì— ë¡œê·¸ì¸í•˜ì§€ ì•Šê³ ë„ ì „ìžìš°íޏ ë§í¬ë¥¼ 통해 ë§ê¸€ì„ 승ì¸í•˜ê±°ë‚˜ 삭제할 수 있습니다. íŽ¸ì˜ ê¸°ëŠ¥ì´ë¼ëŠ” ì ì— 유ì˜í•˜ì‹­ì‹œì˜¤. 만약 ì „ìžìš°íޏ ê³„ì •ì„ ë‹¤ë¥¸ ì‚¬ëžŒì´ íƒˆì·¨í•  경우 ê·¸ ì‚¬ëžŒì´ ë³„ë„ì˜ ì¸ì¦ ì—†ì´ ë§ê¸€ì„ 승ì¸í•˜ê±°ë‚˜ 삭제할 수 있게 ë©ë‹ˆë‹¤.'); +@define('COMMENT_NOTOKENMATCH', '중재 ë§í¬ì˜ ìœ íš¨ê¸°ê°„ì´ ì§€ë‚¬ê±°ë‚˜ %s번 ë§ê¸€ì´ ì´ë¯¸ ìŠ¹ì¸ ë˜ëŠ” ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤'); +@define('TRACKBACK_NOTOKENMATCH', '중재 ë§í¬ì˜ ìœ íš¨ê¸°ê°„ì´ ì§€ë‚¬ê±°ë‚˜ %s번 íŠ¸ëž™ë°±ì´ ì´ë¯¸ ìŠ¹ì¸ ë˜ëŠ” ì‚­ì œë˜ì—ˆìŠµë‹ˆë‹¤'); +@define('BADTOKEN', '유효하지 ì•Šì€ ì¤‘ìž¬ ë§í¬'); -@define('CONFIRMATION_MAIL_ALWAYS', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n"); -@define('CONFIRMATION_MAIL_ONCE', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled one-time mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n\nAfter you have done that, you can always post comments on that blog with your username and e-mail address without receiving such notifications."); -@define('INSTALL_SUBSCRIBE_OPTIN', 'Use Double-Opt In for comment subscriptions?'); -@define('INSTALL_SUBSCRIBE_OPTIN_DESC', 'If enabled, when a comment is made where the person wants to be notified via e-mail about new comments to the same entry, he must confirm his subscription to the entry. This Double-Opt In is required by german law, for example.'); -@define('CONFIRMATION_MAIL_SUBSCRIPTION', "Hello %s,\n\nYou have requested to be notified for comments to \"%s\" (<%s>). To approve this subscription (\"Double Opt In\") please click this link:\n<%s>\n."); -@define('NOTIFICATION_CONFIRM_SUBMAIL', 'Your confirmation of your comment subscription has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_MAIL', 'Your confirmation of the comment has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', 'Your comment subscription could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must request a new confirmation mail.'); -@define('NOTIFICATION_CONFIRM_MAIL_FAIL', 'Your comment confirmation could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must send your comment again.'); -@define('PLUGIN_DOCUMENTATION', 'Documentation'); -@define('PLUGIN_DOCUMENTATION_LOCAL', 'Local Documentation'); -@define('PLUGIN_DOCUMENTATION_CHANGELOG', 'Version history'); -@define('SYNDICATION_PLUGIN_BIGIMG', 'Big Image'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file.'); -@define('SYNDICATION_PLUGIN_FEEDNAME', 'Displayed name for "feed"'); -@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', 'Enter an optional custom name for the feeds (defaults to "feed" when empty)'); -@define('SYNDICATION_PLUGIN_COMMENTNAME', 'Displayed name for "comment" feed'); -@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', 'Enter an optional custom name for the comment feed'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(If you enter an absolute URL with http://... here, this URL will be used as the redirection target in case you have enabled the "Force" option for FeedBurner. Note that this can also be a URL independent to FeedBurner. For new Google FeedBurner feeds, you need to enter http://feeds2.feedburner.com/yourfeedname here)'); +@define('CONFIRMATION_MAIL_ALWAYS', "안녕하세요, %s님.\n\n새로운 ë§ê¸€ì„ \"%s\"ì— ì¶”ê°€í•˜ì…¨ìŠµë‹ˆë‹¤. ë‚´ìš©ì€ ë‹¤ìŒê³¼ 같습니다:\n\n%s\n\n블로그 주ì¸ì´ ì „ìžìš°íŽ¸ì„ í†µí•œ ì¸ì¦ì„ 사용하고 있으므로 ë‹¤ìŒ ë§í¬ë¥¼ 눌러서 ë§ê¸€ì„ ì¸ì¦í•˜ì‹œê¸° ë°”ëžë‹ˆë‹¤:\n<%s>\n"); +@define('CONFIRMATION_MAIL_ONCE', "안녕하세요 %s님.\n\n새로운 ë§ê¸€ì„ \"%s\"ì— ì¶”ê°€í•˜ì…¨ìŠµë‹ˆë‹¤. ë‚´ìš©ì€ ë‹¤ìŒê³¼ 같습니다:\n\n%s\n\n블로그 주ì¸ì´ 1회성 ì „ìžìš°íޏ ì¸ì¦ì„ 사용하고 있으므로 ë‹¤ìŒ ë§í¬ë¥¼ 눌러서 ë§ê¸€ì„ ì¸ì¦í•˜ì‹œê¸° ë°”ëžë‹ˆë‹¤:\n<%s>\n\nì¸ì¦ì´ ëœ ì´í›„ì—는 ë™ì¼í•œ ì‚¬ìš©ìž ì´ë¦„ê³¼ ì „ìžìš°íޏ 주소로 ë” ì´ìƒ ì¸ì¦ì„ 안 거치고 ë§ê¸€ì„ 달 수 있게 ë©ë‹ˆë‹¤."); +@define('INSTALL_SUBSCRIBE_OPTIN', 'ë§ê¸€ 구ë…ì„ ìœ„í•´ 2중 ì‚¬ìš©ìž ë™ì˜ 사용'); +@define('INSTALL_SUBSCRIBE_OPTIN_DESC', '사용할 경우 방문ìžê°€ ë§ê¸€ì„ 남긴 후 해당 ê¸€ì— ìƒˆ ë§ê¸€ì´ 달릴 때 ì „ìžìš°íŽ¸ìœ¼ë¡œ ì•Œë¦¼ì„ ë°›ê¸° ì›í•˜ë©´ ê·¸ ê¸€ì— ëŒ€í•œ êµ¬ë… ì—¬ë¶€ë„ ë™ì˜í•´ì•¼ 합니다. ì´ëŸ¬í•œ 2중 ì‚¬ìš©ìž ë™ì˜ëŠ” ë…ì¼ ë“±ì—서 법ì ìœ¼ë¡œ 요구하고 있습니다.'); +@define('CONFIRMATION_MAIL_SUBSCRIPTION', "안녕하세요, %s님.\n\n\"%s\" (<%s>)ì— ëŒ€í•œ ë§ê¸€ì´ 달릴 경우 알려달ë¼ëŠ” ìš”ì²­ì„ í•œ ë°” 있습니다. ì´ êµ¬ë…ì‚¬í•­ì„ ìŠ¹ì¸í•˜ê³ ìž í•  경우 (\"2중 ì‚¬ìš©ìž ë™ì˜\") ë‹¤ìŒ ë§í¬ë¥¼ 누르기 ë°”ëžë‹ˆë‹¤:\n<%s>\n."); +@define('NOTIFICATION_CONFIRM_SUBMAIL', 'ë§ê¸€ 구ë…ì— ëŒ€í•œ 승ì¸ì ˆì°¨ë¥¼ 성공ì ìœ¼ë¡œ 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_MAIL', 'ë§ê¸€ì— 대한 승ì¸ì ˆì°¨ë¥¼ 성공ì ìœ¼ë¡œ 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', 'ë§ê¸€ êµ¬ë… ìŠ¹ì¸ ì—¬ë¶€ë¥¼ 확ì¸í•  수 없었습니다. ìŠ¹ì¸ ì™„ë£Œë¥¼ 위해 누른 ë§í¬ì˜ ìƒíƒœë¥¼ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤. 만약 ë§í¬ê°€ 발송ëœì§€ 3주가 넘었다면 새로운 ìŠ¹ì¸ ë§í¬ë¥¼ ë‹´ì€ ì „ìžìš°íŽ¸ì„ ìš”ì²­í•´ì•¼ 합니다.'); +@define('NOTIFICATION_CONFIRM_MAIL_FAIL', 'ë§ê¸€ì˜ ìŠ¹ì¸ ì—¬ë¶€ë¥¼ 확ì¸í•  수 없었습니다. ìŠ¹ì¸ ì™„ë£Œë¥¼ 위해 누른 ë§í¬ì˜ ìƒíƒœë¥¼ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤. 만약 ë§í¬ê°€ 발송ëœì§€ 3주가 넘었다면 ë§ê¸€ì„ 다시 남겨야 합니다.'); +@define('PLUGIN_DOCUMENTATION', '사용설명서(ê³µì‹ë¬¸ì„œ)'); +@define('PLUGIN_DOCUMENTATION_LOCAL', 'ë‚´ë¶€ì— ì €ìž¥ëœ ì‚¬ìš©ì„¤ëª…ì„œ(ê³µì‹ë¬¸ì„œ)'); +@define('PLUGIN_DOCUMENTATION_CHANGELOG', '버전 ì´ë ¥'); +@define('SYNDICATION_PLUGIN_BIGIMG', '대형 그림'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'ì˜†ì¤„ì— ë‚˜íƒ€ë‚˜ëŠ” 피드 맨 ìœ„ì— (대형) ê·¸ë¦¼ì„ í‘œì‹œí•©ë‹ˆë‹¤. 그림 파ì¼ì— 대한 ì „ì²´ ë˜ëŠ” 절대 경로를 입력합니다.'); +@define('SYNDICATION_PLUGIN_FEEDNAME', 'í”¼ë“œì— í‘œì‹œí•  ì´ë¦„'); +@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', 'í”¼ë“œì— ëŒ€í•œ ì‚¬ìš©ìž ì •ì˜ ì´ë¦„ì„ ìž…ë ¥í•  수 있습니다 (ì„ íƒ ì‚¬í•­ì´ë©°, 비워둘 경우 "feed"로 ìžë™ 표시ë¨)'); +@define('SYNDICATION_PLUGIN_COMMENTNAME', 'ë§ê¸€ í”¼ë“œì— í‘œì‹œí•  ì´ë¦„'); +@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', 'ë§ê¸€ í”¼ë“œì— ëŒ€í•œ ì‚¬ìš©ìž ì •ì˜ ì´ë¦„ì„ ìž…ë ¥í•  수 있습니다 (ì„ íƒ ì‚¬í•­)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(만약 ì—¬ê¸°ì— http://...로 시작하는 절대 경로를 입력했다면 피드버너 설정ì—서 "강제로"를 ì„ íƒí–ˆì„ 때 ì´ ì£¼ì†Œë¥¼ 리다ì´ë ‰íЏ 대ìƒìœ¼ë¡œ 사용하게 ë©ë‹ˆë‹¤. 그리고 ì´ ì£¼ì†ŒëŠ” 피드버너와 ë…립ì ì¼ 수 있다는 ì ë„ 참고하십시오. ì‹ ê·œ 구글 í”¼ë“œë²„ë„ˆì˜ ê²½ìš° http://feeds2.feedburner.com/yourfeedname ì‹ìœ¼ë¡œ 입력해야 합니다.)'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', 'If you set this option to "Force" you can forward the RSS feed to any webservice, not only FeedBurner. Look at the option "Feedburner ID" below to enter an absolute URL)'); -@define('COMMENTS_FILTER_NEED_CONFIRM', 'Pending user confirmation'); -@define('NOT_WRITABLE_SPARTACUS', ' (Only required when you plan to use Spartacus plugin for remote plugin download)'); -@define('MEDIA_ALT', 'ALT-Attribute (depiction or short description)'); -@define('MEDIA_PROPERTY_ALT', 'Depiction (summary for ALT-Attribute)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', 'ì´ ì„¤ì •ì„ "강제로"로 ì„ íƒí–ˆì„ 경우 피드버너 ë¿ë§Œ ì•„ë‹ˆë¼ ë‹¤ë¥¸ 웹 ì„œë¹„ìŠ¤ë¡œë„ RSS 피드를 전달할 수 있습니다. ì•„ëž˜ì˜ "피드버너 ID" ì„¤ì •ì„ ë³´ê³  절대 경로를 입력하십시오.'); +@define('COMMENTS_FILTER_NEED_CONFIRM', 'ì‚¬ìš©ìž ìŠ¹ì¸ ëŒ€ê¸° 중'); +@define('NOT_WRITABLE_SPARTACUS', ' (스파르타쿠스 플러그ì¸ì„ 통해 ì›ê²© 플러그ì¸ì„ ë‚´ë ¤ë°›ì„ ê²½ìš°ì—ë§Œ 필요함)'); +@define('MEDIA_ALT', 'ALT ì†ì„± (묘사 ë˜ëŠ” ì§§ì€ ì„¤ëª…)'); +@define('MEDIA_PROPERTY_ALT', '묘사 (ALT ì†ì„±ì— 대한 요약)'); -@define('MEDIA_TITLE', 'TITLE-Attribute (will be displayed on mouse over)'); +@define('MEDIA_TITLE', 'TITLE ì†ì„± (마우스 커서를 ìœ„ì— ëŒ€ë©´ 표시ë¨)'); -@define('QUICKSEARCH_SORT', 'How should search-results be sorted?'); +@define('QUICKSEARCH_SORT', '검색 결과를 어떻게 정렬하겠습니까?'); -@define('QUICKSEARCH_SORT_RELEVANCE', 'Relevance'); +@define('QUICKSEARCH_SORT_RELEVANCE', '정확ë„'); -@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author'); +@define('PERMISSION_HIDDENGROUP', '숨겨진 그룹 / 비작성ìž'); -@define('SEARCH_FULLENTRY', 'Show full entry'); -@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)'); -@define('NAV_LINK_TEXT', 'Enter the navbar link text'); -@define('NAV_LINK_URL', 'Enter the full URL of your link'); -@define('MODERATE_SELECTED_COMMENTS', 'Accept selected comments'); -@define('WEBLOG', 'Weblog'); -@define('ACTIVE_COMMENT_SUBSCRIPTION', 'Subscribed'); -@define('PENDING_COMMENT_SUBSCRIPTION', 'Pending confirmation'); -@define('NO_COMMENT_SUBSCRIPTION', 'Not subscribed'); -@define('SUMMARY', 'Summary'); +@define('SEARCH_FULLENTRY', '글 전체를 보여주기'); +@define('NAVLINK_AMOUNT', '내비게ì´ì…˜ì— 표시할 ë§í¬ì˜ 수 ìž…ë ¥ (ìŠ¤íƒ€ì¼ ê´€ë¦¬ 페ì´ì§€ë¥¼ 다시 불러들여야 함)'); +@define('NAV_LINK_TEXT', '내비게ì´ì…˜ ë§í¬ì— 표시할 문구 ìž…ë ¥'); +@define('NAV_LINK_URL', 'ë§í¬ì˜ ì „ì²´ 주소(URL) ìž…ë ¥'); +@define('MODERATE_SELECTED_COMMENTS', 'ì„ íƒí•œ ë§ê¸€ 승ì¸'); +@define('WEBLOG', '웹로그'); +@define('ACTIVE_COMMENT_SUBSCRIPTION', '구ë…ë¨'); +@define('PENDING_COMMENT_SUBSCRIPTION', 'êµ¬ë… ëŒ€ê¸° 중'); +@define('NO_COMMENT_SUBSCRIPTION', '구ë…ë˜ì§€ 않ìŒ'); +@define('SUMMARY', '요약'); // Next lines were added on 2012/05/29 -@define('ABOUT_TO_DELETE_FILES', 'You are about to delete a bunch of files at once.
        If you are using these in some of your entries, it will cause dead links or images
        Are you sure you wish to proceed?

        '); -@define('ARCHIVE_SORT_STABLE', 'Stable Archives'); -@define('ARCHIVE_SORT_STABLE_DESC', 'Sort the archive-pages descending, so they are stable and search-crawler do not have to reindex them.'); -@define('PLAIN_ASCII_NAMES', '(no special characters, umlauts)'); +@define('ABOUT_TO_DELETE_FILES', '여러 ê°œì˜ íŒŒì¼ì„ í•œêº¼ë²ˆì— ì§€ìš°ë ¤ê³  하고 있습니다.
        만약 ìž‘ì„±í–ˆë˜ ê¸€ì— ì´ë“¤ 중 ì¼ë¶€ë¥¼ 사용하고 있다면 깨진 ë§í¬ë‚˜ 그림으로 나타날 것입니다.
        ê·¸ëž˜ë„ ê³„ì† ì§„í–‰í•˜ê² ìŠµë‹ˆê¹Œ?

        '); +@define('ARCHIVE_SORT_STABLE', '안정ì ì¸ 글 목ë¡'); +@define('ARCHIVE_SORT_STABLE_DESC', '글 ëª©ë¡ íŽ˜ì´ì§€ë¥¼ 내림차순으로 정렬하여 안정ì ì¸ ìƒíƒœë¥¼ 유지함으로서 검색엔진 ë´‡ì´ ë‹¤ì‹œ 색ì¸í•˜ì§€ ì•Šì•„ë„ ë˜ë„ë¡ í•©ë‹ˆë‹¤.'); +@define('PLAIN_ASCII_NAMES', '(특수 문ìžë‚˜ ë³€ì´ë¶€í˜¸ ë“±ì„ ì“°ì§€ 마십시오)'); // New 2.0 constants -@define('SIMPLE_FILTERS', 'Simplified filters'); -@define('SIMPLE_FILTERS_DESC', 'When enabled, search forms and filter functions are reduced to essential options. When disabled, you will see every possible filter option, i.e. in the media library or the entry editor.'); -@define('TOGGLE_SELECT', 'Mark for selection'); -@define('MORE', 'More'); -@define('ENTRY_STATUS', 'Entry status'); -@define('SCHEDULED', 'Scheduled'); -@define('PUBLISHED', 'Published'); -@define('ENTRY_METADATA', 'Entry metadata'); -@define('NAVIGATION', 'Navigation'); -@define('MAIN_MENU', 'Main menu'); -@define('MENU_PERSONAL', 'Personal menu'); -@define('MENU_DASHBOARD', 'Dashboard'); -@define('MENU_ACTIVITY', 'Activity'); -@define('MENU_SETTINGS', 'Settings'); -@define('MENU_TEMPLATES', 'Templates'); -@define('MENU_PLUGINS', 'Plugins'); -@define('MENU_USERS', 'Users'); -@define('MENU_GROUPS', 'Groups'); -@define('MENU_MAINTENANCE', 'Maintenance'); -@define('ALIGN_TOP', 'Top'); -@define('ALIGN_LEFT', 'Left'); -@define('ALIGN_RIGHT', 'Right'); -@define('SHOW_METADATA', 'Show metadata'); -@define('RANGE_FROM', 'From'); -@define('RANGE_TO', 'To'); -@define('UPLOAD', 'Upload'); -@define('DOWNLOAD', 'Download'); -@define('ENTRY_PUBLISHED', 'Entry #%s published'); -@define('PUBLISH_ERROR', 'Error publishing entry:'); -@define('UPDATE_NOTIFICATION', 'Update notification'); -@define('NEW_VERSION_AVAILABLE', 'New stable Serendipity version available: '); -@define('MOVE', 'Move'); -@define('MOVE_UP', 'Move up'); -@define('MOVE_DOWN', 'Move down'); -@define('INSTALL_NEW_SIDEBAR_PLUGIN', 'Install a new sidebar plugin'); -@define('INSTALL_NEW_EVENT_PLUGIN', 'Install a new event plugin'); -@define('TEMPLATE_OPTIONS', 'Template options'); -@define('CURRENT_TEMPLATE', 'Current Template'); -@define('TEMPLATE_INFO', 'Show template info'); -@define('AVAILABLE_TEMPLATES', 'Available Templates'); -@define('TIMESTAMP_RESET', 'The timestamp has been reset to the current time.'); +@define('SIMPLE_FILTERS', 'ê°„ì†Œí™”ëœ í•„í„°'); +@define('SIMPLE_FILTERS_DESC', '사용할 경우 검색 입력창과 í•„í„° ê¸°ëŠ¥ì„ í•„ìˆ˜ìš”ì†Œë§Œ 남ê¹ë‹ˆë‹¤. 사용하지 ì•Šì„ ê²½ìš° 가능한 모든 í•„í„° ê¸°ëŠ¥ì´ ë‹¤ 나타납니다 - 미디어 보관함ì´ë‚˜ 글 편집기ì—ë„ ë³´ìž…ë‹ˆë‹¤.'); +@define('TOGGLE_SELECT', 'ì„ íƒì‚¬í•­ 표시'); +@define('MORE', 'ë” ë³´ê¸°'); +@define('ENTRY_STATUS', 'ê¸€ì˜ ìƒíƒœ'); +@define('SCHEDULED', '예약ë¨'); +@define('PUBLISHED', '게시ë¨'); +@define('ENTRY_METADATA', 'ê¸€ì˜ ë©”íƒ€ë°ì´í„°'); +@define('NAVIGATION', '내비게ì´ì…˜'); +@define('MAIN_MENU', '주 메뉴'); +@define('MENU_PERSONAL', 'ê°œì¸ ë©”ë‰´'); +@define('MENU_DASHBOARD', '대시보드'); +@define('MENU_ACTIVITY', '활ë™ì‚¬í•­'); +@define('MENU_SETTINGS', '설정'); +@define('MENU_TEMPLATES', '템플릿'); +@define('MENU_PLUGINS', '플러그ì¸'); +@define('MENU_USERS', '사용ìž'); +@define('MENU_GROUPS', '그룹'); +@define('MENU_MAINTENANCE', '유지관리'); +@define('ALIGN_TOP', '위'); +@define('ALIGN_LEFT', '왼쪽'); +@define('ALIGN_RIGHT', '오른쪽'); +@define('SHOW_METADATA', '메타ë°ì´í„° 표시'); +@define('RANGE_FROM', '시작:'); +@define('RANGE_TO', 'ë:'); +@define('UPLOAD', '올려주기(업로드)'); +@define('DOWNLOAD', '내려받기(다운로드)'); +@define('ENTRY_PUBLISHED', '%s번 ê¸€ì„ ê²Œì‹œí•¨'); +@define('PUBLISH_ERROR', 'ê¸€ì„ ê²Œì‹œí•˜ëŠ” 중 오류 ë°œìƒ:'); +@define('UPDATE_NOTIFICATION', 'ì—…ë°ì´íЏ 알림'); +@define('NEW_VERSION_AVAILABLE', 'ì„¸ë Œë””í”¼í‹°ì˜ ìƒˆë¡œìš´ 안정화 ë²„ì „ì´ ìžˆìŠµë‹ˆë‹¤: '); +@define('MOVE', 'ì´ë™'); +@define('MOVE_UP', '위로 ì´ë™'); +@define('MOVE_DOWN', '아래로 ì´ë™'); +@define('INSTALL_NEW_SIDEBAR_PLUGIN', '새로운 옆줄 í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜í•˜ê¸°'); +@define('INSTALL_NEW_EVENT_PLUGIN', '새로운 ì´ë²¤íЏ í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜í•˜ê¸°'); +@define('TEMPLATE_OPTIONS', '템플릿 ì„ íƒ ì‚¬í•­'); +@define('CURRENT_TEMPLATE', '현재 사용 ì¤‘ì¸ í…œí”Œë¦¿'); +@define('TEMPLATE_INFO', '템플릿 ì •ë³´ 보기'); +@define('AVAILABLE_TEMPLATES', '사용할 수 있는 템플릿'); +@define('TIMESTAMP_RESET', 'ìž‘ì„±ì‹œê°„ì„ í˜„ìž¬ì‹œê°„ìœ¼ë¡œ 초기화 했습니다.'); -@define('CLEANCOMPILE_PASS', '[smarty clearCompiledTemplate(%s)]'); -@define('CLEANCOMPILE_FAIL', 'No files available for clearing.'); -@define('CLEANCOMPILE_TITLE', 'Clear template cache'); -@define('CLEANCOMPILE_INFO', 'This will purge all compiled template files of the currently active template. Compiled templates will be automatically re-created on demand by the Smarty framework.'); -@define('INSTALLER_KEY', 'Key'); -@define('INSTALLER_VALUE', 'Value'); -@define('CURRENT_TAB', 'Current tab: '); -@define('PINGBACKS', 'Pingbacks'); -@define('NO_PINGBACKS', 'No Pingbacks'); -@define('GROUP_NAME_DESC', "Use as uppercased eg. 'EXAMPLE_GROUP' name, but not as a constant 'USERLEVEL_XYZ' group name."); -@define('INSTALLER_CLI_TOOLS', 'Server-side command line tools'); -@define('INSTALLER_CLI_TOOLNAME', 'CLI tool'); -@define('INSTALLER_CLI_TOOLSTATUS', 'Executable?'); -@define('VIDEO', 'Video'); -@define('RESET_FILTERS', 'Reset filters'); -@define('UPDATE_FAILMSG', 'Check for new Serendipity version failed. This can happen because either the URL https://raw.github.com/s9y/Serendipity/master/docs/RELEASE is down, your server blocks outgoing connections or there are other connection issues.'); -@define('UPDATE_FAILACTION', 'Disable automatic update check'); -@define('UPDATE_NOTIFICATION_DESC', 'Show the update notification in the Dashboard, and for which channel?'); -@define('FRONTEND', 'Frontend'); -@define('BACKEND', 'Backend'); -@define('MEDIA_UPLOAD_RESIZE', 'Resize before Upload'); -@define('MEDIA_UPLOAD_RESIZE_DESC', 'Resize images before the upload using Javascript. This will also change the uploader to use Ajax and thus remove the Property-Button'); -@define('LOG_LEVEL', 'Log Level'); -@define('LOG_LEVEL_DESC', 'At certain places in the Serendipity code we have placed debugging breakpoints. If this option is set to "Debug", it will write this debug output to templates_c/logs/. You should only enable this option if you are experiencing bugs in those areas, or if you are a developer. Setting this option to "Error" will enable logging PHP errors, overwriting the PHP error_log setting.'); -@define('DEBUG', 'Debug'); -@define('CUSTOM_CONFIG', 'Custom configuration file'); -@define('PLUGIN_ALREADY_INSTALLED', 'Plugin already installed, and does not support multiple installation ("stackable").'); -@define('INSTALL_DBPREFIX_INVALID', 'The database table name prefix must not be empty and may only contain letters, numbers and the underscore character.'); -@define('SYNDICATION_PLUGIN_SUBTOME', 'subToMe'); -@define('SYNDICATION_PLUGIN_SUBTOME_DESC', 'Show the subToMe button, a layer to make feed subscription easier'); -@define('SYNDICATE_THIS_BLOG', 'Subscribe'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file. Set to "none" to show a textlink (the old default)'); -@define('INSTALL_BACKENDPOPUP', 'Enable use of popup windows for the backend'); -@define('INSTALL_BACKENDPOPUP_DESC', 'Do you want to use popup windows for some backend functionality? When disabled (default), inline modal dialogs will be used for e.g. the category selector and media library.'); -@define('UPDATE_STABLE', 'stable'); -@define('UPDATE_BETA', 'beta'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT', 'Feed format'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', 'Which format shall be used for all feeds. Both are supported in all common readers'); -@define('SYNDICATION_PLUGIN_COMMENTFEED', 'Comment feed'); -@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', 'Show an additional link to a comment feed. This should be interesting only to the blogauthor itself'); -@define('SYNDICATION_PLUGIN_FEEDICON', 'Feed icon'); -@define('SYNDICATION_PLUGIN_FEEDICON_DESC', 'Show a (big) icon insteaf of a textlink to the feed. Set to "none" to deactivate, or to "feedburner" to show a feedburner counter if an id is given below'); -@define('SYNDICATION_PLUGIN_CUSTOMURL', 'Custom URL'); -@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', 'If you want to link to the custom feed specified in the blog configuration, enable this option.'); -@define('FEED_CUSTOM', 'Custom feed URL'); -@define('FEED_CUSTOM_DESC', 'If set, a custom feed URL can be set to forward Feedreaders to a specific URL. Useful for statistical analyzers like Feedburner, in which case you would enter your Feedburner-URL here.'); -@define('FEED_FORCE', 'Force custom feed URL?'); -@define('FEED_FORCE_DESC', 'If enabled, the URL entered above will be mandatory for Feedreaders, and your usual feed cannot be accessed from clients.'); -@define('NO_UPDATES', 'No plugin updates are available'); -@define('PLUGIN_GROUP_ALL', 'All categories'); +@define('CLEANCOMPILE_PASS', '컴파ì¼ëœ 템플릿 비우기-[smarty clearCompiledTemplate(%s)]'); +@define('CLEANCOMPILE_FAIL', '삭제할 파ì¼ì´ 없습니다.'); +@define('CLEANCOMPILE_TITLE', '템플릿 ìºì‹œ 비우기'); +@define('CLEANCOMPILE_INFO', '현재 사용 ì¤‘ì¸ í…œí”Œë¦¿ì— ëŒ€í•´ 컴파ì¼ëœ 템플릿 파ì¼ì„ ëª¨ë‘ ì‚­ì œí•˜ëŠ” 기능입니다. 컴파ì¼ëœ í…œí”Œë¦¿ì€ ìŠ¤ë§ˆí‹° 프레임워í¬ì— ì˜í•´ í•„ìš”ì— ë”°ë¼ ìžë™ìœ¼ë¡œ 재ìƒì„±ë©ë‹ˆë‹¤.'); +@define('INSTALLER_KEY', '키'); +@define('INSTALLER_VALUE', 'ê°’'); +@define('CURRENT_TAB', '현재 탭: '); +@define('PINGBACKS', 'í•‘ë°±'); +@define('NO_PINGBACKS', 'í•‘ë°± ì—†ìŒ'); +@define('GROUP_NAME_DESC', "언어 파ì¼ì—서 ì •ì˜ëœ ìƒìˆ˜ë¥¼ ì—¬ê¸°ì— ìž…ë ¥í•  경우 (예: 'USERLEVEL_EDITOR_DESC') ì´ ìƒìˆ˜ì˜ ë²ˆì—­ëœ í˜•íƒœê°€ 표시ë©ë‹ˆë‹¤. ì§ì ‘ ìƒìˆ˜ë¥¼ ì •ì˜í•˜ê³  ê·¸ ì´ë¦„ì„ ì—¬ê¸°ì— ìž…ë ¥í•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. ë²ˆì—­ì´ ë˜ëŠ” 그룹 ì´ë¦„ì„ ì‚¬ìš©í•˜ì§€ 않으려고 한다면 ìƒìˆ˜ ì™¸ì˜ ë¬¸ìžì—´ë¡œ ìžìœ ë¡­ê²Œ 입력하면 ë©ë‹ˆë‹¤."); +@define('INSTALLER_CLI_TOOLS', '서버측 커맨드ë¼ì¸ ë„구'); +@define('INSTALLER_CLI_TOOLNAME', '커맨드ë¼ì¸ ì¸í„°íŽ˜ì´ìФ(CLI) ë„구'); +@define('INSTALLER_CLI_TOOLSTATUS', '실행 가능 ìƒíƒœìž…니까?'); +@define('VIDEO', 'ë™ì˜ìƒ'); +@define('RESET_FILTERS', 'í•„í„° 초기화 하기'); +@define('UPDATE_FAILMSG', '새로운 세렌디피티 ë²„ì „ì„ í™•ì¸í•˜ëŠ”ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. https://raw.github.com/s9y/Serendipity/master/docs/RELEASE ì£¼ì†Œì— ì´ìƒì´ ìƒê²¼ê±°ë‚˜, 서버가 외부 ì ‘ì†ì„ 차단하고 있거나, ê·¸ ì™¸ì˜ ì ‘ì† ë¬¸ì œê°€ ë°œìƒí•œ 것으로 보입니다.'); +@define('UPDATE_FAILACTION', 'ìžë™ ì—…ë°ì´íЏ 확ì¸ì„ 사용하지 않기'); +@define('UPDATE_NOTIFICATION_DESC', 'ëŒ€ì‹œë³´ë“œì— ì—…ë°ì´íЏ ì•Œë¦¼ì„ í‘œì‹œí•˜ê³ , ì–´ë–¤ 채ë„ì— ë‚˜íƒ€ë‚´ê² ìŠµë‹ˆê¹Œ?'); +@define('FRONTEND', '외부 페ì´ì§€'); +@define('BACKEND', '관리 페ì´ì§€'); +@define('MEDIA_UPLOAD_RESIZE', '올리기 ì „ í¬ê¸° ì¡°ì ˆ'); +@define('MEDIA_UPLOAD_RESIZE_DESC', 'ì„œë²„ì— ê·¸ë¦¼ì„ ì˜¬ë¦¬ê¸° ì „ì— ìžë°”스í¬ë¦½íŠ¸ë¡œ í¬ê¸°ë¥¼ 조절합니다. ì´ ê²½ìš° 올리는 ê¸°ëŠ¥ì´ Ajax를 쓰게 ë˜ë¯€ë¡œ 등ë¡ì •ë³´ ë²„íŠ¼ì„ í‘œì‹œí•˜ì§€ 않게 ë©ë‹ˆë‹¤.'); +@define('LOG_LEVEL', '로그 ê¸°ë¡ ìˆ˜ì¤€'); +@define('LOG_LEVEL_DESC', '세렌디피티 코드 ë‚´ì˜ íŠ¹ì • ë¶€ë¶„ì— ë””ë²„ê·¸ 중단ì ì„ 배치해 ë‘었습니다. ì´ ì„¤ì •ì„ "디버그"로 둘 경우 ì´ëŸ¬í•œ 위치ì—서 ë°œìƒí•œ 디버그 ì¶œë ¥ë‚´ì—­ì„ templates_c/logs/ì— ê¸°ë¡í•˜ê²Œ ë©ë‹ˆë‹¤. 특정 부분ì—서 버그가 ë°œìƒí•˜ê³  있거나 본ì¸ì´ 개발ìžì¸ 경우ì—ë§Œ ì´ ì„¤ì •ì„ ì‚¬ìš©í•˜ê¸° ë°”ëžë‹ˆë‹¤. ì´ ì„¤ì •ì„ "오류"로 ë‘ë©´ PHP ì—러를 기ë¡í•˜ê²Œ ë˜ë©° PHP error_log ì„¤ì •ì„ ë®ì–´ì”니다.'); +@define('DEBUG', '디버그'); +@define('CUSTOM_CONFIG', '사용ìží™”ëœ ì„¤ì • 파ì¼'); +@define('PLUGIN_ALREADY_INSTALLED', '플러그ì¸ì´ ì´ë¯¸ 설치ë˜ì—ˆìœ¼ë©°, 다중 설치 ("겹침") ì§€ì›ì„ 하지 않습니다.'); +@define('INSTALL_DBPREFIX_INVALID', 'ë°ì´í„°ë² ì´ìФ í…Œì´ë¸” ì´ë¦„ì˜ ì ‘ë‘사는 비워둘 수 없으며 ì˜ë¬¸ìž, 숫ìž, 그리고 밑줄 문ìž("_")ë§Œ 허용ë©ë‹ˆë‹¤.'); +@define('SYNDICATION_PLUGIN_SUBTOME', '서브투미(subToMe)'); +@define('SYNDICATION_PLUGIN_SUBTOME_DESC', '서브투미(subToMe) ë²„íŠ¼ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. ì´ëŠ” 피드 구ë…ì„ ë” ì‰½ê²Œ 하ë„ë¡ ë„와주는 계층입니다.'); +@define('SYNDICATE_THIS_BLOG', '구ë…하기'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'ì˜†ì¤„ì— ë‚˜íƒ€ë‚˜ëŠ” 피드 맨 ìœ„ì— (대형) ê·¸ë¦¼ì„ í‘œì‹œí•©ë‹ˆë‹¤. 그림 파ì¼ì— 대한 ì „ì²´ ë˜ëŠ” 절대 경로를 입력합니다. "ì—†ìŒ"으로 설정하면 ë¬¸ìž ë§í¬ë¥¼ 표시합니다(예전 기본 설정).'); +@define('INSTALL_BACKENDPOPUP', '관리 페ì´ì§€ì—서 íŒì—… ì°½ì„ ì‚¬ìš©í•  수 있게 함'); +@define('INSTALL_BACKENDPOPUP_DESC', 'ì¼ë¶€ 관리 페ì´ì§€ 기능ì—서 íŒì—… ì°½ì„ ì‚¬ìš©í•˜ê³ ìž í•©ë‹ˆê¹Œ? 사용하지 ì•Šì„ ê²½ìš° (기본값) ì¸ë¼ì¸ 모달 대화ìƒìžë¥¼ 범주 ì„ íƒ, 미디어 보관함 ë“±ì— ì‚¬ìš©í•˜ê²Œ ë©ë‹ˆë‹¤.'); +@define('UPDATE_STABLE', '안정화 버전'); +@define('UPDATE_BETA', '베타 버전'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT', '피드 규격'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', '모든 í”¼ë“œì— ì‚¬ìš©í•  ê·œê²©ì„ ì„ íƒí•©ë‹ˆë‹¤. 둘 다 ì¼ë°˜ì ì¸ 리ë”ì—서 ëª¨ë‘ ì§€ì›í•©ë‹ˆë‹¤.'); +@define('SYNDICATION_PLUGIN_COMMENTFEED', 'ë§ê¸€ 피드'); +@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', 'ë§ê¸€ 피드를 추가로 표시합니다. 대개 블로그 작성ìžì—게만 ê´€ì‹¬ì´ ê°ˆ 것입니다.'); +@define('SYNDICATION_PLUGIN_FEEDICON', '피드 ì•„ì´ì½˜'); +@define('SYNDICATION_PLUGIN_FEEDICON_DESC', 'í”¼ë“œì— ë¬¸ìž ë§í¬ 대신 (대형) ì•„ì´ì½˜ì„ 표시합니다. "ì—†ìŒ"으로 설정하면 나타나지 않으며, "피드버너"를 ì„ íƒí•  경우 ì•„ëž˜ì— ID를 입력하면 피드버너 카운터를 표시합니다.'); +@define('SYNDICATION_PLUGIN_CUSTOMURL', '사용ìží™”ëœ ì£¼ì†Œ(URL)'); +@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', '블로그 ì„¤ì •ì— ì§€ì •í•œ 사용ìží™”ëœ í”¼ë“œë¡œ ë§í¬ë¥¼ í•  경우 ì´ ì„¤ì •ì„ ì‚¬ìš©í•©ë‹ˆë‹¤.'); +@define('FEED_CUSTOM', '사용ìží™”ëœ í”¼ë“œì˜ ì£¼ì†Œ(URL)'); +@define('FEED_CUSTOM_DESC', '사용할 경우 피드 리ë”ê°€ 특정 주소로 방문하ë„ë¡ ë³„ë„ì˜ ì‚¬ìš©ìží™”ëœ í”¼ë“œ 주소를 설정할 수 있습니다. 피드버너와 ê°™ì´ í†µê³„ ë¶„ì„ ê¸°ëŠ¥ì´ ìžˆì„ ë•Œ 유용하며, ì´ ê²½ìš° 피드버너 주소(URL)를 입력하면 ë©ë‹ˆë‹¤.'); +@define('FEED_FORCE', '사용ìží™”ëœ í”¼ë“œì˜ ì£¼ì†Œë¥¼ 강제로 사용합니까?'); +@define('FEED_FORCE_DESC', '사용할 경우 ìœ„ì— ìž…ë ¥í•œ 주소가 모든 피드 리ë”ì—서 ì˜ë¬´ì ìœ¼ë¡œ 사용ë˜ë©° ì¼ë°˜ì ì¸ 피드는 접근할 수 없게 ë©ë‹ˆë‹¤.'); +@define('NO_UPDATES', 'í”ŒëŸ¬ê·¸ì¸ ì—…ë°ì´íŠ¸ê°€ 없습니다'); +@define('PLUGIN_GROUP_ALL', '모든 범주'); -@define('CONF_USE_AUTOSAVE', 'Enable autosave-feature'); -@define('CONF_USE_AUTOSAVE_DESC', 'When enabled, the text you enter into blog entries will be periodically saved in your browser\'s session storage. If your browser crashes during writing, the next time you create a new entry, the text will be restored from this autosave.'); -@define('INSTALL_CAT_FEEDS', 'Feed Settings'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'Toolbar for WYSIWYG editor'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'Sets the list of available toolbar buttons for the WYSIWYG-Editor. If you need to further change those presets, you can create a file templates/XXX/admin/ckeditor_custom_config.js. For further details please check out the files htmlarea/ckeditor_s9y_config.js and htmlarea/ckeditor_s9y_plugin.js.'); -@define('USERCONF_WYSIWYG_PRESET_S9Y', 'Serendipity (default)'); -@define('USERCONF_WYSIWYG_PRESET_BASIC', 'Reduced'); -@define('USERCONF_WYSIWYG_PRESET_FULL', 'Full'); -@define('USERCONF_WYSIWYG_PRESET_STANDARD', 'Alternate'); -@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', 'Force: Serendipity'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', 'Force: Reduced'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Force: Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Force: Alternate'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Force: CKEditor Full'); +@define('CONF_USE_AUTOSAVE', 'ìžë™ 저장 기능 사용'); +@define('CONF_USE_AUTOSAVE_DESC', '사용할 경우 블로그 ê¸€ì— ìž…ë ¥í•œ ë‚´ìš©ì„ ë¸Œë¼ìš°ì €ì˜ 세션 ì €ìž¥ì†Œì— ì£¼ê¸°ì ìœ¼ë¡œ 저장하게 ë©ë‹ˆë‹¤. 글 작성 중 브ë¼ìš°ì €ê°€ ë¹„ì •ìƒ ì¢…ë£Œë  ê²½ìš° ë‹¤ìŒ ë²ˆì— ìƒˆë¡œ ê¸€ì„ ìž‘ì„±í•  때 본문 ë‚´ìš©ì´ ìžë™ 저장ì—서 복구ë˜ì–´ 표시ë©ë‹ˆë‹¤.'); +@define('INSTALL_CAT_FEEDS', '피드 설정'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'WYSIWYG íŽ¸ì§‘ê¸°ì˜ ë„구 모ìŒ'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'WYSIWYG íŽ¸ì§‘ê¸°ì— í‘œì‹œí•  수 있는 ë„구 ëª¨ìŒ ë²„íŠ¼ì˜ ëª©ë¡ì„ 설정합니다. 기본 설정 묶ìŒ(프리셋)ì„ ì¶”ê°€ì ìœ¼ë¡œ ë³€ê²½í•˜ê³ ìž í•  경우 templates/XXX/admin/ckeditor_custom_config.js 파ì¼ì„ 만들면 ë©ë‹ˆë‹¤. 보다 ìžì„¸í•œ ì‚¬í•­ì€ htmlarea/ckeditor_s9y_config.js ë° htmlarea/ckeditor_s9y_plugin.js 파ì¼ì„ 참고하기 ë°”ëžë‹ˆë‹¤.'); +@define('USERCONF_WYSIWYG_PRESET_S9Y', '세렌디피티 (기본값)'); +@define('USERCONF_WYSIWYG_PRESET_BASIC', 'ê°„ì†Œí™”ëœ ê¸°ëŠ¥'); +@define('USERCONF_WYSIWYG_PRESET_FULL', 'ì „ì²´ 기능'); +@define('USERCONF_WYSIWYG_PRESET_STANDARD', '대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor ì „ì²´ 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', 'ê°•ì œ 사용: 세렌디피티'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', 'ê°•ì œ 사용: ê°„ì†Œí™”ëœ ê¸°ëŠ¥'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'ê°•ì œ 사용: ì „ì²´ 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'ê°•ì œ 사용: 대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'ê°•ì œ 사용: CKEditor ì „ì²´ 기능'); -@define('CATEGORY_PLUGIN_SHOWALL', 'Show a link to "All categories"?'); -@define('CATEGORY_PLUGIN_SHOWALL', 'If enabled, a link for the visitor to display the blog with no category restriction will be added.'); -@define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity requires a PHP version >= %2$s - you are running a lower version (%1$s) and need to upgrade your PHP version. Most providers offer you to switch to newer PHP versions through their admin panels or .htaccess directives.'); -@define('TOGGLE_VIEW', 'Switch category view mode'); -@define('PUBLISH_NOW', 'Publish this entry now (sets current time and date)'); -@define('EDITOR_TAGS', 'Tags'); -@define('EDITOR_NO_TAGS', 'No tags'); -@define('DASHBOARD_ENTRIES', 'In Progress'); -@define('INSTALL_PASSWORD2', 'Admin password (verify)'); -@define('INSTALL_PASSWORD2_DESC', 'Password for admin login, enter again to verify.'); -@define('INSTALL_PASSWORD_INVALID', 'Your entered passwords for the administrator user do not match.'); -@define('INSTALL_BACKENDPOPUP_GRANULAR', 'Force specific backend popups'); -@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'If you generally disable backend popups, you can specifically force using popups for specific places by entering a comma seperated list of places here. Available places are: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open %1$s manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. Return to previous page.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. Return to previous page.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. Note: This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('CATEGORY_PLUGIN_SHOWALL', '"모든 범주"ì— ëŒ€í•œ ë§í¬ 표시'); +@define('CATEGORY_PLUGIN_SHOWALL', '사용할 경우 범주 제한 ì—†ì´ ë¸”ë¡œê·¸ë¥¼ 보여주는 ë§í¬ë¥¼ 방문ìžê°€ ë³¼ 수 있게 추가합니다.'); +@define('SERENDIPITY_PHPVERSION_FAIL', '세렌디피티는 PHP 버전 %2$s ì´ìƒì´ 필요합니다. 현재 ì‹œìŠ¤í…œì€ ë” ë‚®ì€ ë²„ì „ (%1$s)ì„ ì‚¬ìš©í•˜ê³  있으므로 업그레ì´ë“œ 해야 합니다. ëŒ€ë¶€ë¶„ì˜ í˜¸ìŠ¤íŒ… 서비스 제공ìžë“¤ì€ ê´€ë¦¬ìž í™”ë©´ì´ë‚˜ .htaccess 지시어 ë“±ì„ í†µí•´ 새로운 PHP 버전으로 업그레ì´ë“œí•  수 있는 ê¸°ëŠ¥ì„ ì œê³µí•©ë‹ˆë‹¤.'); +@define('TOGGLE_VIEW', '범주 표시 방법 변경'); +@define('PUBLISH_NOW', 'ì´ ê¸€ì„ ì§€ê¸ˆ 게시 (현재 날짜와 시간으로 설정)'); +@define('EDITOR_TAGS', '태그'); +@define('EDITOR_NO_TAGS', '태그 ì—†ìŒ'); +@define('DASHBOARD_ENTRIES', '작성 중'); +@define('INSTALL_PASSWORD2', 'ê´€ë¦¬ìž ì•”í˜¸ (다시 ìž…ë ¥)'); +@define('INSTALL_PASSWORD2_DESC', 'ê²€ì¦ì„ 위해 ê´€ë¦¬ìž ë¡œê·¸ì¸ì„ 위한 암호를 다시 입력합니다.'); +@define('INSTALL_PASSWORD_INVALID', '입력한 ê´€ë¦¬ìž ì•”í˜¸ê°€ ì¼ì¹˜í•˜ì§€ 않습니다.'); +@define('INSTALL_BACKENDPOPUP_GRANULAR', '특정 ê´€ë¦¬ìž í™”ë©´ íŒì—… ì°½ì„ ê°•ì œë¡œ 표시'); +@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'ì¼ë°˜ì ìœ¼ë¡œ ê´€ë¦¬ìž í™”ë©´ì˜ íŒì—… ì°½ì„ ì‚¬ìš©í•˜ê³  있지 ì•Šì„ ê²½ìš°ë¼ë„ íŒì—… ì°½ì„ ê°•ì œë¡œ ì‚¬ìš©í•˜ê³ ìž í•˜ëŠ” ê³³ì´ ìžˆìœ¼ë©´ ì—¬ê¸°ì— í•´ë‹¹ ìž¥ì†Œë“¤ì„ ê°ê° 쉼표로 분리하여 입력해둘 수 있습니다. 사용 가능한 장소는: '); +@define('START_UPDATE', 'ì—…ë°ì´íЏ 시작...'); +@define('UPDATE_ALL', 'ëª¨ë‘ ì—…ë°ì´íЏ'); +@define('JS_FAILURE', 'ì„¸ë Œë””í”¼í‹°ì˜ ìžë°”스í¬ë¦½íЏ ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ ë¶ˆëŸ¬ë“¤ì¼ ìˆ˜ 없습니다. ì´ëŠ” PHP나 í”ŒëŸ¬ê·¸ì¸ ì˜¤ë¥˜ ë•Œë¬¸ì— ë°œìƒí•  ìˆ˜ë„ ìžˆê³  브ë¼ìš°ì € ìºì‹œê°€ 비정ìƒì ì¼ 경우ì—ë„ ê²½í—˜í•  수 있습니다. 정확한 ìƒí™©ì„ íŒŒì•…í•˜ê³ ìž í•œë‹¤ë©´ %1$s 주소를 브ë¼ìš°ì €ì—서 수ë™ìœ¼ë¡œ ì—´ê³  오류 ë‚´ìš©ì„ í™•ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤.'); +@define('THEMES_PREVIEW_BLOG', 'blog.s9y.orgì—서 ì‹œì—°ì„ í™•ì¸'); +@define('SYNDICATION_PLUGIN_XML_DESC', 'ë¬¸ìž ë§í¬ë§Œ 보여주기를 ì›í•  경우 "ì—†ìŒ"으로 설정합니다.'); +@define('MULTICHECK_NO_ITEM', 'ì„ íƒí•œ ì•„ì´í…œì´ 없습니다. 최소한 한 개를 ì„ íƒí•˜ì‹­ì‹œì˜¤. ì´ì „ 페ì´ì§€ë¡œ ëŒì•„가기.'); +@define('MULTICHECK_NO_DIR', 'ì„ íƒí•œ 디렉토리가 없습니다. 최고한 한 êµ°ë°ë¥¼ ì„ íƒí•˜ì‹­ì‹œì˜¤. ì´ì „ 페ì´ì§€ë¡œ ëŒì•„가기.'); +@define('BULKMOVE_INFO', '대량으로 ì´ë™í•˜ê¸°'); +@define('BULKMOVE_INFO_DESC', '여러 파ì¼ì„ ì„ íƒí•˜ì—¬ í•œêº¼ë²ˆì— ìƒˆë¡œìš´ 위치로 ì´ë™ì‹œí‚¬ 수 있습니다. 주ì˜: ì´ ìž‘ì—…ì€ ì—¬ëŸ¬ 파ì¼ì˜ 대량 삭제와 마찬가지로 ë˜ëŒë¦´ 수 없습니다. ì„ íƒí•œ 파ì¼ì€ 물리ì ìœ¼ë¡œ ì´ë™ë˜ë©° ì´ë¥¼ 참조하는 블로그 ê¸€ì€ ìƒˆ 위치를 참조하ë„ë¡ ìž¬ìž‘ì„±ë©ë‹ˆë‹¤.'); +@define('FIRST_PAGE', '첫 페ì´ì§€'); +@define('LAST_PAGE', '마지막 페ì´ì§€'); +@define('MEDIA_PROPERTIES_DONE', '%dë²ˆì˜ ë“±ë¡ì •ë³´ê°€ 변경ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('DIRECTORY_INFO', '디렉토리 ì •ë³´'); +@define('DIRECTORY_INFO_DESC', '디렉토리는 물리ì ì¸ í´ë”/디렉토리 ì´ë¦„ì„ ë°˜ì˜í•©ë‹ˆë‹¤. ì•„ì´í…œì„ í¬í•¨í•˜ê³  있는 디렉토리를 변경하거나 ì´ë™í•  경우 ë‘ ë°©ë²• 중 하나를 ì„ íƒí•´ì•¼ 합니다. ì›í•˜ëŠ” 디렉토리 ë˜ëŠ” 하위 디렉토리를 만든 ë‹¤ìŒ ë¯¸ë””ì–´ ë³´ê´€í•¨ì„ í†µí•´ 새 디렉토리로 ì•„ì´í…œì„ ì´ë™í•˜ê³  나면 ì›ëž˜ 디렉토리를 삭제하는 ê²ƒì´ í•œ 방법입니다. 다른 ë°©ë²•ì€ ì•„ëž˜ì˜ ë””ë ‰í† ë¦¬ 편집 ë²„íŠ¼ì„ ì‚¬ìš©í•˜ì—¬ ì›ëž˜ 디렉토리를 통째로 변경하고서 ì›í•˜ë˜ 다른 ì´ë¦„ (기존 하위 디렉토리/ + 새 ì´ë¦„)으로 바꾸는 것입니다. ì´ë ‡ê²Œ 하면 모든 디렉토리와 ì•„ì´í…œì„ ì´ë™ì‹œí‚¤ê³  참조하는 모든 블로그 ê¸€ì„ ë³€ê²½í•˜ê²Œ ë©ë‹ˆë‹¤.'); +@define('MEDIA_RESIZE_EXISTS', 'ë™ì¼í•œ í­ê³¼ 높ì´ë¥¼ 가진 파ì¼ì´ ì´ë¯¸ 존재합니다!'); +@define('USE_CACHE', 'ìºì‹œ 사용하기'); +@define('USE_CACHE_DESC', '특정 ë°ì´í„°ë² ì´ìФ 질ì˜ë¥¼ 반복하지 않ë„ë¡ ë‚´ë¶€ ìºì‹œë¥¼ 사용하ë„ë¡ í•©ë‹ˆë‹¤. 중간ì—서 ë†’ì€ ì ‘ì†ëŸ‰ì´ 걸리는 ì„œë²„ì˜ ë¶€í•˜ë¥¼ 줄ì´ë©° 페ì´ì§€ë¥¼ 불러오는 ì†ë„를 í–¥ìƒì‹œí‚µë‹ˆë‹¤.'); +@define('CONFIG_PERMALINK_PATH_DESC', '세렌디피티가 주소(URL)와 ìž‘ì—…ì„ ì œëŒ€ë¡œ ì—°ë™ì‹œí‚¬ 수 있ë„ë¡ ë°˜ë“œì‹œ ì ‘ë‘사를 지정해야 한다는 ì ì— 유ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤. ì ‘ë‘사는 고유한 ì´ë¦„ì´ë©´ 아무렇게나 지정할 수 있지만 비워둘 수는 없습니다. ì´ëŠ” 모든 ì ‘ë‘사 ì§€ì •ì‚¬í•­ì— ëŒ€í•´ ë™ì¼í•˜ê²Œ ì ìš©ë©ë‹ˆë‹¤.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_nl.inc.php b/lang/serendipity_lang_nl.inc.php index 4e2b33a9..fcb78d98 100644 --- a/lang/serendipity_lang_nl.inc.php +++ b/lang/serendipity_lang_nl.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_no.inc.php b/lang/serendipity_lang_no.inc.php index 0cb92539..9a9f0e52 100644 --- a/lang/serendipity_lang_no.inc.php +++ b/lang/serendipity_lang_no.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_pl.inc.php b/lang/serendipity_lang_pl.inc.php index 22c22302..566d8ad0 100644 --- a/lang/serendipity_lang_pl.inc.php +++ b/lang/serendipity_lang_pl.inc.php @@ -1110,3 +1110,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'a', 'A', 'b', 'B', 'c', 'C', 'c', 'C @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_pt.inc.php b/lang/serendipity_lang_pt.inc.php index 77a51c2d..f8c2ac71 100644 --- a/lang/serendipity_lang_pt.inc.php +++ b/lang/serendipity_lang_pt.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_pt_PT.inc.php b/lang/serendipity_lang_pt_PT.inc.php index a072e130..23e6f5f9 100644 --- a/lang/serendipity_lang_pt_PT.inc.php +++ b/lang/serendipity_lang_pt_PT.inc.php @@ -1123,3 +1123,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ro.inc.php b/lang/serendipity_lang_ro.inc.php index f666a5e9..4830e1c9 100644 --- a/lang/serendipity_lang_ro.inc.php +++ b/lang/serendipity_lang_ro.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ru.inc.php b/lang/serendipity_lang_ru.inc.php index e70d6ec5..1bf9523e 100644 --- a/lang/serendipity_lang_ru.inc.php +++ b/lang/serendipity_lang_ru.inc.php @@ -1115,3 +1115,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_sa.inc.php b/lang/serendipity_lang_sa.inc.php index 8e00ae58..c180b245 100644 --- a/lang/serendipity_lang_sa.inc.php +++ b/lang/serendipity_lang_sa.inc.php @@ -1031,3 +1031,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_se.inc.php b/lang/serendipity_lang_se.inc.php index 690b97d9..9967c34d 100644 --- a/lang/serendipity_lang_se.inc.php +++ b/lang/serendipity_lang_se.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_sk.inc.php b/lang/serendipity_lang_sk.inc.php index 49f9bb17..194ab901 100644 --- a/lang/serendipity_lang_sk.inc.php +++ b/lang/serendipity_lang_sk.inc.php @@ -1102,3 +1102,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ta.inc.php b/lang/serendipity_lang_ta.inc.php index 8701dd2e..a63f9397 100644 --- a/lang/serendipity_lang_ta.inc.php +++ b/lang/serendipity_lang_ta.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_tn.inc.php b/lang/serendipity_lang_tn.inc.php index 72382ca5..f8213b57 100644 --- a/lang/serendipity_lang_tn.inc.php +++ b/lang/serendipity_lang_tn.inc.php @@ -1116,3 +1116,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_tr.inc.php b/lang/serendipity_lang_tr.inc.php index d11c9148..f3d095e3 100644 --- a/lang/serendipity_lang_tr.inc.php +++ b/lang/serendipity_lang_tr.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_tw.inc.php b/lang/serendipity_lang_tw.inc.php index f18b5c2c..4ac96f88 100644 --- a/lang/serendipity_lang_tw.inc.php +++ b/lang/serendipity_lang_tw.inc.php @@ -1117,3 +1117,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_zh.inc.php b/lang/serendipity_lang_zh.inc.php index d4d10e8a..cb7f5631 100644 --- a/lang/serendipity_lang_zh.inc.php +++ b/lang/serendipity_lang_zh.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php index a2064927..e731e4c8 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php @@ -1,11 +1,12 @@ -BBCode е разрешено'); - @define('PLUGIN_EVENT_BBCODE_TARGET', 'Използване на target="blank" за връзките ?'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'ТекÑтово форматиране: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Форматиране на текÑÑ‚ (поÑтинг, коментар, HTML поле) Ñ BBcode'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Форматирането Ñ BBCode е разрешено'); +@define('PLUGIN_EVENT_BBCODE_TARGET', 'Използване на target="blank" за връзките ?'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php index cde94aa4..b15cc018 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'å…许使用BBCodeæ ¼å¼ä»£ç '); @define('PLUGIN_EVENT_BBCODE_TARGET', '处ç†é“¾æŽ¥æ—¶ä½¿ç”¨ target="blank"?(点击链接åŽåœ¨æ–°çª—壿˜¾ç¤ºç½‘页内容)'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php index e3752c37..92a80d4a 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -BBCode'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Použít pro odkazy target="_blank" (odkazy otevírat v novém oknÄ›)?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php index 505d0db5..92a80d4a 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -BBCode'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Použít pro odkazy target="_blank" (odkazy otevírat v novém oknÄ›)?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php index bf813539..2b04d4b0 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php @@ -1,13 +1,14 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchführen'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode-Formatierung erlaubt'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchführen'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode-Formatierung erlaubt'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" für Links?'); \ No newline at end of file +@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" für Links?'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php index 319a8569..c3e7a30b 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php @@ -1,12 +1,11 @@ - * EN-Revision: 690 */ -@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Formato BBCode permitido'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php index bd095c5e..5dc1631a 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -BBCode autorisée'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php index a0db4361..f45c1252 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 1410 */ @@ -11,4 +11,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BB コード 書å¼ã‚’許å¯ã—ã¾ã™ã€‚'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'リンクã«ã€Œtarget="blank"ã€ã‚’使ã„ã¾ã™ã‹?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php index 03836df3..51f29829 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php @@ -1,9 +1,8 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_BBCODE_NAME', '마í¬ì—…: BB코드'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마í¬ì—…ì„ ê¸€ì— ì ìš©í•¨'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BB코드를 ê¸€ì— ì“¸ 수 있습니다.'); +@define('PLUGIN_EVENT_BBCODE_NAME', '마í¬ì—…: BB코드'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마í¬ì—…ì„ ê¸€ì— ì ìš©í•¨'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BB코드를 ê¸€ì— ì“¸ 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php index 95aed405..206ad477 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -10,3 +10,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', 'PrzeksztaÅ‚caj tekst stosujÄ…c tagi BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode format dozwolony'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Używać target="blank" dla linków?'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php index 53e4036e..885b0b55 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -BBCode autorizada'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php index bb815192..ba170060 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Zapnúť (= prekladaÅ¥) oznaÄovací formát BBCode'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'PoužiÅ¥ pre odkazy target="_blank" (odkazy otváraÅ¥ v novom okne)?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php index c07674a8..4eb485c9 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode å¯ç”¨çš„æ ¼å¼'); -?> +@define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode å¯ç”¨çš„æ ¼å¼'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php index cde94aa4..b15cc018 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'å…许使用BBCodeæ ¼å¼ä»£ç '); @define('PLUGIN_EVENT_BBCODE_TARGET', '处ç†é“¾æŽ¥æ—¶ä½¿ç”¨ target="blank"?(点击链接åŽåœ¨æ–°çª—壿˜¾ç¤ºç½‘页内容)'); + diff --git a/plugins/serendipity_event_bbcode/lang_bg.inc.php b/plugins/serendipity_event_bbcode/lang_bg.inc.php index 63003edd..aa9827ea 100644 --- a/plugins/serendipity_event_bbcode/lang_bg.inc.php +++ b/plugins/serendipity_event_bbcode/lang_bg.inc.php @@ -1,11 +1,12 @@ -BBCode å ðàçðåøåíî'); - @define('PLUGIN_EVENT_BBCODE_TARGET', 'Èçïîëçâàíå íà target="blank" çà âðúçêèòå ?'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Òåêñòîâî ôîðìàòèðàíå: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Ôîðìàòèðàíå íà òåêñò (ïîñòèíã, êîìåíòàð, HTML ïîëå) ñ BBcode'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Ôîðìàòèðàíåòî ñ BBCode å ðàçðåøåíî'); +@define('PLUGIN_EVENT_BBCODE_TARGET', 'Èçïîëçâàíå íà target="blank" çà âðúçêèòå ?'); + diff --git a/plugins/serendipity_event_bbcode/lang_cn.inc.php b/plugins/serendipity_event_bbcode/lang_cn.inc.php index cde94aa4..c00a9a53 100644 --- a/plugins/serendipity_event_bbcode/lang_cn.inc.php +++ b/plugins/serendipity_event_bbcode/lang_cn.inc.php @@ -3,4 +3,5 @@ @define('PLUGIN_EVENT_BBCODE_NAME', '标记语言: BBCode'); @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'å…许使用BBCodeæ ¼å¼ä»£ç '); -@define('PLUGIN_EVENT_BBCODE_TARGET', '处ç†é“¾æŽ¥æ—¶ä½¿ç”¨ target="blank"?(点击链接åŽåœ¨æ–°çª—壿˜¾ç¤ºç½‘页内容)'); +@define('PLUGIN_EVENT_BBCODE_TARGET', '处ç†é“¾æŽ¥æ—¶ä½¿ç”¨ target="blank"?(点击链接åŽåœ¨æ–°çª—壿˜¾ç¤ºç½‘页内容)'); + diff --git a/plugins/serendipity_event_bbcode/lang_cs.inc.php b/plugins/serendipity_event_bbcode/lang_cs.inc.php index 2e8d93e7..24720377 100644 --- a/plugins/serendipity_event_bbcode/lang_cs.inc.php +++ b/plugins/serendipity_event_bbcode/lang_cs.inc.php @@ -1,4 +1,4 @@ -BBCode'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Použít pro odkazy target="_blank" (odkazy otevírat v novém oknì)?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_cz.inc.php b/plugins/serendipity_event_bbcode/lang_cz.inc.php index 4839932d..382834ea 100644 --- a/plugins/serendipity_event_bbcode/lang_cz.inc.php +++ b/plugins/serendipity_event_bbcode/lang_cz.inc.php @@ -1,4 +1,4 @@ -BBCode'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Pou¾ít pro odkazy target="_blank" (odkazy otevírat v novém oknì)?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_de.inc.php b/plugins/serendipity_event_bbcode/lang_de.inc.php index 9fd3ae60..3d46131b 100644 --- a/plugins/serendipity_event_bbcode/lang_de.inc.php +++ b/plugins/serendipity_event_bbcode/lang_de.inc.php @@ -1,13 +1,14 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchführen'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode-Formatierung erlaubt'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchführen'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode-Formatierung erlaubt'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" für Links?'); \ No newline at end of file +@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" für Links?'); + diff --git a/plugins/serendipity_event_bbcode/lang_en.inc.php b/plugins/serendipity_event_bbcode/lang_en.inc.php index 934a39d5..a7243f27 100644 --- a/plugins/serendipity_event_bbcode/lang_en.inc.php +++ b/plugins/serendipity_event_bbcode/lang_en.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode format allowed'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Use target="blank" for links?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_es.inc.php b/plugins/serendipity_event_bbcode/lang_es.inc.php index 319a8569..c3e7a30b 100644 --- a/plugins/serendipity_event_bbcode/lang_es.inc.php +++ b/plugins/serendipity_event_bbcode/lang_es.inc.php @@ -1,12 +1,11 @@ - * EN-Revision: 690 */ -@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Formato BBCode permitido'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/lang_fa.inc.php b/plugins/serendipity_event_bbcode/lang_fa.inc.php index 00a4fcfe..4accfbf0 100644 --- a/plugins/serendipity_event_bbcode/lang_fa.inc.php +++ b/plugins/serendipity_event_bbcode/lang_fa.inc.php @@ -1,13 +1,12 @@ - * EN-Revision: Revision of lang_fa.inc.php */ -@define('PLUGIN_EVENT_BBCODE_NAME', 'برچسب: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'برچسب زدن به نوشته ها توسط BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'برچسب: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'برچسب زدن به نوشته ها توسط BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'روش های BB Code مجاز Ù…ÛŒ باشند'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_fr.inc.php b/plugins/serendipity_event_bbcode/lang_fr.inc.php index 0ee8ef27..0ff3ac1f 100644 --- a/plugins/serendipity_event_bbcode/lang_fr.inc.php +++ b/plugins/serendipity_event_bbcode/lang_fr.inc.php @@ -1,4 +1,4 @@ -BBCode autorisée'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/lang_ja.inc.php b/plugins/serendipity_event_bbcode/lang_ja.inc.php index a0db4361..f45c1252 100644 --- a/plugins/serendipity_event_bbcode/lang_ja.inc.php +++ b/plugins/serendipity_event_bbcode/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 1410 */ @@ -11,4 +11,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BB コード 書å¼ã‚’許å¯ã—ã¾ã™ã€‚'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'リンクã«ã€Œtarget="blank"ã€ã‚’使ã„ã¾ã™ã‹?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_ko.inc.php b/plugins/serendipity_event_bbcode/lang_ko.inc.php index 03836df3..51f29829 100644 --- a/plugins/serendipity_event_bbcode/lang_ko.inc.php +++ b/plugins/serendipity_event_bbcode/lang_ko.inc.php @@ -1,9 +1,8 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_BBCODE_NAME', '마í¬ì—…: BB코드'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마í¬ì—…ì„ ê¸€ì— ì ìš©í•¨'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BB코드를 ê¸€ì— ì“¸ 수 있습니다.'); +@define('PLUGIN_EVENT_BBCODE_NAME', '마í¬ì—…: BB코드'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마í¬ì—…ì„ ê¸€ì— ì ìš©í•¨'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BB코드를 ê¸€ì— ì“¸ 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_pl.inc.php b/plugins/serendipity_event_bbcode/lang_pl.inc.php index 7fc68460..2c968915 100644 --- a/plugins/serendipity_event_bbcode/lang_pl.inc.php +++ b/plugins/serendipity_event_bbcode/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -10,3 +10,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', 'Przekszta³caj tekst stosuj±c tagi BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode format dozwolony'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'U¿ywaæ target="blank" dla linków?'); + diff --git a/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php b/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php index d429aaf0..9401075a 100644 --- a/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -BBCode autorizada'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_bbcode/lang_sk.inc.php b/plugins/serendipity_event_bbcode/lang_sk.inc.php index 2df04407..fe9c4def 100644 --- a/plugins/serendipity_event_bbcode/lang_sk.inc.php +++ b/plugins/serendipity_event_bbcode/lang_sk.inc.php @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Zapnú» (= preklada») oznaèovací formát BBCode'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Pou¾i» pre odkazy target="_blank" (odkazy otvára» v novom okne)?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_tn.inc.php b/plugins/serendipity_event_bbcode/lang_tn.inc.php index c07674a8..4eb485c9 100644 --- a/plugins/serendipity_event_bbcode/lang_tn.inc.php +++ b/plugins/serendipity_event_bbcode/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode å¯ç”¨çš„æ ¼å¼'); -?> +@define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'BBCode å¯ç”¨çš„æ ¼å¼'); + diff --git a/plugins/serendipity_event_bbcode/lang_zh.inc.php b/plugins/serendipity_event_bbcode/lang_zh.inc.php index cde94aa4..c00a9a53 100644 --- a/plugins/serendipity_event_bbcode/lang_zh.inc.php +++ b/plugins/serendipity_event_bbcode/lang_zh.inc.php @@ -3,4 +3,5 @@ @define('PLUGIN_EVENT_BBCODE_NAME', '标记语言: BBCode'); @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'å…许使用BBCodeæ ¼å¼ä»£ç '); -@define('PLUGIN_EVENT_BBCODE_TARGET', '处ç†é“¾æŽ¥æ—¶ä½¿ç”¨ target="blank"?(点击链接åŽåœ¨æ–°çª—壿˜¾ç¤ºç½‘页内容)'); +@define('PLUGIN_EVENT_BBCODE_TARGET', '处ç†é“¾æŽ¥æ—¶ä½¿ç”¨ target="blank"?(点击链接åŽåœ¨æ–°çª—壿˜¾ç¤ºç½‘页内容)'); + diff --git a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php index 8c9aac11..bcf0b599 100644 --- a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php +++ b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php @@ -1,4 +1,8 @@ -add('description', PLUGIN_EVENT_BBCODE_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Jez Hancock, Garvin Hicking'); - $propbag->add('version', '2.09'); + $propbag->add('version', '2.10'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('cachable_events', array('frontend_display' => true)); - $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true, 'css' => true)); + $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true, 'css' => true)); $propbag->add('groups', array('MARKUP')); $this->markup_elements = array( @@ -51,8 +55,8 @@ class serendipity_event_bbcode extends serendipity_event $propbag->add('configuration', $conf_array); } - - function bbcode_callback($matches) { + function bbcode_callback($matches) + { $type = $matches[1]; $input = trim($matches[2], "\r\n"); @@ -102,11 +106,11 @@ class serendipity_event_bbcode extends serendipity_event return($input); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function introspect_config_item($name, &$propbag) { switch($name) { @@ -131,16 +135,19 @@ class serendipity_event_bbcode extends serendipity_event return true; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function bbcode($input) { + function bbcode($input) + { static $bbcodes = null; // Only allow numbers and characters for CSS: "red", "#FF0000", ... @@ -224,39 +231,42 @@ class serendipity_event_bbcode extends serendipity_event } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'frontend_display': foreach ($this->markup_elements as $temp) { - if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && + if (serendipity_db_bool($this->get_config($temp['name'], 'true')) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && !isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { $element = $temp['element']; $eventData[$element] = $this->bbcode($eventData[$element]); } } - return true; break; case 'frontend_comment': - if (serendipity_db_bool($this->get_config('COMMENT', true))) { + if (serendipity_db_bool($this->get_config('COMMENT', 'true'))) { echo '
        ' . PLUGIN_EVENT_BBCODE_TRANSFORM . '
        '; } - return true; break; case 'css': - if (strpos($eventData, '.bb-code') !== false) { - // class exists in CSS, so a user has customized it and we don't need default - return true; - } -?> + // CSS class does NOT exist by user customized template styles, include default + if (strpos($eventData, '.bb-code') === false) { + $eventData .= ' + + +/* serendipity_event_bbcode start */ + .bb-quote, .bb-code, .bb-php, .bb-code-title, .bb-php-title { margin-left: 20px; margin-right: 20px; @@ -294,18 +304,23 @@ class serendipity_event_bbcode extends serendipity_event .bb-list-ordered-ua { list-style-type: upper-alpha; } - +?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/ChangeLog b/plugins/serendipity_event_creativecommons/ChangeLog index d8a82e96..756f497c 100644 --- a/plugins/serendipity_event_creativecommons/ChangeLog +++ b/plugins/serendipity_event_creativecommons/ChangeLog @@ -1,4 +1,4 @@ -# $Id$ + ------------------------------------------------------------------------ Version 1.4 (brockhaus): diff --git a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cs.html b/plugins/serendipity_event_creativecommons/UTF-8/documentation_cs.html deleted file mode 100644 index 7df715dd..00000000 --- a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cs.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Dokumentace: Licence Creative Commons - - - - -

        Dokumentace k pluginu 'Licence Creative Commons'

        - -

        Dokumentaci k tomuto pluginu pÅ™eložil do ÄeÅ¡tiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozmÄ›nÄ›n nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i aktuální anglický ChangeLog. -

        - - -

        Historie verzí (ChangeLog)

        -
          -
        • Verze 1.4, autor [brockhaus]
        • -
            -
          • ZmÄ›nÄ›na výchozí verze CreativeCommons na 3.0, pÅ™i aktualizaci bude zachováno nastavení ze starší verze pluginu.
          • -
          • BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.
          • -
          • JaponÅ¡tí uživatelé dostávali Å¡patný odkaz na Licenci Creative Common.
          • -
          • Titulek pÅ™i najetí na obrázek je nyní podporovaný i v Mozille (atribut title)
          • -
          -
        • Verze 1.3, autor [Evan Nemerson]
        • -
            -
          • původní verze
          • -
          -
        - - - diff --git a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cz.html b/plugins/serendipity_event_creativecommons/UTF-8/documentation_cz.html deleted file mode 100644 index 7df715dd..00000000 --- a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cz.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Dokumentace: Licence Creative Commons - - - - -

        Dokumentace k pluginu 'Licence Creative Commons'

        - -

        Dokumentaci k tomuto pluginu pÅ™eložil do ÄeÅ¡tiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozmÄ›nÄ›n nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i aktuální anglický ChangeLog. -

        - - -

        Historie verzí (ChangeLog)

        -
          -
        • Verze 1.4, autor [brockhaus]
        • -
            -
          • ZmÄ›nÄ›na výchozí verze CreativeCommons na 3.0, pÅ™i aktualizaci bude zachováno nastavení ze starší verze pluginu.
          • -
          • BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.
          • -
          • JaponÅ¡tí uživatelé dostávali Å¡patný odkaz na Licenci Creative Common.
          • -
          • Titulek pÅ™i najetí na obrázek je nyní podporovaný i v Mozille (atribut title)
          • -
          -
        • Verze 1.3, autor [Evan Nemerson]
        • -
            -
          • původní verze
          • -
          -
        - - - diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用该作å“ã€‚åŒæ—¶ï¼Œä½¿ç”¨è€…ä¸å¾—将该作å“用于商业用途,除éžå¾—到作者授æƒã€‚'); @define('PLUGIN_CREATIVECOMMONS_ND', '是å¦å…许对你的作å“修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示ã€ä½¿ç”¨æœªè¢«ä¿®æ”¹çš„该作å“。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也éµå®ˆåˆ›ä½œå…±ç”¨å议的è¯ï¼Œå…许。'); + diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php index fb3eae47..2e9145d7 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php index fb3eae47..2e9145d7 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php index 18544406..bbb30dc0 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php @@ -1,15 +1,16 @@ -Creative Commons Lizenz'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als Public Domain gewidmet'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung müssen Lizenznehmer den ursprünglichen Authoren nennen.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung dürfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdrückliche Genehmigung.'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'Veränderungen des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unveränderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); - @define('PLUGIN_CREATIVECOMMONS_NAME', 'Creative Commons Lizenz'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'Wählen Sie eine Lizenz für den Inhalt'); - @define('PLUGIN_CREATIVECOMMONS_TXT', 'Text anzeigen?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'Zeigt eine kurze Erklärung zu Ihrer individuellen Lizensierung an'); - @define('PLUGIN_CREATIVECOMMONS_CAP', 'Der Inhalt dieses Werkes ist lizensiert unter der Creative Commons Lizenz'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als Public Domain gewidmet'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung müssen Lizenznehmer den ursprünglichen Authoren nennen.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung dürfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdrückliche Genehmigung.'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'Veränderungen des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unveränderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php index 0c872e28..c967631f 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php @@ -1,6 +1,6 @@ - * EN-Revision: 690 */ @@ -19,4 +19,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'El licenciador autoriza a otros a copiar, distribuir, mostrary actuar sólo copias no alteradas de su trabajo -- no pueden derivarse trabajos basados en él.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Sí, siempre y cuando sea editado bajo la misma licencia'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php index db66e2ab..c08f37c6 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php index 1a5025dd..73c46cd4 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'The licensor permits others to copy, distribute, display and perform only unaltered copies of the work -- not derivative works based on it.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php index 5e6a678a..f9e48361 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php @@ -1,19 +1,18 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 규약'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'ë¸”ë¡œê·¸ì— ìž‘ì„±í•œ ê¸€ì— ì ìš©ë  í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ê³¨ë¼ì„œ 표시함'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 ì ìš© ìƒíƒœë¥¼ 시ê°ì ìœ¼ë¡œ 알리기 위해 ì„ íƒí•œ ê·œì•½ì— ëŒ€í•œ 짤막한 ì„¤ëª…ì„ í‘œì‹œí•©ë‹ˆë‹¤.'); - @define('PLUGIN_CREATIVECOMMONS_CAP', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ì ìš©ë°›ìŠµë‹ˆë‹¤.'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ ê³µìœ ë¬¼(í¼ë¸”릭 ë„ë©”ì¸)로 기ì¦ë˜ì—ˆìŠµë‹ˆë‹¤.'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'ì €ìž‘ìž í‘œì‹œ ì˜ë¬´í™”'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ ì„±ëª…ì„ í‘œì‹œí•´ì•¼ 합니다.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'ìž‘ì—…ë¬¼ì˜ ì˜ë¦¬ì  사용 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ í—ˆë½ ì—†ì´ ìž‘ì—…ë¬¼ì„ ì˜ë¦¬ì  목ì ìœ¼ë¡œ 사용하는 ê²ƒì„ ê¸ˆí•©ë‹ˆë‹¤.'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'ìž‘ì—…ë¬¼ì— ëŒ€í•œ 변경 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•´ì„œ ì›ë³¸ ê·¸ëŒ€ë¡œì˜ ìƒíƒœë¡œë§Œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•©ë‹ˆë‹¤. ë³€ê²½ì„ ì¼ì ˆ 금합니다.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'ë™ì¼ 규약으로 공유한다는 조건으로 ë³€ê²½ì„ í—ˆë½í•©ë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 규약'); +@define('PLUGIN_CREATIVECOMMONS_DESC', 'ë¸”ë¡œê·¸ì— ìž‘ì„±í•œ ê¸€ì— ì ìš©ë  í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ê³¨ë¼ì„œ 표시함'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 ì ìš© ìƒíƒœë¥¼ 시ê°ì ìœ¼ë¡œ 알리기 위해 ì„ íƒí•œ ê·œì•½ì— ëŒ€í•œ 짤막한 ì„¤ëª…ì„ í‘œì‹œí•©ë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_CAP', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ì ìš©ë°›ìŠµë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ ê³µìœ ë¬¼(í¼ë¸”릭 ë„ë©”ì¸)로 기ì¦ë˜ì—ˆìŠµë‹ˆë‹¤.'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'ì €ìž‘ìž í‘œì‹œ ì˜ë¬´í™”'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ ì„±ëª…ì„ í‘œì‹œí•´ì•¼ 합니다.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'ìž‘ì—…ë¬¼ì˜ ì˜ë¦¬ì  사용 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ í—ˆë½ ì—†ì´ ìž‘ì—…ë¬¼ì„ ì˜ë¦¬ì  목ì ìœ¼ë¡œ 사용하는 ê²ƒì„ ê¸ˆí•©ë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'ìž‘ì—…ë¬¼ì— ëŒ€í•œ 변경 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•´ì„œ ì›ë³¸ ê·¸ëŒ€ë¡œì˜ ìƒíƒœë¡œë§Œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•©ë‹ˆë‹¤. ë³€ê²½ì„ ì¼ì ˆ 금합니다.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'ë™ì¼ 규약으로 공유한다는 조건으로 ë³€ê²½ì„ í—ˆë½í•©ë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php index 51db7618..1d3d820c 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Licencjonodawca zezwala innym na kopiowanie, rozpowszechnianie odtwarzanie i wykonywanie dzieÅ‚a tylko w niezmienionej formie - nie udziela tym samym zezwolenia na korzystanie z utworu w dzieÅ‚ach zaleznych.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php index 11fcd5f2..e140337e 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - @@ -18,4 +18,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'O licenciador autoriza outros a copiar, distribuir, expor e utilizar só cópias não alteradas do seu trabalho -- não podem criar-se trabalhos baseados nele.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Sim, sempre que outros partilhem da mesma forma'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php index df8659e9..a00d86fc 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Nastavenie NIE znamená, že: Vlastník licence povoľuje ostatným kopírovat, distribuovaÅ¥, zobrazovaÅ¥ a používaÅ¥ dielo iba v jeho pôvodnom znení. Žiadne zmeny a úpravy diela nie sú povolené.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ãno, pokiaľ bude ostatnými šírené pod rovnakou licenciou'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php index e20f676a..3bbd2d8a 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,17 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'è«‹é¸æ“‡é©åˆæ‚¨çš„ç¶²èªŒçš„æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'ç‚ºäº†èƒ½æ­£ç¢ºçš„å‚³é”æ¢æ¬¾å…§å®¹ï¼Œè«‹æä¾›æ¢æ¬¾ç°¡ä»‹ã€‚'); - @define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 CC æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'åŽŸè‘—ä½œå…§å®¹ä½¿ç”¨çš„æ¢æ¬¾æ˜¯ 公共領域'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'å…許商業用途?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…許其他人複製,散佈,和展示他的作å“。但ä¸å…許任何商業用途,除éžå¾—到å…許。'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'å…許修改內容?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者å…許其他人複製,散佈,和展示未修改的作å“。'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'å…許,如果用途相åŒ'); -?> \ No newline at end of file +@define('PLUGIN_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_CREATIVECOMMONS_DESC', 'è«‹é¸æ“‡é©åˆæ‚¨çš„ç¶²èªŒçš„æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'ç‚ºäº†èƒ½æ­£ç¢ºçš„å‚³é”æ¢æ¬¾å…§å®¹ï¼Œè«‹æä¾›æ¢æ¬¾ç°¡ä»‹ã€‚'); +@define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 CC æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'åŽŸè‘—ä½œå…§å®¹ä½¿ç”¨çš„æ¢æ¬¾æ˜¯ 公共領域'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'å…許商業用途?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…許其他人複製,散佈,和展示他的作å“。但ä¸å…許任何商業用途,除éžå¾—到å…許。'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'å…許修改內容?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者å…許其他人複製,散佈,和展示未修改的作å“。'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'å…許,如果用途相åŒ'); + diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用该作å“ã€‚åŒæ—¶ï¼Œä½¿ç”¨è€…ä¸å¾—将该作å“用于商业用途,除éžå¾—到作者授æƒã€‚'); @define('PLUGIN_CREATIVECOMMONS_ND', '是å¦å…许对你的作å“修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示ã€ä½¿ç”¨æœªè¢«ä¿®æ”¹çš„该作å“。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也éµå®ˆåˆ›ä½œå…±ç”¨å议的è¯ï¼Œå…许。'); + diff --git a/plugins/serendipity_event_creativecommons/documentation_cs.html b/plugins/serendipity_event_creativecommons/documentation_cs.html index a075643a..1b09ed14 100644 --- a/plugins/serendipity_event_creativecommons/documentation_cs.html +++ b/plugins/serendipity_event_creativecommons/documentation_cs.html @@ -1,7 +1,7 @@ - - + + Dokumentace: Licence Creative Commons @@ -9,23 +9,23 @@

        Dokumentace k pluginu 'Licence Creative Commons'

        -

        Dokumentaci k tomuto pluginu pøeložil do èeštiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozmìnìn nebo mohly být rozšíøené jeho funkce. Zkontrolujte pro jistotu i aktuální anglický ChangeLog. -

        +

        Dokumentaci k tomuto pluginu pøeložil do èeštiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozmìnìn nebo mohly být rozšíøené jeho funkce. Zkontrolujte pro jistotu i aktuální anglický ChangeLog.

        Historie verzí (ChangeLog)

          -
        • Verze 1.4, autor [brockhaus]
        • -
            -
          • Zmìnìna výchozí verze CreativeCommons na 3.0, pøi aktualizaci bude zachováno nastavení ze starší verze pluginu.
          • -
          • BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.
          • -
          • Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.
          • -
          • Titulek pøi najetí na obrázek je nyní podporovaný i v Mozille (atribut title)
          • -
          -
        • Verze 1.3, autor [Evan Nemerson]
        • -
            -
          • pùvodní verze
          • -
          +
        • Verze 1.4, autor [brockhaus] +
            +
          • Zmìnìna výchozí verze CreativeCommons na 3.0, pøi aktualizaci bude zachováno nastavení ze starší verze pluginu.
          • +
          • BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.
          • +
          • Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.
          • +
          • Titulek pøi najetí na obrázek je nyní podporovaný i v Mozille (atribut title)
          • +
          +
        • Verze 1.3, autor [Evan Nemerson]
        • +
            +
          • pùvodní verze
          • +
          +
        diff --git a/plugins/serendipity_event_creativecommons/documentation_cz.html b/plugins/serendipity_event_creativecommons/documentation_cz.html index 073ea762..4e92f7c8 100644 --- a/plugins/serendipity_event_creativecommons/documentation_cz.html +++ b/plugins/serendipity_event_creativecommons/documentation_cz.html @@ -1,7 +1,7 @@ - - + + Dokumentace: Licence Creative Commons @@ -14,18 +14,20 @@

        Historie verzí (ChangeLog)

        -
          -
        • Verze 1.4, autor [brockhaus]
        • -
            -
          • Zmìnìna výchozí verze CreativeCommons na 3.0, pøi aktualizaci bude zachováno nastavení ze star¹í verze pluginu.
          • -
          • BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.
          • -
          • Japon¹tí u¾ivatelé dostávali ¹patný odkaz na Licenci Creative Common.
          • -
          • Titulek pøi najetí na obrázek je nyní podporovaný i v Mozille (atribut title)
          • -
          -
        • Verze 1.3, autor [Evan Nemerson]
        • -
            -
          • pùvodní verze
          • -
          +
            +
          • Verze 1.4, autor [brockhaus] +
              +
            • Zmìnìna výchozí verze CreativeCommons na 3.0, pøi aktualizaci bude zachováno nastavení ze star¹í verze pluginu.
            • +
            • BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.
            • +
            • Japon¹tí u¾ivatelé dostávali ¹patný odkaz na Licenci Creative Common.
            • +
            • Titulek pøi najetí na obrázek je nyní podporovaný i v Mozille (atribut title)
            • +
            +
          • +
          • Verze 1.3, autor [Evan Nemerson] +
              +
            • pùvodní verze
            • +
            +
          diff --git a/plugins/serendipity_event_creativecommons/lang_cn.inc.php b/plugins/serendipity_event_creativecommons/lang_cn.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/lang_cn.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_cn.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用该作å“ã€‚åŒæ—¶ï¼Œä½¿ç”¨è€…ä¸å¾—将该作å“用于商业用途,除éžå¾—到作者授æƒã€‚'); @define('PLUGIN_CREATIVECOMMONS_ND', '是å¦å…许对你的作å“修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示ã€ä½¿ç”¨æœªè¢«ä¿®æ”¹çš„该作å“。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也éµå®ˆåˆ›ä½œå…±ç”¨å议的è¯ï¼Œå…许。'); + diff --git a/plugins/serendipity_event_creativecommons/lang_cs.inc.php b/plugins/serendipity_event_creativecommons/lang_cs.inc.php index d1a5e25c..df705356 100644 --- a/plugins/serendipity_event_creativecommons/lang_cs.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_cs.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_creativecommons/lang_cz.inc.php b/plugins/serendipity_event_creativecommons/lang_cz.inc.php index 974f2d90..2dc2f38f 100644 --- a/plugins/serendipity_event_creativecommons/lang_cz.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_creativecommons/lang_de.inc.php b/plugins/serendipity_event_creativecommons/lang_de.inc.php index edf1c487..7cc76b27 100644 --- a/plugins/serendipity_event_creativecommons/lang_de.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_de.inc.php @@ -1,15 +1,16 @@ -Creative Commons Lizenz'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als Public Domain gewidmet'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung müssen Lizenznehmer den ursprünglichen Authoren nennen.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung dürfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdrückliche Genehmigung.'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'Veränderungen des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unveränderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); - @define('PLUGIN_CREATIVECOMMONS_NAME', 'Creative Commons Lizenz'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'Wählen Sie eine Lizenz für den Inhalt'); - @define('PLUGIN_CREATIVECOMMONS_TXT', 'Text anzeigen?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'Zeigt eine kurze Erklärung zu Ihrer individuellen Lizensierung an'); - @define('PLUGIN_CREATIVECOMMONS_CAP', 'Der Inhalt dieses Werkes ist lizensiert unter der Creative Commons Lizenz'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als Public Domain gewidmet'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung müssen Lizenznehmer den ursprünglichen Authoren nennen.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung dürfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdrückliche Genehmigung.'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'Veränderungen des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unveränderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); diff --git a/plugins/serendipity_event_creativecommons/lang_en.inc.php b/plugins/serendipity_event_creativecommons/lang_en.inc.php index 45d8a4bb..41aaef01 100644 --- a/plugins/serendipity_event_creativecommons/lang_en.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_en.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'The licensor permits others to copy, distribute, display and perform only unaltered copies of the work -- not derivative works based on it.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_es.inc.php b/plugins/serendipity_event_creativecommons/lang_es.inc.php index d1394c10..a06ee7ec 100644 --- a/plugins/serendipity_event_creativecommons/lang_es.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_es.inc.php @@ -1,6 +1,6 @@ - * EN-Revision: 690 */ @@ -19,4 +19,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'El licenciador autoriza a otros a copiar, distribuir, mostrary actuar sólo copias no alteradas de su trabajo -- no pueden derivarse trabajos basados en él.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Sí, siempre y cuando sea editado bajo la misma licencia'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/lang_fr.inc.php b/plugins/serendipity_event_creativecommons/lang_fr.inc.php index 5320eeb1..6535c1a6 100644 --- a/plugins/serendipity_event_creativecommons/lang_fr.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/lang_ja.inc.php b/plugins/serendipity_event_creativecommons/lang_ja.inc.php index 1a5025dd..73c46cd4 100644 --- a/plugins/serendipity_event_creativecommons/lang_ja.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'The licensor permits others to copy, distribute, display and perform only unaltered copies of the work -- not derivative works based on it.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_ko.inc.php b/plugins/serendipity_event_creativecommons/lang_ko.inc.php index 5e6a678a..f9e48361 100644 --- a/plugins/serendipity_event_creativecommons/lang_ko.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_ko.inc.php @@ -1,19 +1,18 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 규약'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'ë¸”ë¡œê·¸ì— ìž‘ì„±í•œ ê¸€ì— ì ìš©ë  í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ê³¨ë¼ì„œ 표시함'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 ì ìš© ìƒíƒœë¥¼ 시ê°ì ìœ¼ë¡œ 알리기 위해 ì„ íƒí•œ ê·œì•½ì— ëŒ€í•œ 짤막한 ì„¤ëª…ì„ í‘œì‹œí•©ë‹ˆë‹¤.'); - @define('PLUGIN_CREATIVECOMMONS_CAP', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ì ìš©ë°›ìŠµë‹ˆë‹¤.'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ ê³µìœ ë¬¼(í¼ë¸”릭 ë„ë©”ì¸)로 기ì¦ë˜ì—ˆìŠµë‹ˆë‹¤.'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'ì €ìž‘ìž í‘œì‹œ ì˜ë¬´í™”'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ ì„±ëª…ì„ í‘œì‹œí•´ì•¼ 합니다.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'ìž‘ì—…ë¬¼ì˜ ì˜ë¦¬ì  사용 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ í—ˆë½ ì—†ì´ ìž‘ì—…ë¬¼ì„ ì˜ë¦¬ì  목ì ìœ¼ë¡œ 사용하는 ê²ƒì„ ê¸ˆí•©ë‹ˆë‹¤.'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'ìž‘ì—…ë¬¼ì— ëŒ€í•œ 변경 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•´ì„œ ì›ë³¸ ê·¸ëŒ€ë¡œì˜ ìƒíƒœë¡œë§Œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•©ë‹ˆë‹¤. ë³€ê²½ì„ ì¼ì ˆ 금합니다.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'ë™ì¼ 규약으로 공유한다는 조건으로 ë³€ê²½ì„ í—ˆë½í•©ë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 규약'); +@define('PLUGIN_CREATIVECOMMONS_DESC', 'ë¸”ë¡œê·¸ì— ìž‘ì„±í•œ ê¸€ì— ì ìš©ë  í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ê³¨ë¼ì„œ 표시함'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 ì ìš© ìƒíƒœë¥¼ 시ê°ì ìœ¼ë¡œ 알리기 위해 ì„ íƒí•œ ê·œì•½ì— ëŒ€í•œ 짤막한 ì„¤ëª…ì„ í‘œì‹œí•©ë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_CAP', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 ê·œì•½ì„ ì ìš©ë°›ìŠµë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'ì´ê³³ì— ìž‘ì„±ëœ ë…ì°½ì ì¸ ìž‘ì—…ë¬¼ì€ ê³µìœ ë¬¼(í¼ë¸”릭 ë„ë©”ì¸)로 기ì¦ë˜ì—ˆìŠµë‹ˆë‹¤.'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'ì €ìž‘ìž í‘œì‹œ ì˜ë¬´í™”'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ ì„±ëª…ì„ í‘œì‹œí•´ì•¼ 합니다.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'ìž‘ì—…ë¬¼ì˜ ì˜ë¦¬ì  사용 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•˜ëŠ” 조건으로 ì›ìž‘ìžì˜ í—ˆë½ ì—†ì´ ìž‘ì—…ë¬¼ì„ ì˜ë¦¬ì  목ì ìœ¼ë¡œ 사용하는 ê²ƒì„ ê¸ˆí•©ë‹ˆë‹¤.'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'ìž‘ì—…ë¬¼ì— ëŒ€í•œ 변경 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'ì›ìž‘ìžì˜ ìž‘ì—…ë¬¼ì— ëŒ€í•´ì„œ ì›ë³¸ ê·¸ëŒ€ë¡œì˜ ìƒíƒœë¡œë§Œ 복제, 공표, 게시, ì´í–‰ ë“±ì„ í—ˆë½í•©ë‹ˆë‹¤. ë³€ê²½ì„ ì¼ì ˆ 금합니다.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'ë™ì¼ 규약으로 공유한다는 조건으로 ë³€ê²½ì„ í—ˆë½í•©ë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_pl.inc.php b/plugins/serendipity_event_creativecommons/lang_pl.inc.php index 5296a603..1a844363 100644 --- a/plugins/serendipity_event_creativecommons/lang_pl.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Licencjonodawca zezwala innym na kopiowanie, rozpowszechnianie odtwarzanie i wykonywanie dzie³a tylko w niezmienionej formie - nie udziela tym samym zezwolenia na korzystanie z utworu w dzie³ach zaleznych.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php b/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php index f27dca5e..b324e617 100644 --- a/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - @@ -18,4 +18,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'O licenciador autoriza outros a copiar, distribuir, expor e utilizar só cópias não alteradas do seu trabalho -- não podem criar-se trabalhos baseados nele.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Sim, sempre que outros partilhem da mesma forma'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_sk.inc.php b/plugins/serendipity_event_creativecommons/lang_sk.inc.php index db194d92..b18dca6f 100644 --- a/plugins/serendipity_event_creativecommons/lang_sk.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Nastavenie NIE znamená, ¾e: Vlastník licence povoµuje ostatným kopírovat, distribuova», zobrazova» a pou¾íva» dielo iba v jeho pôvodnom znení. ®iadne zmeny a úpravy diela nie sú povolené.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Áno, pokiaµ bude ostatnými ¹írené pod rovnakou licenciou'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_tn.inc.php b/plugins/serendipity_event_creativecommons/lang_tn.inc.php index e20f676a..d52a0211 100644 --- a/plugins/serendipity_event_creativecommons/lang_tn.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,17 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'è«‹é¸æ“‡é©åˆæ‚¨çš„ç¶²èªŒçš„æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'ç‚ºäº†èƒ½æ­£ç¢ºçš„å‚³é”æ¢æ¬¾å…§å®¹ï¼Œè«‹æä¾›æ¢æ¬¾ç°¡ä»‹ã€‚'); - @define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 CC æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'åŽŸè‘—ä½œå…§å®¹ä½¿ç”¨çš„æ¢æ¬¾æ˜¯ 公共領域'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'å…許商業用途?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…許其他人複製,散佈,和展示他的作å“。但ä¸å…許任何商業用途,除éžå¾—到å…許。'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'å…許修改內容?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者å…許其他人複製,散佈,和展示未修改的作å“。'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'å…許,如果用途相åŒ'); -?> \ No newline at end of file +@define('PLUGIN_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_CREATIVECOMMONS_DESC', 'è«‹é¸æ“‡é©åˆæ‚¨çš„ç¶²èªŒçš„æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'ç‚ºäº†èƒ½æ­£ç¢ºçš„å‚³é”æ¢æ¬¾å…§å®¹ï¼Œè«‹æä¾›æ¢æ¬¾ç°¡ä»‹ã€‚'); +@define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 CC æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'åŽŸè‘—ä½œå…§å®¹ä½¿ç”¨çš„æ¢æ¬¾æ˜¯ 公共領域'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'å…許商業用途?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…許其他人複製,散佈,和展示他的作å“。但ä¸å…許任何商業用途,除éžå¾—到å…許。'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'å…許修改內容?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者å…許其他人複製,散佈,和展示未修改的作å“。'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'å…許,如果用途相åŒ'); + diff --git a/plugins/serendipity_event_creativecommons/lang_zh.inc.php b/plugins/serendipity_event_creativecommons/lang_zh.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/lang_zh.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_zh.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者å…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用该作å“ã€‚åŒæ—¶ï¼Œä½¿ç”¨è€…ä¸å¾—将该作å“用于商业用途,除éžå¾—到作者授æƒã€‚'); @define('PLUGIN_CREATIVECOMMONS_ND', '是å¦å…许对你的作å“修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示ã€ä½¿ç”¨æœªè¢«ä¿®æ”¹çš„该作å“。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者åªå…许他人å¤åˆ¶ã€åˆ†å‘ã€æ¼”示和使用未被修改的该作å“ï¼Œè€Œä¸æ˜¯åœ¨æ­¤ä½œå“基础上修改åŽçš„作å“。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也éµå®ˆåˆ›ä½œå…±ç”¨å议的è¯ï¼Œå…许。'); + diff --git a/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php b/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php index f810968f..7889a948 100644 --- a/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php +++ b/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php @@ -1,8 +1,13 @@ add('description', PLUGIN_CREATIVECOMMONS_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.5'); + $propbag->add('version', '1.6'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -71,8 +76,8 @@ class serendipity_event_creativecommons extends serendipity_event { )); $propbag->add('radio_per_row', '1'); $propbag->add('default', 'yes'); - break; + case 'image_type': $image_types = array( 'generic' => PLUGIN_CREATIVECOMMONS_IMAGETYPE_GENERIC, @@ -95,18 +100,21 @@ class serendipity_event_creativecommons extends serendipity_event { default: return false; - break; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; + $hooks = &$bag->get('event_hooks'); + $license_data = $this->get_license_data(); $license_version = $this->get_config('cc_version', '3.0'); $license_type = $license_data['type']; @@ -129,81 +137,83 @@ class serendipity_event_creativecommons extends serendipity_event { $cc_visibility = 'invisible'; - switch ($event) { - case 'frontend_display:html_layout': - $cc_visibility = 'visible'; - case 'frontend_display:html:per_entry': - $eventData['display_dat'] .= '
          '; - if ($license_string == '') { - if ($cc_visibility == 'visible') { - $image_titel = 'No Rights Reserved'; - $eventData['display_dat'] .= ''; - $eventData['display_dat'] .= '' . $image_titel. ''; + if (isset($hooks[$event])) { + + switch($event) { + + case 'frontend_display:html_layout': + $cc_visibility = 'visible'; + case 'frontend_display:html:per_entry': + $eventData['display_dat'] .= '
          '; + if ($license_string == '') { + if ($cc_visibility == 'visible') { + $image_titel = 'No Rights Reserved'; + $eventData['display_dat'] .= ''; + $eventData['display_dat'] .= '' . $image_titel. ''; + $eventData['display_dat'] .= ''; + if (serendipity_db_bool($this->get_config('txt', true))) { + $eventData['display_dat'] .= '
          ' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP_PD); + } + } + } elseif ($cc_visibility == 'visible') { + $image_titel = 'Creative Commons License - Some Rights Reserved'; + $eventData['display_dat'] .= ''; + $eventData['display_dat'] .= '' . $image_titel. ''; $eventData['display_dat'] .= ''; if (serendipity_db_bool($this->get_config('txt', true))) { - $eventData['display_dat'] .= '
          ' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP_PD); + $eventData['display_dat'] .= '
          ' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP); } } - } elseif ($cc_visibility == 'visible') { - $image_titel = 'Creative Commons License - Some Rights Reserved'; - $eventData['display_dat'] .= ''; - $eventData['display_dat'] .= '' . $image_titel. ''; - $eventData['display_dat'] .= ''; - if (serendipity_db_bool($this->get_config('txt', true))) { - $eventData['display_dat'] .= '
          ' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP); + + $eventData['display_dat'] .= ''; + $eventData['display_dat'] .= '
          '; + break; + + case 'frontend_display:rss-2.0:per_entry': + $eventData['display_dat'] .= ''.$license_uri.''; + break; + + case 'frontend_display:rss-1.0:per_entry': + $eventData['display_dat'] .= ''; + break; + + case 'frontend_display:rss-1.0:once': + $eventData['display_dat'] .= ''; + if (is_array($rdf)) { + foreach ($rdf as $rdf_t => $rdf_v) { + $eventData['display_dat'] .= ''; + } } - } + $eventData['display_dat'] .= ''; + break; - $eventData['display_dat'] .= ' -->'; - $eventData['display_dat'] .= '
          '; - return true; - break; + case 'frontend_display:rss-2.0:namespace': + $eventData['display_dat'] .= ' xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" '; + break; - case 'frontend_display:rss-2.0:per_entry': - $eventData['display_dat'] .= ''.$license_uri.''; - return true; - break; + case 'frontend_display:rss-1.0:namespace': + $eventData['display_dat'] .= ' xmlns:cc="http://web.resource.org/cc/" '; + break; - case 'frontend_display:rss-1.0:per_entry': - $eventData['display_dat'] .= ''; - return true; - break; + default: + return false; - case 'frontend_display:rss-1.0:once': - $eventData['display_dat'] .= ''; - if (is_array($rdf)) { - foreach ($rdf as $rdf_t => $rdf_v) { - $eventData['display_dat'] .= ''; - } - } - $eventData['display_dat'] .= ''; - return true; - break; - - case 'frontend_display:rss-2.0:namespace': - $eventData['display_dat'] .= ' xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" '; - return true; - break; - - case 'frontend_display:rss-1.0:namespace': - $eventData['display_dat'] .= ' xmlns:cc="http://web.resource.org/cc/" '; - return true; - break; - - default: - return true; - break; + } + return true; + } else { + return false; } } - function get_license_data() { + function get_license_data() + { $license_type = array(); $license_version = $this->get_config('cc_version', '3.0'); @@ -355,7 +365,8 @@ class serendipity_event_creativecommons extends serendipity_event { 'rdf' => $rdf ); } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/ChangeLog b/plugins/serendipity_event_emoticate/ChangeLog index ae2cf4e7..8e16a67b 100644 --- a/plugins/serendipity_event_emoticate/ChangeLog +++ b/plugins/serendipity_event_emoticate/ChangeLog @@ -1,3 +1,7 @@ +1.11: +---- + * Add smiley images to plugin + 1.9: ---- * changed fetching path in emoticons.inc.php file. diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php index 09d0c392..33a9204e 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php @@ -1,4 +1,4 @@ -add('description', PLUGIN_EVENT_EMOTICATE_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.9'); + $propbag->add('version', '1.11'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '5.2.0' )); @@ -54,16 +58,19 @@ class serendipity_event_emoticate extends serendipity_event } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function getEmoticons() { + function getEmoticons() + { global $serendipity; /* Avoid multiple runs of serendipity_getTemplateFile(), @@ -73,12 +80,8 @@ class serendipity_event_emoticate extends serendipity_event } /* Hijack global variable $serendipity['custom_emoticons'] if it exists */ - if ($serendipity['version'][0] > 1) { - // called in backend too, but uses frontend fallback. Advise to use the Plugin simple approach 4th parameter! - $hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true, true); - } else { - $hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true); - } + $hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true); + if (@file_exists($hijack_file)) { @include $hijack_file; // This file contains $serendipity['custom_emoticons'] and maybe $serendipity['custom_emoticons_regexp'] if (isset($serendipity['custom_emoticons']) && is_array($serendipity['custom_emoticons'])) { @@ -95,38 +98,41 @@ class serendipity_event_emoticate extends serendipity_event if (!isset($this->smilies)) { $ext = $this->get_config('extension', 'png'); $this->smilies = array( - "\:'\(" => serendipity_getTemplateFile('img/emoticons/cry.'.$ext, 'serendipityHTTPPath', true), + "\:'\(" => $this->getFile('img/emoticons/cry.'.$ext, 'serendipityHTTPPath'), - '\:\-?\)' => serendipity_getTemplateFile('img/emoticons/smile.'.$ext, 'serendipityHTTPPath', true), + '\:\-?\)' => $this->getFile('img/emoticons/smile.'.$ext, 'serendipityHTTPPath'), - '\:\-?\|' => serendipity_getTemplateFile('img/emoticons/normal.'.$ext, 'serendipityHTTPPath', true), + '\:\-?\|' => $this->getFile('img/emoticons/normal.'.$ext, 'serendipityHTTPPath'), - '\:\-?O' => serendipity_getTemplateFile('img/emoticons/eek.'.$ext, 'serendipityHTTPPath', true), + '\:\-?O' => $this->getFile('img/emoticons/eek.'.$ext, 'serendipityHTTPPath'), - '\:\-?\(' => serendipity_getTemplateFile('img/emoticons/sad.'.$ext, 'serendipityHTTPPath', true), - - '8\-?\)' => serendipity_getTemplateFile('img/emoticons/cool.'.$ext, 'serendipityHTTPPath', true), - - '\:\-?D' => serendipity_getTemplateFile('img/emoticons/laugh.'.$ext, 'serendipityHTTPPath', true), - - '\:\-?P' => serendipity_getTemplateFile('img/emoticons/tongue.'.$ext, 'serendipityHTTPPath', true), - - ';\-?\)' => serendipity_getTemplateFile('img/emoticons/wink.'.$ext, 'serendipityHTTPPath', true), + '\:\-?\(' => $this->getFile('img/emoticons/sad.'.$ext, 'serendipityHTTPPath'), + + '8\-?\)' => $this->getFile('img/emoticons/cool.'.$ext, 'serendipityHTTPPath'), + + '\:\-?D' => $this->getFile('img/emoticons/laugh.'.$ext, 'serendipityHTTPPath'), + + '\:\-?P' => $this->getFile('img/emoticons/tongue.'.$ext, 'serendipityHTTPPath'), + + ';\-?\)' => $this->getFile('img/emoticons/wink.'.$ext, 'serendipityHTTPPath'), ); } return $this->smilies; } - function humanReadableEmoticon($key) { + function humanReadableEmoticon($key) + { return str_replace(array('-?', '\\'), array('-', ''), $key); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function example() { + function example() + { $s = sprintf(PLUGIN_EVENT_EMOTICATE_EXAMPLE_EXTEND_DESC, $serendipity['serendiptyHTTPPath'].'plugins/serendipity_event_emoticate/emoticons.inc.php.txt'); $s .= ''; $s .= ''; @@ -144,30 +150,33 @@ class serendipity_event_emoticate extends serendipity_event function introspect_config_item($name, &$propbag) { switch($name) { - case 'extension': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_EVENT_EMOTICATE_EXTENSION); - $propbag->add('description', PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH); - $propbag->add('default', 'png'); - break; - default: - $propbag->add('type', 'boolean'); - $propbag->add('name', constant($name)); - $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); - $propbag->add('default', 'true'); + case 'extension': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_EVENT_EMOTICATE_EXTENSION); + $propbag->add('description', PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH); + $propbag->add('default', 'png'); + break; + + default: + $propbag->add('type', 'boolean'); + $propbag->add('name', constant($name)); + $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); + $propbag->add('default', 'true'); + break; } return true; } - - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { - switch($event) { - case 'frontend_display': + switch($event) { + + case 'frontend_display': foreach ($this->markup_elements as $temp) { if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && @@ -182,11 +191,13 @@ class serendipity_event_emoticate extends serendipity_event } } } - return true; break; case 'css_backend': -?> + $eventData .= ' + +/* event emoticate plugin start */ + .example_emos { margin-left: auto; margin-right: auto; @@ -194,28 +205,37 @@ class serendipity_event_emoticate extends serendipity_event .example_emos td { text-align: center; } - + $eventData .= ' + +/* serendipity_event_emoticate start */ + .emoticon { display: inline; vertical-align: bottom; border: 0 none; } -get_config('COMMENT', true))) { echo '
          ' . PLUGIN_EVENT_EMOTICATE_TRANSFORM . '
          '; } - return true; break; - default: - return false; + default: + return false; + } + return true; } else { return false; } diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php index 6feebeba..66fd9f5b 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php @@ -1,43 +1,44 @@ -%s...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'ПоÑтингът е кеширан.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Кеширането завърши.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Кеширането е прекратено.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (общо %d поÑтинга)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'ПоÑтингът да не Ñе вижда на главната Ñтраница и в ÑпиÑъците'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Използване на групово-базираните реÑтрикции'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Когато е активирано, Вие можете да дефинирате кои потребителÑки групи да имат възможноÑÑ‚ за четене на поÑтингите. Тази Ð¾Ð¿Ñ†Ð¸Ñ Ð¸Ð¼Ð° голÑмо влиÑние върху производителноÑтта на блога. Позволете Ñ, Ñамо ако наиÑтина ще Ñ Ð¸Ð·Ð¿Ð¾Ð»Ð·Ð²Ð°Ñ‚Ðµ.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Използване на потребител-базирани реÑтрикции'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Когато е активирано, Вие можете да дефинирате кои Ñпецифични потребители да имат възможноÑÑ‚ за четене на поÑтингите. Тази Ð¾Ð¿Ñ†Ð¸Ñ Ð¸Ð¼Ð° голÑмо влиÑние върху производителноÑтта на блога. Позволете Ñ, Ñамо ако наиÑтина ще Ñ Ð¸Ð·Ð¿Ð¾Ð»Ð·Ð²Ð°Ñ‚Ðµ.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Изключване от RSS емиÑии'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'При избор \'Да\' Ñъдържанието на тази ÑÑ‚Ð°Ñ‚Ð¸Ñ Ð½Ñма да бъде включено в RSS емиÑии.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Допълнителни ÑвойÑтва за поÑтингите'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(Кеширане, не публични поÑтинги, sticky поÑтинги)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Маркиране на този поÑтинг като sticky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'ПоÑтингите могат да Ñе четат от'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Мене'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Съ-авторите'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Ð’Ñички'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Кеширане на поÑтингите ?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ðко е позволено, кеширана верÑÐ¸Ñ Ð½Ð° поÑтинга ще бъде генерирана при Ð½ÐµÐ³Ð¾Ð²Ð¸Ñ Ð·Ð°Ð¿Ð¸Ñ. Кеширането ще увеличи производителноÑтта, но ще намали гъвкавоÑтта на другите плъгини.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Кеширане на вÑички поÑтинги'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Кеширане на Ñледващата ÑÐµÑ€Ð¸Ñ Ð¿Ð¾Ñтинги ...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Кеширане на поÑтинги от %d до %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Кеширане на поÑтинг #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'ПоÑтингът е кеширан.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Кеширането завърши.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Кеширането е прекратено.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (общо %d поÑтинга)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'ПоÑтингът да не Ñе вижда на главната Ñтраница и в ÑпиÑъците'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Използване на групово-базираните реÑтрикции'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Когато е активирано, Вие можете да дефинирате кои потребителÑки групи да имат възможноÑÑ‚ за четене на поÑтингите. Тази Ð¾Ð¿Ñ†Ð¸Ñ Ð¸Ð¼Ð° голÑмо влиÑние върху производителноÑтта на блога. Позволете Ñ, Ñамо ако наиÑтина ще Ñ Ð¸Ð·Ð¿Ð¾Ð»Ð·Ð²Ð°Ñ‚Ðµ.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Използване на потребител-базирани реÑтрикции'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Когато е активирано, Вие можете да дефинирате кои Ñпецифични потребители да имат възможноÑÑ‚ за четене на поÑтингите. Тази Ð¾Ð¿Ñ†Ð¸Ñ Ð¸Ð¼Ð° голÑмо влиÑние върху производителноÑтта на блога. Позволете Ñ, Ñамо ако наиÑтина ще Ñ Ð¸Ð·Ð¿Ð¾Ð»Ð·Ð²Ð°Ñ‚Ðµ.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Изключване от RSS емиÑии'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'При избор \'Да\' Ñъдържанието на тази ÑÑ‚Ð°Ñ‚Ð¸Ñ Ð½Ñма да бъде включено в RSS емиÑии.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Допълнителни полета'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Допълнителните полета могат да Ñе поÑтавÑÑ‚ в шаблона на вашата тема на меÑта, където иÑкате те да Ñе показват. За това редактирайте Ð²Ð°ÑˆÐ¸Ñ Ñ„Ð°Ð¹Ð» entries.tpl и поÑтавете Smarty тагове подобно на Ñледващите примери: {$entry.properties.ep_MyCustomField} на желаните меÑта. Ðе трÑбва да изпуÑкате префикÑа \'ep_\' преди името на полетата. '); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Тук можете да въведете ÑпиÑък от имена на полета, разделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ð¸, които да използвате за извеждане на HTML за вÑÑка ÑтатиÑ. Ð’ имената Ñа разрешени Ñамо латинÑки букви и цифри (не и Ñпециални Ñимволи). Ðапример: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'СпиÑъкът на доÑтъпните допълнителни полета може да бъде редактиран в конфигурациÑта на приÑтавка serendipity_event_entryproperties.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Допълнителни полета'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Допълнителните полета могат да Ñе поÑтавÑÑ‚ в шаблона на вашата тема на меÑта, където иÑкате те да Ñе показват. За това редактирайте Ð²Ð°ÑˆÐ¸Ñ Ñ„Ð°Ð¹Ð» entries.tpl и поÑтавете Smarty тагове подобно на Ñледващите примери: {$entry.properties.ep_MyCustomField} на желаните меÑта. Ðе трÑбва да изпуÑкате префикÑа \'ep_\' преди името на полетата. '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Тук можете да въведете ÑпиÑък от имена на полета, разделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ð¸, които да използвате за извеждане на HTML за вÑÑка ÑтатиÑ. Ð’ имената Ñа разрешени Ñамо латинÑки букви и цифри (не и Ñпециални Ñимволи). Ðапример: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'СпиÑъкът на доÑтъпните допълнителни полета може да бъде редактиран в конфигурациÑта на приÑтавка serendipity_event_entryproperties.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Забранени текÑтови Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð°Ð½Ð¸Ñ Ð·Ð° тази ÑтатиÑ:'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Използване на разширено търÑене в базата данни'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ðко е позволено, ще бъдат изпълнени допълнителни SQL заÑвки за лепкави Ñтатии, Ñкрити Ñтатии и изтрити Ñтатии, за да бъдат използвани на лицевата Ñтраница. Ðко не е нужна, забраната на тази Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ‰Ðµ увеличи производителноÑтта.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Забранени текÑтови Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð°Ð½Ð¸Ñ Ð·Ð° тази ÑтатиÑ:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Използване на разширено търÑене в базата данни'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ðко е позволено, ще бъдат изпълнени допълнителни SQL заÑвки за лепкави Ñтатии, Ñкрити Ñтатии и изтрити Ñтатии, за да бъдат използвани на лицевата Ñтраница. Ðко не е нужна, забраната на тази Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ‰Ðµ увеличи производителноÑтта.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Екран за редактиране на Ñтатии'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Тук можете да изберете кои елементи (полета) и в какъв ред да бъдат показани по време на процеÑа на редактиране.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Екран за редактиране на Ñтатии'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Тук можете да изберете кои елементи (полета) и в какъв ред да бъдат показани по време на процеÑа на редактиране.'); \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'ä½ å¯ä»¥åœ¨ä½ çš„åšå®¢æ¨¡ç‰ˆä¸­ä½¿ç”¨é¢å¤–附加的自定义字段,从而将相关字段内容显示在页é¢ä¸Šã€‚你需è¦ç¼–辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的åˆé€‚ä½ç½®ï¼Œä¸è¿‡éœ€è¦ä¸»æ„的是,è¦åœ¨æ¯ä¸€ä¸ªè‡ªå®šä¹‰å­—段å‰é¢æ·»åŠ å‰ç¼€(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你å¯ä»¥è¾“入一些自定义字段的å称,用逗å·åˆ†å‰²å¼€æ¥ã€‚这些自定义字段å¯ä»¥åœ¨ä»»ä½•一篇文章中被使用。ä¸è¦åœ¨è‡ªå®šä¹‰å­—段的å称中使用特殊字符或空格。自定义字段的åç§°å¯ä»¥æ˜¯ Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'å¯åœ¨â€œé…ç½®æ’ä»¶â€ä¸­ä¿®æ”¹è‡ªå®šä¹‰å­—段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php index 06852a7f..4f94f0ff 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -%s...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'PříspÄ›vek cachován.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspÄ›vků hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspÄ›vku ZRUÅ ENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poÄtu %d příspÄ›vků)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pÅ™ehledu Älánků / na hlavní stránce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspÄ›vku se nebude zobrazovat v RSS kanálu/kanálech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspÄ›vků'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveÅ™ejné příspÄ›vky, stálé (pÅ™ilepené) příspÄ›vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'OznaÄ tento příspÄ›vek jako stálý (pÅ™ilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'PříspÄ›vky mohou být pÅ™eÄteny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspÄ›vků?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, pÅ™i každém uložení příspÄ›vku bude vytvoÅ™ena cachovaná verze. To znamená, že pÅ™i každém naÄtení stránky nebude příspÄ›vek sestavován od zaÄátku znovu, ale vezme se pÅ™edgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspÄ›vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'NaÄítání další dávky příspÄ›vků...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'NaÄítání příspÄ›vků %d až %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspÄ›vek #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'PříspÄ›vek cachován.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspÄ›vků hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspÄ›vku ZRUÅ ENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poÄtu %d příspÄ›vků)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pÅ™ehledu Älánků / na hlavní stránce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspÄ›vku se nebude zobrazovat v RSS kanálu/kanálech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní Å¡ablonÄ› v místech, kde chcete zobrazovat data z tÄ›chto polí. Pro tuto funkci musíte editovat Å¡ablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspÄ›vků, oddÄ›lených Äárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být zmÄ›nÄ›n v konfiguraci pluginu.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní Å¡ablonÄ› v místech, kde chcete zobrazovat data z tÄ›chto polí. Pro tuto funkci musíte editovat Å¡ablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspÄ›vků, oddÄ›lených Äárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být zmÄ›nÄ›n v konfiguraci pluginu.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných znaÄkovacích pluginů pro tento příspÄ›vek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvoÅ™eny přídavné SQL dotazy, které umožní použít i pÅ™ilepené, skryté a z hlavní stránky odstranÄ›né příspÄ›vky. Pokud tyto nejsou použávané, doporuÄuje se volbu zakázat, což může zvýšit výkon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných znaÄkovacích pluginů pro tento příspÄ›vek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvoÅ™eny přídavné SQL dotazy, které umožní použít i pÅ™ilepené, skryté a z hlavní stránky odstranÄ›né příspÄ›vky. Pokud tyto nejsou použávané, doporuÄuje se volbu zakázat, což může zvýšit výkon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'EditaÄní obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poÅ™adí má tento modul zobrazovat v procesu úprav příspÄ›vku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'EditaÄní obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poÅ™adí má tento modul zobrazovat v procesu úprav příspÄ›vku.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php index 81bd80db..4f94f0ff 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -%s...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'PříspÄ›vek cachován.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspÄ›vků hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspÄ›vku ZRUÅ ENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poÄtu %d příspÄ›vků)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pÅ™ehledu Älánků / na hlavní stránce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspÄ›vku se nebude zobrazovat v RSS kanálu/kanálech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspÄ›vků'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveÅ™ejné příspÄ›vky, stálé (pÅ™ilepené) příspÄ›vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'OznaÄ tento příspÄ›vek jako stálý (pÅ™ilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'PříspÄ›vky mohou být pÅ™eÄteny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspÄ›vků?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, pÅ™i každém uložení příspÄ›vku bude vytvoÅ™ena cachovaná verze. To znamená, že pÅ™i každém naÄtení stránky nebude příspÄ›vek sestavován od zaÄátku znovu, ale vezme se pÅ™edgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspÄ›vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'NaÄítání další dávky příspÄ›vků...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'NaÄítání příspÄ›vků %d až %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspÄ›vek #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'PříspÄ›vek cachován.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspÄ›vků hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspÄ›vku ZRUÅ ENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poÄtu %d příspÄ›vků)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pÅ™ehledu Älánků / na hlavní stránce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí Äíst Älánek. Tato volba má velký vliv na rychlost vytváření stránky s pÅ™ehledem Älánků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspÄ›vku se nebude zobrazovat v RSS kanálu/kanálech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní Å¡ablonÄ› v místech, kde chcete zobrazovat data z tÄ›chto polí. Pro tuto funkci musíte editovat Å¡ablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspÄ›vků, oddÄ›lených Äárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být zmÄ›nÄ›n v konfiguraci pluginu.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní Å¡ablonÄ› v místech, kde chcete zobrazovat data z tÄ›chto polí. Pro tuto funkci musíte editovat Å¡ablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspÄ›vků, oddÄ›lených Äárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být zmÄ›nÄ›n v konfiguraci pluginu.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných znaÄkovacích pluginů pro tento příspÄ›vek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvoÅ™eny přídavné SQL dotazy, které umožní použít i pÅ™ilepené, skryté a z hlavní stránky odstranÄ›né příspÄ›vky. Pokud tyto nejsou použávané, doporuÄuje se volbu zakázat, což může zvýšit výkon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných znaÄkovacích pluginů pro tento příspÄ›vek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvoÅ™eny přídavné SQL dotazy, které umožní použít i pÅ™ilepené, skryté a z hlavní stránky odstranÄ›né příspÄ›vky. Pokud tyto nejsou použávané, doporuÄuje se volbu zakázat, což může zvýšit výkon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'EditaÄní obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poÅ™adí má tento modul zobrazovat v procesu úprav příspÄ›vku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'EditaÄní obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poÅ™adí má tento modul zobrazovat v procesu úprav příspÄ›vku.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php index c5cae17e..119fec72 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ - * EN-Revision: 690 */ - //Sticky post +//Sticky post @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Propiedades extendidas de las entradas'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(caché, artículos privados, sticky posts)'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Marcar esta entrada como Sticky Post'); @@ -29,4 +29,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Si la activas, puedes definir qué usuarios de un grupo están autorizados para leer las entradas. Esta opción tiene un profundo impacto en el desempeño al visualizar tus artículos. Actívala sólo si realmente vas a utilizar esta característica.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Utilizar restricciones basadas en usuarios'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Si la activas, puedes definir que usuarios específicos están autorizados a leer tus entradas. Esta opción tiene un profundo impacto en el desempeño al visualizar tus artículos. Actívala sólo si realmente vas a utilizar esta característica.'); -?> \ No newline at end of file + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php index 52727107..2ddb38b9 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -configuration du plugin.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php index 617434bb..3a5d9fb0 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 966 */ @@ -34,8 +34,7 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'カスタムフィールド'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Additional custom fields can be used in your template at places where you want them to show up. For that, edit your entries.tpl template file and place Smarty tags like {$entry.properties.ep_MyCustomField} in the HTML where you like. å„é …ç›®ã®æŽ¥é ­èªž ep_ ã«æ³¨æ„ã—ã¦ãã ã•ã„。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'ã“ã“ã§ã€å„エントリã¸ã®å…¥åŠ›ã«ä½¿ç”¨ã§ãã‚‹ã€ã‚³ãƒ³ãƒžã§åˆ†å‰²ã•れãŸé …ç›®åã®ä¸€è¦§ã‚’入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ - 特殊文字ã¾ãŸã¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’ãれらã®ãƒ•ィールドåã«ä½¿ç”¨ã—ã¾ã›ã‚“。 例: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', ' -利用ã§ãるカスタム項目ã®ä¸€è¦§ã¯ã€ãƒ—ラグイン設定 ã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '利用ã§ãるカスタム項目ã®ä¸€è¦§ã¯ã€ãƒ—ラグイン設定 ã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ã“ã®ã‚¨ãƒ³ãƒˆãƒªã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—プラグインを無効ã«ã™ã‚‹:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php index ffb3b559..055cf352 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php @@ -1,27 +1,26 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'ê¸€ì— ëŒ€í•œ 확장 ì†ì„±'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(ìºì‹œ, 비공개 글, 꼭대기 글)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'ì´ ê¸€ì„ ê¼­ëŒ€ê¸° 글로 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'ì´ ê¸€ì˜ ì½ê¸° 허용 범위'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'ìž‘ì„±ìž ìžì‹ ë§Œ'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성ìžê¹Œì§€'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모ë‘ì—게 공개'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'ê¸€ì„ ìºì‹œí•¨'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 ê¸€ì„ ì €ìž¥í•  때마다 ìºì‹œëœ ë²„ì „ì„ ìƒì„±í•©ë‹ˆë‹¤. ìºì‹œë¥¼ 사용하면 ì„±ëŠ¥ì„ í–¥ìƒì‹œí‚¬ 수 있으나 다른 플러그ì¸ì˜ ìž‘ë™ ìœ ì—°ì„±ì„ ë–¨ì–´ëœ¨ë¦´ 수 있습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'ë‹¤ìŒ ê¸€ 묶ìŒì„ 불러오는 중...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사ì´ì˜ ê¸€ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 %sì— ëŒ€í•œ ìºì‹œë¥¼ ìƒì„±ì¤‘...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'ê¸€ì´ ìºì‹œë˜ì—ˆìŠµë‹ˆë‹¤.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±ì„ 마쳤습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'ìºì‹œ ìƒì„±ì´ 중단ë˜ì—ˆìŠµë‹ˆë‹¤.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (ì´ %dê°œì˜ ê¸€)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 안 함'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페ì´ì§€/정리 페ì´ì§€ì—서 ê¸€ì„ ìˆ¨ê¹€'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 ê¸€ì„ ì½ì„ 수 있는 사용ìžì˜ ê·¸ë£¹ì„ ì •ì˜í•  수 있습니다. 정리 페ì´ì§€ 표시 ì„±ëŠ¥ì— ìƒë‹¹í•œ ì˜í–¥ì„ 주기 ë•Œë¬¸ì— ì´ ì˜µì…˜ì€ ê¼­ 필요할 때만 사용하시기 ë°”ëžë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'ê¸€ì— ëŒ€í•œ 확장 ì†ì„±'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(ìºì‹œ, 비공개 글, 꼭대기 글)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'ì´ ê¸€ì„ ê¼­ëŒ€ê¸° 글로 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'ì´ ê¸€ì˜ ì½ê¸° 허용 범위'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'ìž‘ì„±ìž ìžì‹ ë§Œ'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성ìžê¹Œì§€'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모ë‘ì—게 공개'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'ê¸€ì„ ìºì‹œí•¨'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 ê¸€ì„ ì €ìž¥í•  때마다 ìºì‹œëœ ë²„ì „ì„ ìƒì„±í•©ë‹ˆë‹¤. ìºì‹œë¥¼ 사용하면 ì„±ëŠ¥ì„ í–¥ìƒì‹œí‚¬ 수 있으나 다른 플러그ì¸ì˜ ìž‘ë™ ìœ ì—°ì„±ì„ ë–¨ì–´ëœ¨ë¦´ 수 있습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'ë‹¤ìŒ ê¸€ 묶ìŒì„ 불러오는 중...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사ì´ì˜ ê¸€ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 %sì— ëŒ€í•œ ìºì‹œë¥¼ ìƒì„±ì¤‘...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'ê¸€ì´ ìºì‹œë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±ì„ 마쳤습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'ìºì‹œ ìƒì„±ì´ 중단ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (ì´ %dê°œì˜ ê¸€)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 안 함'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페ì´ì§€/정리 페ì´ì§€ì—서 ê¸€ì„ ìˆ¨ê¹€'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 ê¸€ì„ ì½ì„ 수 있는 사용ìžì˜ ê·¸ë£¹ì„ ì •ì˜í•  수 있습니다. 정리 페ì´ì§€ 표시 ì„±ëŠ¥ì— ìƒë‹¹í•œ ì˜í–¥ì„ 주기 ë•Œë¬¸ì— ì´ ì˜µì…˜ì€ ê¼­ 필요할 때만 사용하시기 ë°”ëžë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php index 1d62f4c9..5c03948a 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -37,4 +37,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Lista dostÄ™pnych pól uzytkownika może być zmieniona w module konfiguracji wtyczki.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Wyłącz wtyczki Znaczników dla tego wpisu:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php index 1ca4893e..3e2e6bde 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php @@ -1,10 +1,10 @@ - /* vim: set sts=4 ts=4 expandtab : */ - //Sticky post +//Sticky post @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Propriedades extra das entradas'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(cache, artigos privados, sticky posts)'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Marcar esta entrada como Sticky Post'); @@ -35,4 +35,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Campos ad hoc adicionais podem ser usados no seu modelo em locais em que quiser que apareçam. Para isso, edite o seu ficheiro entries.tpl e coloque etiquetas Smarty da forma {$entry.properties.ep_MyCustomField} no HTML onde desejar. Note o prefixo ep_ para cada campo. '); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Aqui pode introduzir uma lista de nomes de campos separados por vírgulas que podem ser usados para cada entrada - não use caracteres especiais ou espaços nesses nomes de campos. Exemplo: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'A lista de campos ad hoc disponíveis pode ser mudada na configuração de plugins.'); -?> + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php index ee22cb49..4ee864ad 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php @@ -6,40 +6,41 @@ * @revisionDate 2010-08-17 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšírené vlastnosti Älánkov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejné Älánky, stále (prilepené) Älánky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'OznaÄiÅ¥ tento Älánok ako stály (prilepený)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'ÄŒlánky môžu byÅ¥ preÄítané'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoľvek'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapnúť cachovanie Älánkov?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnuté, pri každom uložení Älánku bude vytvorená cachovaná verzia. To znamená, že pri každom naÄítaní stránky nebude príspevok generovaný odznova, ale použije sa predgenerovaná (cachovaná) verzia. Cachovanie zvýši výkon weblogu, ale môže obmedziÅ¥ funkÄnosÅ¥ ostatných doplnkov.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'CachovaÅ¥ príspevky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'NaÄítanie ÄalÅ¡ej dávky príspevkov...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'NaÄítanie príspevkov %d až %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváranie cachovanej verzie pre príspevok #%d, %s...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Príspevok cachovaný.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie príspevkov dokonÄené.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie príspevkov ZRUÅ ENÉ.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poÄtu %d príspevkov)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'SkryÅ¥ v prehľade Älánkov / na hlavnej stránke'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použíť obmedzenie pre skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnuté, tak môžete zadaÅ¥, ktoré skupiny používateľov môžu ÄítaÅ¥ Älánok. Toto nastavenie má veľký vplyv an rýchlosÅ¥ vytvárania stránky s prehľadom Älánkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použíť obmedzenie pre používateľov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnuté, tak môžete zadaÅ¥, ktorí používatelia môžu ÄítaÅ¥ Älánok. Toto nastavenie má veľký vplyv an rýchlosÅ¥ v +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšírené vlastnosti Älánkov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejné Älánky, stále (prilepené) Älánky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'OznaÄiÅ¥ tento Älánok ako stály (prilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'ÄŒlánky môžu byÅ¥ preÄítané'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoľvek'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapnúť cachovanie Älánkov?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnuté, pri každom uložení Älánku bude vytvorená cachovaná verzia. To znamená, že pri každom naÄítaní stránky nebude príspevok generovaný odznova, ale použije sa predgenerovaná (cachovaná) verzia. Cachovanie zvýši výkon weblogu, ale môže obmedziÅ¥ funkÄnosÅ¥ ostatných doplnkov.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'CachovaÅ¥ príspevky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'NaÄítanie ÄalÅ¡ej dávky príspevkov...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'NaÄítanie príspevkov %d až %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváranie cachovanej verzie pre príspevok #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Príspevok cachovaný.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie príspevkov dokonÄené.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie príspevkov ZRUÅ ENÉ.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poÄtu %d príspevkov)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'SkryÅ¥ v prehľade Älánkov / na hlavnej stránke'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použíť obmedzenie pre skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnuté, tak môžete zadaÅ¥, ktoré skupiny používateľov môžu ÄítaÅ¥ Älánok. Toto nastavenie má veľký vplyv an rýchlosÅ¥ vytvárania stránky s prehľadom Älánkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použíť obmedzenie pre používateľov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnuté, tak môžete zadaÅ¥, ktorí používatelia môžu ÄítaÅ¥ Älánok. Toto nastavenie má veľký vplyv an rýchlosÅ¥ v ytvárania stránky s prehľadom Älánkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'SkryÅ¥ obsah v RSS kanáli'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnuté ,tak sa nebude zobrazovaÅ¥ obsah Älánku v RSS kanáli/kanáloch.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'SkryÅ¥ obsah v RSS kanáli'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnuté ,tak sa nebude zobrazovaÅ¥ obsah Älánku v RSS kanáli/kanáloch.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastné pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridané vlastné polia môžu byÅ¥ použité vo VaÅ¡ej vlastnej Å¡ablóne na miestach, kde chcete zobrazovaÅ¥ údaje z týchto polí. Pre túto funkcio musíte upraviÅ¥ Å¡ablónu "entries.tpl" a v nej umiestniÅ¥ Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred názov každého poľa musí byÅ¥ pridaná predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu môžete zadaÅ¥ zoznam polí, ktoré chcete použiÅ¥ vo svojich Älánkoch. Polia oddeľovaÅ¥ Äiarkou. Mená polí nemôžu obsahovaÅ¥ Å¡peciálne znaky ani diakritiku. Príklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupných voliteľných polí môže byÅ¥ zmenený v nastaveniach doplnku.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastné pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridané vlastné polia môžu byÅ¥ použité vo VaÅ¡ej vlastnej Å¡ablóne na miestach, kde chcete zobrazovaÅ¥ údaje z týchto polí. Pre túto funkcio musíte upraviÅ¥ Å¡ablónu "entries.tpl" a v nej umiestniÅ¥ Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred názov každého poľa musí byÅ¥ pridaná predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu môžete zadaÅ¥ zoznam polí, ktoré chcete použiÅ¥ vo svojich Älánkoch. Polia oddeľovaÅ¥ Äiarkou. Mená polí nemôžu obsahovaÅ¥ Å¡peciálne znaky ani diakritiku. Príklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupných voliteľných polí môže byÅ¥ zmenený v nastaveniach doplnku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ZakázaÅ¥ použitie transofrmácií textu (markup) pre tento Älánok:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšírené databázové hľadanie'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnuté, budú vytvorené prídavné SQL dotazy, ktoré umožnia použiÅ¥ aj prilepené, skryté a z hlavnej stránky odstránané Älánky. Ak toto nastavenie nepotrebujete, odporúÄame z dôvodov výkonu ponechaÅ¥ vypnuté.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ZakázaÅ¥ použitie transofrmácií textu (markup) pre tento Älánok:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšírené databázové hľadanie'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnuté, budú vytvorené prídavné SQL dotazy, ktoré umožnia použiÅ¥ aj prilepené, skryté a z hlavnej stránky odstránané Älánky. Ak toto nastavenie nepotrebujete, odporúÄame z dôvodov výkonu ponechaÅ¥ vypnuté.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'EditaÄná obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktoré prvky a v akom poradí má tento doplnok zobrazovaÅ¥ v procese úprav Älánku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'EditaÄná obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktoré prvky a v akom poradí má tento doplnok zobrazovaÅ¥ v procese úprav Älánku.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php index a7d60fb4..cdb709e6 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns # # http://www.jannis.to/programming/serendipity.html # @@ -12,35 +12,34 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(å¿«å–資料, ä¸é–‹æ”¾æ–‡ç« , 置頂文章)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰å¯ä»¥é–±è®€æ–‡ç« '); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'å…è¨±å¿«å–æ–‡ç« ï¼Ÿ'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ¯æ¬¡å„²å­˜æ–‡ç« æ™‚都會建立快å–資料。快å–資料å¯ä»¥å¢žåŠ é€Ÿåº¦ï¼Œä½†å¯èƒ½æœ‰äº›å¤–掛無法相容。'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快å–資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'æ“·å–其他文章...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'æ“·å–æ–‡ç«  %d 到 %d'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快å–資料 #%d, %s...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'å–å¾—å¿«å–資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'å¿«å–完æˆã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'å¿«å–è³‡æ–™å–æ¶ˆã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'éš±è—æ–¼æ–‡ç« é é¢ / 主é é¢'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組é™åˆ¶'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹ç¾¤çµ„çš„æˆå“¡å¯ä»¥æµè¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員é™åˆ¶'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹æœƒå“¡å¯ä»¥ç€è¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS å…§éš±è—內容'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ–‡ç« çš„å…§å®¹ä¸æœƒé¡¯ç¤ºæ–¼ RSS 內。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(å¿«å–資料, ä¸é–‹æ”¾æ–‡ç« , 置頂文章)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰å¯ä»¥é–±è®€æ–‡ç« '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'å…è¨±å¿«å–æ–‡ç« ï¼Ÿ'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ¯æ¬¡å„²å­˜æ–‡ç« æ™‚都會建立快å–資料。快å–資料å¯ä»¥å¢žåŠ é€Ÿåº¦ï¼Œä½†å¯èƒ½æœ‰äº›å¤–掛無法相容。'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快å–資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'æ“·å–其他文章...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'æ“·å–æ–‡ç«  %d 到 %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快å–資料 #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'å–å¾—å¿«å–資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'å¿«å–完æˆã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'å¿«å–è³‡æ–™å–æ¶ˆã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'éš±è—æ–¼æ–‡ç« é é¢ / 主é é¢'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組é™åˆ¶'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹ç¾¤çµ„çš„æˆå“¡å¯ä»¥æµè¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員é™åˆ¶'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹æœƒå“¡å¯ä»¥ç€è¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS å…§éš±è—內容'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ–‡ç« çš„å…§å®¹ä¸æœƒé¡¯ç¤ºæ–¼ RSS 內。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄ä½'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您å¯ä»¥åœ¨æ¨¡æ¿è£¡é¢é¡¯ç¤ºé¡å¤–的欄ä½ã€‚您必須編輯 entries.tpl çš„æ¨¡æ¿æª”案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您è¦å®ƒé¡¯ç¤ºçš„ HTML 檔案裡é¢ã€‚ æ³¨æ„æ¯å€‹æ¬„ä½çš„å‰ç½®å­—å…ƒ ep_。'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡å¯ä»¥è¼¸å…¥æ¯å€‹ä»¥é€—點分開的欄ä½å稱 - ä¸è¦ç”¨ç‰¹æ®Šå­—元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'æ¯å€‹è‡ªè¨‚欄ä½å¯ä»¥åœ¨é€™è£¡æ”¹è®Š 外掛設定。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄ä½'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您å¯ä»¥åœ¨æ¨¡æ¿è£¡é¢é¡¯ç¤ºé¡å¤–的欄ä½ã€‚您必須編輯 entries.tpl çš„æ¨¡æ¿æª”案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您è¦å®ƒé¡¯ç¤ºçš„ HTML 檔案裡é¢ã€‚ æ³¨æ„æ¯å€‹æ¬„ä½çš„å‰ç½®å­—å…ƒ ep_。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡å¯ä»¥è¼¸å…¥æ¯å€‹ä»¥é€—點分開的欄ä½å稱 - ä¸è¦ç”¨ç‰¹æ®Šå­—元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'æ¯å€‹è‡ªè¨‚欄ä½å¯ä»¥åœ¨é€™è£¡æ”¹è®Š 外掛設定。'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php index fb5788af..35dadd0e 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -14,15 +14,11 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Yazarlar'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Herkes'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Yazılar önbelleklensin mi?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'EÄŸer bu seçenek etkinse, yazıyı her kaydettiÄŸinizde -önbelleklenmiÅŸ bir sürüm kendiliÄŸinden oluÅŸturulacaktır. Önbellekleme yazıların yayın esnasında -daha çabuk eriÅŸilmesine imkan verir, siteye eriÅŸim hızını arttırır, Ama diÄŸer eklentilerle beraber çalışırken -ölçeklenebilir olma imkanını da azaltır..'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'EÄŸer bu seçenek etkinse, yazıyı her kaydettiÄŸinizde önbelleklenmiÅŸ bir sürüm kendiliÄŸinden oluÅŸturulacaktır. Önbellekleme yazıların yayın esnasında daha çabuk eriÅŸilmesine imkan verir, siteye eriÅŸim hızını arttırır, Ama diÄŸer eklentilerle beraber çalışırken ölçeklenebilir olma imkanını da azaltır..'); @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Yazıları önbellekleme iÅŸlemini gerçekleÅŸtir'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Yazıların kaydı gelecek iÅŸlem için çekiliyor...'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Yazıların çekilme iÅŸlemi %d dan %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Building cache for entryÅžu yazı için önbellekleme iÅŸlemi: -#%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Building cache for entryÅžu yazı için önbellekleme iÅŸlemi: #%d, %s...'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Yazı önbellekleÄŸe aktarıldı.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Yazı önbellekleme iÅŸlemi tamamlandı.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Yazı önbellekleme iÅŸlemi iptal edildi.'); @@ -30,18 +26,14 @@ daha çabuk eriÅŸilmesine imkan verir, siteye eriÅŸim hızını arttırır, Ama @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br Kapalı'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Yazıyı öngörünüm / anasayfadan gizle'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Grup tabanlı yetkilendirme kullan'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'EÄŸer bu seçenek etkinleÅŸtirilirse, hangi kullanıcı grubunun -kullanıcılarının bu yazıyı okuma yetkisi olduÄŸunu belirleyebilirsiniz. Bu seçenek performansı olumsuz -etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneÄŸi etkinleÅŸtirmeniz önerilir.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'EÄŸer bu seçenek etkinleÅŸtirilirse, hangi kullanıcı grubunun kullanıcılarının bu yazıyı okuma yetkisi olduÄŸunu belirleyebilirsiniz. Bu seçenek performansı olumsuz etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneÄŸi etkinleÅŸtirmeniz önerilir.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Kullanıcı tabanlı yetkilendirme kullan'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'EÄŸer bu seçenek etkinleÅŸtirilirse, Bu yazıyı okuma izni olan özel kullanıcıları tanımlayabilirsiniz. Bu seçenek performansı olumsuz -etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneÄŸi etkinleÅŸtirmeniz önerilir.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'EÄŸer bu seçenek etkinleÅŸtirilirse, Bu yazıyı okuma izni olan özel kullanıcıları tanımlayabilirsiniz. Bu seçenek performansı olumsuz etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneÄŸi etkinleÅŸtirmeniz önerilir.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'İçeriÄŸi RSS Beslemesinden gizle'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'EÄŸer bu seçenek etkinleÅŸtirilirse, içeriÄŸi RSS Beslemesinden gizlenecektir.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Özel Alanlar'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Åžablonunuza eklenmek üzere ek özel alanlar belirleme imkanı.Bu alanlar nerede kullanmak istiyorsanız orada gösterilecek ÅŸekilde eklenebilir. Tam olarak istediÄŸiniz türden bir özelleÅŸtirme için entries.tpl ÅŸablon dosyanızı düzenleyin ve Smarty etiketlerini HTML etiketleme yapısı içinde -{$entry.properties.ep_MyCustomField} gibi yerleÅŸtirin. Not: her alanda ön ek ep_ ÅŸeklinde olmalıdır.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Åžablonunuza eklenmek üzere ek özel alanlar belirleme imkanı.Bu alanlar nerede kullanmak istiyorsanız orada gösterilecek ÅŸekilde eklenebilir. Tam olarak istediÄŸiniz türden bir özelleÅŸtirme için entries.tpl ÅŸablon dosyanızı düzenleyin ve Smarty etiketlerini HTML etiketleme yapısı içinde {$entry.properties.ep_MyCustomField} gibi yerleÅŸtirin. Not: her alanda ön ek ep_ ÅŸeklinde olmalıdır.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Buraya virgülle ayrılmış özel alanlarınızı listeleyebilirsiniz ve bunları her yazınız için kullanabilirsiniz. özel harf karakterleri ya da boÅŸluk karakteri kullanmamaya özen gösterin - ÖrneÄŸin:"Ozelalan1, Ozelalan2" ÅŸeklinde kullanın.' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Listelenen özel alanlar eklenti yapılandırma bölümünden deÄŸiÅŸtirilebilir.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'ä½ å¯ä»¥åœ¨ä½ çš„åšå®¢æ¨¡ç‰ˆä¸­ä½¿ç”¨é¢å¤–附加的自定义字段,从而将相关字段内容显示在页é¢ä¸Šã€‚你需è¦ç¼–辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的åˆé€‚ä½ç½®ï¼Œä¸è¿‡éœ€è¦ä¸»æ„的是,è¦åœ¨æ¯ä¸€ä¸ªè‡ªå®šä¹‰å­—段å‰é¢æ·»åŠ å‰ç¼€(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你å¯ä»¥è¾“入一些自定义字段的å称,用逗å·åˆ†å‰²å¼€æ¥ã€‚这些自定义字段å¯ä»¥åœ¨ä»»ä½•一篇文章中被使用。ä¸è¦åœ¨è‡ªå®šä¹‰å­—段的å称中使用特殊字符或空格。自定义字段的åç§°å¯ä»¥æ˜¯ Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'å¯åœ¨â€œé…ç½®æ’ä»¶â€ä¸­ä¿®æ”¹è‡ªå®šä¹‰å­—段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + diff --git a/plugins/serendipity_event_entryproperties/lang_bg.inc.php b/plugins/serendipity_event_entryproperties/lang_bg.inc.php index 0b12c0a0..ad1e1367 100644 --- a/plugins/serendipity_event_entryproperties/lang_bg.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_bg.inc.php @@ -1,44 +1,44 @@ -%s...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Ïîñòèíãúò å êåøèðàí.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Êåøèðàíåòî çàâúðøè.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Êåøèðàíåòî å ïðåêðàòåíî.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (îáùî %d ïîñòèíãà)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Ïîñòèíãúò äà íå ñå âèæäà íà ãëàâíàòà ñòðàíèöà è â ñïèñúöèòå'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Èçïîëçâàíå íà ãðóïîâî-áàçèðàíèòå ðåñòðèêöèè'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Êîãàòî å àêòèâèðàíî, Âèå ìîæåòå äà äåôèíèðàòå êîè ïîòðåáèòåëñêè ãðóïè äà èìàò âúçìîæíîñò çà ÷åòåíå íà ïîñòèíãèòå. Òàçè îïöèÿ èìà ãîëÿìî âëèÿíèå âúðõó ïðîèçâîäèòåëíîñòòà íà áëîãà. Ïîçâîëåòå ÿ, ñàìî àêî íàèñòèíà ùå ÿ èçïîëçâàòå.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Èçïîëçâàíå íà ïîòðåáèòåë-áàçèðàíè ðåñòðèêöèè'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Êîãàòî å àêòèâèðàíî, Âèå ìîæåòå äà äåôèíèðàòå êîè ñïåöèôè÷íè ïîòðåáèòåëè äà èìàò âúçìîæíîñò çà ÷åòåíå íà ïîñòèíãèòå. Òàçè îïöèÿ èìà ãîëÿìî âëèÿíèå âúðõó ïðîèçâîäèòåëíîñòòà íà áëîãà. Ïîçâîëåòå ÿ, ñàìî àêî íàèñòèíà ùå ÿ èçïîëçâàòå.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Èçêëþ÷âàíå îò RSS åìèñèè'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ïðè èçáîð \'Äà\' ñúäúðæàíèåòî íà òàçè ñòàòèÿ íÿìà äà áúäå âêëþ÷åíî â RSS åìèñèè.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Äîïúëíèòåëíè ñâîéñòâà çà ïîñòèíãèòå'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(Êåøèðàíå, íå ïóáëè÷íè ïîñòèíãè, sticky ïîñòèíãè)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ìàðêèðàíå íà òîçè ïîñòèíã êàòî sticky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Ïîñòèíãèòå ìîãàò äà ñå ÷åòàò îò'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Ìåíå'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Ñú-àâòîðèòå'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Âñè÷êè'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Êåøèðàíå íà ïîñòèíãèòå ?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Àêî å ïîçâîëåíî, êåøèðàíà âåðñèÿ íà ïîñòèíãà ùå áúäå ãåíåðèðàíà ïðè íåãîâèÿ çàïèñ. Êåøèðàíåòî ùå óâåëè÷è ïðîèçâîäèòåëíîñòòà, íî ùå íàìàëè ãúâêàâîñòòà íà äðóãèòå ïëúãèíè.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Êåøèðàíå íà âñè÷êè ïîñòèíãè'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Êåøèðàíå íà ñëåäâàùàòà ñåðèÿ ïîñòèíãè ...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Êåøèðàíå íà ïîñòèíãè îò %d äî %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Êåøèðàíå íà ïîñòèíã #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Ïîñòèíãúò å êåøèðàí.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Êåøèðàíåòî çàâúðøè.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Êåøèðàíåòî å ïðåêðàòåíî.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (îáùî %d ïîñòèíãà)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Ïîñòèíãúò äà íå ñå âèæäà íà ãëàâíàòà ñòðàíèöà è â ñïèñúöèòå'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Èçïîëçâàíå íà ãðóïîâî-áàçèðàíèòå ðåñòðèêöèè'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Êîãàòî å àêòèâèðàíî, Âèå ìîæåòå äà äåôèíèðàòå êîè ïîòðåáèòåëñêè ãðóïè äà èìàò âúçìîæíîñò çà ÷åòåíå íà ïîñòèíãèòå. Òàçè îïöèÿ èìà ãîëÿìî âëèÿíèå âúðõó ïðîèçâîäèòåëíîñòòà íà áëîãà. Ïîçâîëåòå ÿ, ñàìî àêî íàèñòèíà ùå ÿ èçïîëçâàòå.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Èçïîëçâàíå íà ïîòðåáèòåë-áàçèðàíè ðåñòðèêöèè'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Êîãàòî å àêòèâèðàíî, Âèå ìîæåòå äà äåôèíèðàòå êîè ñïåöèôè÷íè ïîòðåáèòåëè äà èìàò âúçìîæíîñò çà ÷åòåíå íà ïîñòèíãèòå. Òàçè îïöèÿ èìà ãîëÿìî âëèÿíèå âúðõó ïðîèçâîäèòåëíîñòòà íà áëîãà. Ïîçâîëåòå ÿ, ñàìî àêî íàèñòèíà ùå ÿ èçïîëçâàòå.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Èçêëþ÷âàíå îò RSS åìèñèè'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ïðè èçáîð \'Äà\' ñúäúðæàíèåòî íà òàçè ñòàòèÿ íÿìà äà áúäå âêëþ÷åíî â RSS åìèñèè.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Äîïúëíèòåëíè ïîëåòà'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Äîïúëíèòåëíèòå ïîëåòà ìîãàò äà ñå ïîñòàâÿò â øàáëîíà íà âàøàòà òåìà íà ìåñòà, êúäåòî èñêàòå òå äà ñå ïîêàçâàò. Çà òîâà ðåäàêòèðàéòå âàøèÿ ôàéë entries.tpl è ïîñòàâåòå Smarty òàãîâå ïîäîáíî íà ñëåäâàùèòå ïðèìåðè: {$entry.properties.ep_MyCustomField} íà æåëàíèòå ìåñòà. Íå òðÿáâà äà èçïóñêàòå ïðåôèêñà \'ep_\' ïðåäè èìåòî íà ïîëåòàòà. '); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Òóê ìîæåòå äà âúâåäåòå ñïèñúê îò èìåíà íà ïîëåòà, ðàçäåëåíè ñúñ çàïåòàè, êîèòî äà èçïîëçâàòå çà èçâåæäàíå íà HTML çà âñÿêà ñòàòèÿ.  èìåíàòà ñà ðàçðåøåíè ñàìî ëàòèíñêè áóêâè è öèôðè (íå è ñïåöèàëíè ñèìâîëè). Íàïðèìåð: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Ñïèñúêúò íà äîñòúïíèòå äîïúëíèòåëíè ïîëåòà ìîæå äà áúäå ðåäàêòèðàí â êîíôèãóðàöèÿòà íà ïðèñòàâêà serendipity_event_entryproperties.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Äîïúëíèòåëíè ïîëåòà'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Äîïúëíèòåëíèòå ïîëåòà ìîãàò äà ñå ïîñòàâÿò â øàáëîíà íà âàøàòà òåìà íà ìåñòà, êúäåòî èñêàòå òå äà ñå ïîêàçâàò. Çà òîâà ðåäàêòèðàéòå âàøèÿ ôàéë entries.tpl è ïîñòàâåòå Smarty òàãîâå ïîäîáíî íà ñëåäâàùèòå ïðèìåðè: {$entry.properties.ep_MyCustomField} íà æåëàíèòå ìåñòà. Íå òðÿáâà äà èçïóñêàòå ïðåôèêñà \'ep_\' ïðåäè èìåòî íà ïîëåòàòà. '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Òóê ìîæåòå äà âúâåäåòå ñïèñúê îò èìåíà íà ïîëåòà, ðàçäåëåíè ñúñ çàïåòàè, êîèòî äà èçïîëçâàòå çà èçâåæäàíå íà HTML çà âñÿêà ñòàòèÿ.  èìåíàòà ñà ðàçðåøåíè ñàìî ëàòèíñêè áóêâè è öèôðè (íå è ñïåöèàëíè ñèìâîëè). Íàïðèìåð: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Ñïèñúêúò íà äîñòúïíèòå äîïúëíèòåëíè ïîëåòà ìîæå äà áúäå ðåäàêòèðàí â êîíôèãóðàöèÿòà íà ïðèñòàâêà serendipity_event_entryproperties.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Çàáðàíåíè òåêñòîâè ôîðìàòèðàíèÿ çà òàçè ñòàòèÿ:'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Èçïîëçâàíå íà ðàçøèðåíî òúðñåíå â áàçàòà äàííè'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Àêî å ïîçâîëåíî, ùå áúäàò èçïúëíåíè äîïúëíèòåëíè SQL çàÿâêè çà ëåïêàâè ñòàòèè, ñêðèòè ñòàòèè è èçòðèòè ñòàòèè, çà äà áúäàò èçïîëçâàíè íà ëèöåâàòà ñòðàíèöà. Àêî íå å íóæíà, çàáðàíàòà íà òàçè ôóíêöèÿ ùå óâåëè÷è ïðîèçâîäèòåëíîñòòà.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Çàáðàíåíè òåêñòîâè ôîðìàòèðàíèÿ çà òàçè ñòàòèÿ:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Èçïîëçâàíå íà ðàçøèðåíî òúðñåíå â áàçàòà äàííè'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Àêî å ïîçâîëåíî, ùå áúäàò èçïúëíåíè äîïúëíèòåëíè SQL çàÿâêè çà ëåïêàâè ñòàòèè, ñêðèòè ñòàòèè è èçòðèòè ñòàòèè, çà äà áúäàò èçïîëçâàíè íà ëèöåâàòà ñòðàíèöà. Àêî íå å íóæíà, çàáðàíàòà íà òàçè ôóíêöèÿ ùå óâåëè÷è ïðîèçâîäèòåëíîñòòà.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Åêðàí çà ðåäàêòèðàíå íà ñòàòèè'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Òóê ìîæåòå äà èçáåðåòå êîè åëåìåíòè (ïîëåòà) è â êàêúâ ðåä äà áúäàò ïîêàçàíè ïî âðåìå íà ïðîöåñà íà ðåäàêòèðàíå.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Åêðàí çà ðåäàêòèðàíå íà ñòàòèè'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Òóê ìîæåòå äà èçáåðåòå êîè åëåìåíòè (ïîëåòà) è â êàêúâ ðåä äà áúäàò ïîêàçàíè ïî âðåìå íà ïðîöåñà íà ðåäàêòèðàíå.'); \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_cn.inc.php b/plugins/serendipity_event_entryproperties/lang_cn.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/lang_cn.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_cn.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'ä½ å¯ä»¥åœ¨ä½ çš„åšå®¢æ¨¡ç‰ˆä¸­ä½¿ç”¨é¢å¤–附加的自定义字段,从而将相关字段内容显示在页é¢ä¸Šã€‚你需è¦ç¼–辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的åˆé€‚ä½ç½®ï¼Œä¸è¿‡éœ€è¦ä¸»æ„的是,è¦åœ¨æ¯ä¸€ä¸ªè‡ªå®šä¹‰å­—段å‰é¢æ·»åŠ å‰ç¼€(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你å¯ä»¥è¾“入一些自定义字段的å称,用逗å·åˆ†å‰²å¼€æ¥ã€‚这些自定义字段å¯ä»¥åœ¨ä»»ä½•一篇文章中被使用。ä¸è¦åœ¨è‡ªå®šä¹‰å­—段的å称中使用特殊字符或空格。自定义字段的åç§°å¯ä»¥æ˜¯ Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'å¯åœ¨â€œé…ç½®æ’ä»¶â€ä¸­ä¿®æ”¹è‡ªå®šä¹‰å­—段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + diff --git a/plugins/serendipity_event_entryproperties/lang_cs.inc.php b/plugins/serendipity_event_entryproperties/lang_cs.inc.php index ff46328e..6a814d8e 100644 --- a/plugins/serendipity_event_entryproperties/lang_cs.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_cs.inc.php @@ -1,4 +1,4 @@ -%s...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Pøíspìvek cachován.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování pøíspìvkù hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování pøíspìvku ZRUŠENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poètu %d pøíspìvkù)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pøehledu èlánkù / na hlavní stránce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, mùžete zadat, které skupiny uživatelù smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, mùžete zadat, kteøí uživatelé smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah pøíspìvku se nebude zobrazovat v RSS kanálu/kanálech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšíøené vlastnosti pøíspìvkù'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveøejné pøíspìvky, stálé (pøilepené) pøíspìvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Oznaè tento pøíspìvek jako stálý (pøilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Pøíspìvky mohou být pøeèteny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování pøíspìvkù?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, pøi každém uložení pøíspìvku bude vytvoøena cachovaná verze. To znamená, že pøi každém naètení stránky nebude pøíspìvek sestavován od zaèátku znovu, ale vezme se pøedgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale mùže omezit funkci ostatních pluginù.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat pøíspìvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Naèítání další dávky pøíspìvkù...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Naèítání pøíspìvkù %d až %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváøení cachované verze pro pøíspìvek #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Pøíspìvek cachován.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování pøíspìvkù hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování pøíspìvku ZRUŠENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poètu %d pøíspìvkù)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pøehledu èlánkù / na hlavní stránce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, mùžete zadat, které skupiny uživatelù smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, mùžete zadat, kteøí uživatelé smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah pøíspìvku se nebude zobrazovat v RSS kanálu/kanálech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pøídavná vlastní pole mohou být použita ve Vaší vlastní šablonì v místech, kde chcete zobrazovat data z tìchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde mùžete zadat seznam polí, které chcete použít u svých pøíspìvkù, oddìlených èárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Pøíklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí mùže být zmìnìn v konfiguraci pluginu.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pøídavná vlastní pole mohou být použita ve Vaší vlastní šablonì v místech, kde chcete zobrazovat data z tìchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde mùžete zadat seznam polí, které chcete použít u svých pøíspìvkù, oddìlených èárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Pøíklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí mùže být zmìnìn v konfiguraci pluginu.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných znaèkovacích pluginù pro tento pøíspìvek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšíøené databázové hledání'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvoøeny pøídavné SQL dotazy, které umožní použít i pøilepené, skryté a z hlavní stránky odstranìné pøíspìvky. Pokud tyto nejsou použávané, doporuèuje se volbu zakázat, což mùže zvýšit výkon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných znaèkovacích pluginù pro tento pøíspìvek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšíøené databázové hledání'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvoøeny pøídavné SQL dotazy, které umožní použít i pøilepené, skryté a z hlavní stránky odstranìné pøíspìvky. Pokud tyto nejsou použávané, doporuèuje se volbu zakázat, což mùže zvýšit výkon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editaèní obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poøadí má tento modul zobrazovat v procesu úprav pøíspìvku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editaèní obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poøadí má tento modul zobrazovat v procesu úprav pøíspìvku.'); diff --git a/plugins/serendipity_event_entryproperties/lang_cz.inc.php b/plugins/serendipity_event_entryproperties/lang_cz.inc.php index 3060b971..30b148fa 100644 --- a/plugins/serendipity_event_entryproperties/lang_cz.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_cz.inc.php @@ -1,4 +1,4 @@ -%s...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Pøíspìvek cachován.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování pøíspìvkù hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování pøíspìvku ZRU©ENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poètu %d pøíspìvkù)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pøehledu èlánkù / na hlavní stránce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou¾ít omezení pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, mù¾ete zadat, které skupiny u¾ivatelù smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu¾ijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou¾ít omezení pro u¾ivatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, mù¾ete zadat, kteøí u¾ivatelé smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu¾ijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah pøíspìvku se nebude zobrazovat v RSS kanálu/kanálech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz¹íøené vlastnosti pøíspìvkù'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveøejné pøíspìvky, stálé (pøilepené) pøíspìvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Oznaè tento pøíspìvek jako stálý (pøilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Pøíspìvky mohou být pøeèteny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování pøíspìvkù?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, pøi ka¾dém ulo¾ení pøíspìvku bude vytvoøena cachovaná verze. To znamená, ¾e pøi ka¾dém naètení stránky nebude pøíspìvek sestavován od zaèátku znovu, ale vezme se pøedgenerovaná (cachovaná) verze. Cachování zvý¹í výkon blogu, ale mù¾e omezit funkci ostatních pluginù.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat pøíspìvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Naèítání dal¹í dávky pøíspìvkù...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Naèítání pøíspìvkù %d a¾ %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváøení cachované verze pro pøíspìvek #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Pøíspìvek cachován.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování pøíspìvkù hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování pøíspìvku ZRU©ENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poètu %d pøíspìvkù)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v pøehledu èlánkù / na hlavní stránce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou¾ít omezení pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, mù¾ete zadat, které skupiny u¾ivatelù smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu¾ijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou¾ít omezení pro u¾ivatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, mù¾ete zadat, kteøí u¾ivatelé smí èíst èlánek. Tato volba má velký vliv na rychlost vytváøení stránky s pøehledem èlánkù. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu¾ijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah pøíspìvku se nebude zobrazovat v RSS kanálu/kanálech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pøídavná vlastní pole mohou být pou¾ita ve Va¹í vlastní ¹ablonì v místech, kde chcete zobrazovat data z tìchto polí. Pro tuto funkci musíte editovat ¹ablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde mù¾ete zadat seznam polí, které chcete pou¾ít u svých pøíspìvkù, oddìlených èárkou. Pro jména polí nepou¾ívejte speciální znaky ani diakritiku. Pøíklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí mù¾e být zmìnìn v konfiguraci pluginu.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pøídavná vlastní pole mohou být pou¾ita ve Va¹í vlastní ¹ablonì v místech, kde chcete zobrazovat data z tìchto polí. Pro tuto funkci musíte editovat ¹ablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde mù¾ete zadat seznam polí, které chcete pou¾ít u svých pøíspìvkù, oddìlených èárkou. Pro jména polí nepou¾ívejte speciální znaky ani diakritiku. Pøíklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí mù¾e být zmìnìn v konfiguraci pluginu.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka¾ pou¾ití vybraných znaèkovacích pluginù pro tento pøíspìvek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz¹íøené databázové hledání'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou¾ito, budou vytvoøeny pøídavné SQL dotazy, které umo¾ní pou¾ít i pøilepené, skryté a z hlavní stránky odstranìné pøíspìvky. Pokud tyto nejsou pou¾ávané, doporuèuje se volbu zakázat, co¾ mù¾e zvý¹it výkon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka¾ pou¾ití vybraných znaèkovacích pluginù pro tento pøíspìvek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz¹íøené databázové hledání'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou¾ito, budou vytvoøeny pøídavné SQL dotazy, které umo¾ní pou¾ít i pøilepené, skryté a z hlavní stránky odstranìné pøíspìvky. Pokud tyto nejsou pou¾ávané, doporuèuje se volbu zakázat, co¾ mù¾e zvý¹it výkon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editaèní obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poøadí má tento modul zobrazovat v procesu úprav pøíspìvku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editaèní obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém poøadí má tento modul zobrazovat v procesu úprav pøíspìvku.'); diff --git a/plugins/serendipity_event_entryproperties/lang_de.inc.php b/plugins/serendipity_event_entryproperties/lang_de.inc.php index 15f63515..d10e8f00 100644 --- a/plugins/serendipity_event_entryproperties/lang_de.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_de.inc.php @@ -1,4 +1,4 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -42,4 +42,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'If enabled, additional SQL queries will be issued to be able to use sticky entries, hidden entries and removed entries from the frontpage. If those are not needed, disabling this feature can improve performance.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Entry editing screen'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Here you can choose, which elements and in which order the plugin should show its input fields in the entry editing process.'); \ No newline at end of file +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Here you can choose, which elements and in which order the plugin should show its input fields in the entry editing process.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_MULTI_AUTHORS', 'Multiple authors'); \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_es.inc.php b/plugins/serendipity_event_entryproperties/lang_es.inc.php index 7a6027ae..4eb147bd 100644 --- a/plugins/serendipity_event_entryproperties/lang_es.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_es.inc.php @@ -1,11 +1,11 @@ - * EN-Revision: 690 */ - //Sticky post +//Sticky post @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Propiedades extendidas de las entradas'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(caché, artículos privados, sticky posts)'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Marcar esta entrada como Sticky Post'); @@ -37,4 +37,3 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Aquí puedes ingresar una lista de los nombres de los campos separados por coma que puedes utilizar por cada entrada - no utilices caracteres especiales o espacios en los nombres de campo. Por ejemplo: "Campopersonal1, Campopersonal2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'La lista de campos personalizados disponibles puede ser cambiada en la configuración de la extensión.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_fr.inc.php b/plugins/serendipity_event_entryproperties/lang_fr.inc.php index 982b2de9..4726357b 100644 --- a/plugins/serendipity_event_entryproperties/lang_fr.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_fr.inc.php @@ -1,4 +1,4 @@ -configuration du plugin.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_ja.inc.php b/plugins/serendipity_event_entryproperties/lang_ja.inc.php index 617434bb..47a0bd62 100644 --- a/plugins/serendipity_event_entryproperties/lang_ja.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 966 */ @@ -38,4 +38,4 @@ 利用ã§ãるカスタム項目ã®ä¸€è¦§ã¯ã€ãƒ—ラグイン設定 ã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ã“ã®ã‚¨ãƒ³ãƒˆãƒªã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—プラグインを無効ã«ã™ã‚‹:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/lang_ko.inc.php b/plugins/serendipity_event_entryproperties/lang_ko.inc.php index ffb3b559..055cf352 100644 --- a/plugins/serendipity_event_entryproperties/lang_ko.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_ko.inc.php @@ -1,27 +1,26 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'ê¸€ì— ëŒ€í•œ 확장 ì†ì„±'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(ìºì‹œ, 비공개 글, 꼭대기 글)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'ì´ ê¸€ì„ ê¼­ëŒ€ê¸° 글로 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'ì´ ê¸€ì˜ ì½ê¸° 허용 범위'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'ìž‘ì„±ìž ìžì‹ ë§Œ'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성ìžê¹Œì§€'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모ë‘ì—게 공개'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'ê¸€ì„ ìºì‹œí•¨'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 ê¸€ì„ ì €ìž¥í•  때마다 ìºì‹œëœ ë²„ì „ì„ ìƒì„±í•©ë‹ˆë‹¤. ìºì‹œë¥¼ 사용하면 ì„±ëŠ¥ì„ í–¥ìƒì‹œí‚¬ 수 있으나 다른 플러그ì¸ì˜ ìž‘ë™ ìœ ì—°ì„±ì„ ë–¨ì–´ëœ¨ë¦´ 수 있습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'ë‹¤ìŒ ê¸€ 묶ìŒì„ 불러오는 중...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사ì´ì˜ ê¸€ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 %sì— ëŒ€í•œ ìºì‹œë¥¼ ìƒì„±ì¤‘...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'ê¸€ì´ ìºì‹œë˜ì—ˆìŠµë‹ˆë‹¤.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±ì„ 마쳤습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'ìºì‹œ ìƒì„±ì´ 중단ë˜ì—ˆìŠµë‹ˆë‹¤.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (ì´ %dê°œì˜ ê¸€)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 안 함'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페ì´ì§€/정리 페ì´ì§€ì—서 ê¸€ì„ ìˆ¨ê¹€'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 ê¸€ì„ ì½ì„ 수 있는 사용ìžì˜ ê·¸ë£¹ì„ ì •ì˜í•  수 있습니다. 정리 페ì´ì§€ 표시 ì„±ëŠ¥ì— ìƒë‹¹í•œ ì˜í–¥ì„ 주기 ë•Œë¬¸ì— ì´ ì˜µì…˜ì€ ê¼­ 필요할 때만 사용하시기 ë°”ëžë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'ê¸€ì— ëŒ€í•œ 확장 ì†ì„±'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(ìºì‹œ, 비공개 글, 꼭대기 글)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'ì´ ê¸€ì„ ê¼­ëŒ€ê¸° 글로 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'ì´ ê¸€ì˜ ì½ê¸° 허용 범위'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'ìž‘ì„±ìž ìžì‹ ë§Œ'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성ìžê¹Œì§€'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모ë‘ì—게 공개'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'ê¸€ì„ ìºì‹œí•¨'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 ê¸€ì„ ì €ìž¥í•  때마다 ìºì‹œëœ ë²„ì „ì„ ìƒì„±í•©ë‹ˆë‹¤. ìºì‹œë¥¼ 사용하면 ì„±ëŠ¥ì„ í–¥ìƒì‹œí‚¬ 수 있으나 다른 플러그ì¸ì˜ ìž‘ë™ ìœ ì—°ì„±ì„ ë–¨ì–´ëœ¨ë¦´ 수 있습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'ë‹¤ìŒ ê¸€ 묶ìŒì„ 불러오는 중...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사ì´ì˜ ê¸€ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 %sì— ëŒ€í•œ ìºì‹œë¥¼ ìƒì„±ì¤‘...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'ê¸€ì´ ìºì‹œë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'ê¸€ì— ëŒ€í•œ ìºì‹œ ìƒì„±ì„ 마쳤습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'ìºì‹œ ìƒì„±ì´ 중단ë˜ì—ˆìŠµë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (ì´ %dê°œì˜ ê¸€)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br í”ŒëŸ¬ê·¸ì¸ ì‚¬ìš© 안 함'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페ì´ì§€/정리 페ì´ì§€ì—서 ê¸€ì„ ìˆ¨ê¹€'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 ê¸€ì„ ì½ì„ 수 있는 사용ìžì˜ ê·¸ë£¹ì„ ì •ì˜í•  수 있습니다. 정리 페ì´ì§€ 표시 ì„±ëŠ¥ì— ìƒë‹¹í•œ ì˜í–¥ì„ 주기 ë•Œë¬¸ì— ì´ ì˜µì…˜ì€ ê¼­ 필요할 때만 사용하시기 ë°”ëžë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_entryproperties/lang_pl.inc.php b/plugins/serendipity_event_entryproperties/lang_pl.inc.php index 4e3e1fc3..e35aa79b 100644 --- a/plugins/serendipity_event_entryproperties/lang_pl.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -37,4 +37,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Lista dostêpnych pól uzytkownika mo¿e byæ zmieniona w module konfiguracji wtyczki.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Wy³±cz wtyczki Znaczników dla tego wpisu:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php b/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php index f32888cb..aaaed880 100644 --- a/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - @@ -35,4 +35,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Campos ad hoc adicionais podem ser usados no seu modelo em locais em que quiser que apareçam. Para isso, edite o seu ficheiro entries.tpl e coloque etiquetas Smarty da forma {$entry.properties.ep_MyCustomField} no HTML onde desejar. Note o prefixo ep_ para cada campo. '); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Aqui pode introduzir uma lista de nomes de campos separados por vírgulas que podem ser usados para cada entrada - não use caracteres especiais ou espaços nesses nomes de campos. Exemplo: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'A lista de campos ad hoc disponíveis pode ser mudada na configuração de plugins.'); -?> + diff --git a/plugins/serendipity_event_entryproperties/lang_sk.inc.php b/plugins/serendipity_event_entryproperties/lang_sk.inc.php index 12af14a9..a859510d 100644 --- a/plugins/serendipity_event_entryproperties/lang_sk.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_sk.inc.php @@ -6,40 +6,41 @@ * @revisionDate 2010-08-17 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz¹írené vlastnosti èlánkov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejné èlánky, stále (prilepené) èlánky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Oznaèi» tento èlánok ako stály (prilepený)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Èlánky mô¾u by» preèítané'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoµvek'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapnú» cachovanie èlánkov?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnuté, pri ka¾dom ulo¾ení èlánku bude vytvorená cachovaná verzia. To znamená, ¾e pri ka¾dom naèítaní stránky nebude príspevok generovaný odznova, ale pou¾ije sa predgenerovaná (cachovaná) verzia. Cachovanie zvý¹i výkon weblogu, ale mô¾e obmedzi» funkènos» ostatných doplnkov.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachova» príspevky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Naèítanie ïal¹ej dávky príspevkov...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Naèítanie príspevkov %d a¾ %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváranie cachovanej verzie pre príspevok #%d, %s...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Príspevok cachovaný.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie príspevkov dokonèené.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie príspevkov ZRU©ENÉ.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poètu %d príspevkov)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skry» v prehµade èlánkov / na hlavnej stránke'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou¾í» obmedzenie pre skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnuté, tak mô¾ete zada», ktoré skupiny pou¾ívateµov mô¾u èíta» èlánok. Toto nastavenie má veµký vplyv an rýchlos» vytvárania stránky s prehµadom èlánkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou¾í» obmedzenie pre pou¾ívateµov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnuté, tak mô¾ete zada», ktorí pou¾ívatelia mô¾u èíta» èlánok. Toto nastavenie má veµký vplyv an rýchlos» v +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz¹írené vlastnosti èlánkov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejné èlánky, stále (prilepené) èlánky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Oznaèi» tento èlánok ako stály (prilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Èlánky mô¾u by» preèítané'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoµvek'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapnú» cachovanie èlánkov?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnuté, pri ka¾dom ulo¾ení èlánku bude vytvorená cachovaná verzia. To znamená, ¾e pri ka¾dom naèítaní stránky nebude príspevok generovaný odznova, ale pou¾ije sa predgenerovaná (cachovaná) verzia. Cachovanie zvý¹i výkon weblogu, ale mô¾e obmedzi» funkènos» ostatných doplnkov.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachova» príspevky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Naèítanie ïal¹ej dávky príspevkov...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Naèítanie príspevkov %d a¾ %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváranie cachovanej verzie pre príspevok #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Príspevok cachovaný.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie príspevkov dokonèené.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie príspevkov ZRU©ENÉ.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového poètu %d príspevkov)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skry» v prehµade èlánkov / na hlavnej stránke'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou¾í» obmedzenie pre skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnuté, tak mô¾ete zada», ktoré skupiny pou¾ívateµov mô¾u èíta» èlánok. Toto nastavenie má veµký vplyv an rýchlos» vytvárania stránky s prehµadom èlánkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou¾í» obmedzenie pre pou¾ívateµov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnuté, tak mô¾ete zada», ktorí pou¾ívatelia mô¾u èíta» èlánok. Toto nastavenie má veµký vplyv an rýchlos» v ytvárania stránky s prehµadom èlánkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skry» obsah v RSS kanáli'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnuté ,tak sa nebude zobrazova» obsah èlánku v RSS kanáli/kanáloch.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skry» obsah v RSS kanáli'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnuté ,tak sa nebude zobrazova» obsah èlánku v RSS kanáli/kanáloch.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastné pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridané vlastné polia mô¾u by» pou¾ité vo Va¹ej vlastnej ¹ablóne na miestach, kde chcete zobrazova» údaje z týchto polí. Pre túto funkcio musíte upravi» ¹ablónu "entries.tpl" a v nej umiestni» Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred názov ka¾dého poµa musí by» pridaná predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu mô¾ete zada» zoznam polí, ktoré chcete pou¾i» vo svojich èlánkoch. Polia oddeµova» èiarkou. Mená polí nemô¾u obsahova» ¹peciálne znaky ani diakritiku. Príklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupných voliteµných polí mô¾e by» zmenený v nastaveniach doplnku.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastné pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridané vlastné polia mô¾u by» pou¾ité vo Va¹ej vlastnej ¹ablóne na miestach, kde chcete zobrazova» údaje z týchto polí. Pre túto funkcio musíte upravi» ¹ablónu "entries.tpl" a v nej umiestni» Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred názov ka¾dého poµa musí by» pridaná predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu mô¾ete zada» zoznam polí, ktoré chcete pou¾i» vo svojich èlánkoch. Polia oddeµova» èiarkou. Mená polí nemô¾u obsahova» ¹peciálne znaky ani diakritiku. Príklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupných voliteµných polí mô¾e by» zmenený v nastaveniach doplnku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakáza» pou¾itie transofrmácií textu (markup) pre tento èlánok:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz¹írené databázové hµadanie'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnuté, budú vytvorené prídavné SQL dotazy, ktoré umo¾nia pou¾i» aj prilepené, skryté a z hlavnej stránky odstránané èlánky. Ak toto nastavenie nepotrebujete, odporúèame z dôvodov výkonu ponecha» vypnuté.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakáza» pou¾itie transofrmácií textu (markup) pre tento èlánok:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz¹írené databázové hµadanie'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnuté, budú vytvorené prídavné SQL dotazy, ktoré umo¾nia pou¾i» aj prilepené, skryté a z hlavnej stránky odstránané èlánky. Ak toto nastavenie nepotrebujete, odporúèame z dôvodov výkonu ponecha» vypnuté.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editaèná obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktoré prvky a v akom poradí má tento doplnok zobrazova» v procese úprav èlánku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editaèná obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktoré prvky a v akom poradí má tento doplnok zobrazova» v procese úprav èlánku.'); diff --git a/plugins/serendipity_event_entryproperties/lang_tn.inc.php b/plugins/serendipity_event_entryproperties/lang_tn.inc.php index a7d60fb4..cdb709e6 100644 --- a/plugins/serendipity_event_entryproperties/lang_tn.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns # # http://www.jannis.to/programming/serendipity.html # @@ -12,35 +12,34 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(å¿«å–資料, ä¸é–‹æ”¾æ–‡ç« , 置頂文章)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰å¯ä»¥é–±è®€æ–‡ç« '); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'å…è¨±å¿«å–æ–‡ç« ï¼Ÿ'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ¯æ¬¡å„²å­˜æ–‡ç« æ™‚都會建立快å–資料。快å–資料å¯ä»¥å¢žåŠ é€Ÿåº¦ï¼Œä½†å¯èƒ½æœ‰äº›å¤–掛無法相容。'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快å–資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'æ“·å–其他文章...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'æ“·å–æ–‡ç«  %d 到 %d'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快å–資料 #%d, %s...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'å–å¾—å¿«å–資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'å¿«å–完æˆã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'å¿«å–è³‡æ–™å–æ¶ˆã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'éš±è—æ–¼æ–‡ç« é é¢ / 主é é¢'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組é™åˆ¶'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹ç¾¤çµ„çš„æˆå“¡å¯ä»¥æµè¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員é™åˆ¶'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹æœƒå“¡å¯ä»¥ç€è¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS å…§éš±è—內容'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ–‡ç« çš„å…§å®¹ä¸æœƒé¡¯ç¤ºæ–¼ RSS 內。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(å¿«å–資料, ä¸é–‹æ”¾æ–‡ç« , 置頂文章)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰å¯ä»¥é–±è®€æ–‡ç« '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'å…è¨±å¿«å–æ–‡ç« ï¼Ÿ'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ¯æ¬¡å„²å­˜æ–‡ç« æ™‚都會建立快å–資料。快å–資料å¯ä»¥å¢žåŠ é€Ÿåº¦ï¼Œä½†å¯èƒ½æœ‰äº›å¤–掛無法相容。'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快å–資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'æ“·å–其他文章...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'æ“·å–æ–‡ç«  %d 到 %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快å–資料 #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'å–å¾—å¿«å–資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'å¿«å–完æˆã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'å¿«å–è³‡æ–™å–æ¶ˆã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'éš±è—æ–¼æ–‡ç« é é¢ / 主é é¢'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組é™åˆ¶'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹ç¾¤çµ„çš„æˆå“¡å¯ä»¥æµè¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員é™åˆ¶'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您å¯ä»¥é¸æ“‡å“ªå€‹æœƒå“¡å¯ä»¥ç€è¦½æ–‡ç« ã€‚這個功能會影響您的網誌速度,除éžå¿…è¦æœ€å¥½ä¸è¦ä½¿ç”¨ã€‚'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS å…§éš±è—內容'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'å¦‚æžœé–‹å•Ÿï¼Œæ–‡ç« çš„å…§å®¹ä¸æœƒé¡¯ç¤ºæ–¼ RSS 內。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄ä½'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您å¯ä»¥åœ¨æ¨¡æ¿è£¡é¢é¡¯ç¤ºé¡å¤–的欄ä½ã€‚您必須編輯 entries.tpl çš„æ¨¡æ¿æª”案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您è¦å®ƒé¡¯ç¤ºçš„ HTML 檔案裡é¢ã€‚ æ³¨æ„æ¯å€‹æ¬„ä½çš„å‰ç½®å­—å…ƒ ep_。'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡å¯ä»¥è¼¸å…¥æ¯å€‹ä»¥é€—點分開的欄ä½å稱 - ä¸è¦ç”¨ç‰¹æ®Šå­—元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'æ¯å€‹è‡ªè¨‚欄ä½å¯ä»¥åœ¨é€™è£¡æ”¹è®Š 外掛設定。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄ä½'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您å¯ä»¥åœ¨æ¨¡æ¿è£¡é¢é¡¯ç¤ºé¡å¤–的欄ä½ã€‚您必須編輯 entries.tpl çš„æ¨¡æ¿æª”案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您è¦å®ƒé¡¯ç¤ºçš„ HTML 檔案裡é¢ã€‚ æ³¨æ„æ¯å€‹æ¬„ä½çš„å‰ç½®å­—å…ƒ ep_。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡å¯ä»¥è¼¸å…¥æ¯å€‹ä»¥é€—點分開的欄ä½å稱 - ä¸è¦ç”¨ç‰¹æ®Šå­—元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'æ¯å€‹è‡ªè¨‚欄ä½å¯ä»¥åœ¨é€™è£¡æ”¹è®Š 外掛設定。'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_tr.inc.php b/plugins/serendipity_event_entryproperties/lang_tr.inc.php index 43ceabf8..7ebc104c 100644 --- a/plugins/serendipity_event_entryproperties/lang_tr.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_tr.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_event_entryproperties/lang_zh.inc.php b/plugins/serendipity_event_entryproperties/lang_zh.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/lang_zh.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_zh.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'ä½ å¯ä»¥åœ¨ä½ çš„åšå®¢æ¨¡ç‰ˆä¸­ä½¿ç”¨é¢å¤–附加的自定义字段,从而将相关字段内容显示在页é¢ä¸Šã€‚你需è¦ç¼–辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的åˆé€‚ä½ç½®ï¼Œä¸è¿‡éœ€è¦ä¸»æ„的是,è¦åœ¨æ¯ä¸€ä¸ªè‡ªå®šä¹‰å­—段å‰é¢æ·»åŠ å‰ç¼€(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你å¯ä»¥è¾“入一些自定义字段的å称,用逗å·åˆ†å‰²å¼€æ¥ã€‚这些自定义字段å¯ä»¥åœ¨ä»»ä½•一篇文章中被使用。ä¸è¦åœ¨è‡ªå®šä¹‰å­—段的å称中使用特殊字符或空格。自定义字段的åç§°å¯ä»¥æ˜¯ Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'å¯åœ¨â€œé…ç½®æ’ä»¶â€ä¸­ä¿®æ”¹è‡ªå®šä¹‰å­—段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'ç¦æ­¢åœ¨æ­¤æ–‡ç« ä¸­ä½¿ç”¨æ ‡è®°è¯­è¨€æ–¹é¢çš„æ’ä»¶ã€‚'); + diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index 8a993fc9..ab43b5eb 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -1,5 +1,9 @@ add('description', PLUGIN_EVENT_ENTRYPROPERTIES_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.39'); + $propbag->add('version', '1.41'); $propbag->add('requirements', array( 'serendipity' => '1.6', 'smarty' => '2.6.27', @@ -58,7 +62,6 @@ class serendipity_event_entryproperties extends serendipity_event )); $propbag->add('default', 'public'); $propbag->add('radio_per_row', '1'); - break; case 'customfields': @@ -110,30 +113,37 @@ class serendipity_event_entryproperties extends serendipity_event 'groups' => array('display' => PERM_READ . ': ' . GROUP), 'authors' => array('display' => PERM_READ . ': ' . AUTHOR), 'author' => array('display' => AUTHOR), + 'multi_authors'=> array('display' => PLUGIN_EVENT_ENTRYPROPERTIES_MULTI_AUTHORS), 'markup' => array('display' => PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP), 'customfields' => array('display' => PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS), ); $propbag->add('values', $values); - $propbag->add('default', 'sticky,frontpage,hiderss,access,password,groups,authors,author,markup'); + $propbag->add('default', 'sticky,frontpage,hiderss,access,password,groups,authors,author,multi_authors,markup'); break; + default: + return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); } - function &getValidAuthors() { + function &getValidAuthors() + { global $serendipity; if (serendipity_checkPermission('adminUsersMaintainOthers')) { @@ -147,8 +157,8 @@ class serendipity_event_entryproperties extends serendipity_event return $users; } - - function updateCache(&$entry) { + function updateCache(&$entry) + { global $serendipity; serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = " . (int)$entry['id'] . " AND property LIKE 'ep_cache_%'"); @@ -158,11 +168,12 @@ class serendipity_event_entryproperties extends serendipity_event serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entryproperties (entryid, property, value) VALUES (" . (int)$entry['id'] . ", 'ep_cache_extended', '" . serendipity_db_escape_string($entry['extended']) . "')"); } - function getSupportedProperties() { + function getSupportedProperties() + { static $supported_properties = null; if ($supported_properties === null) { - $supported_properties = array('is_sticky', 'access', 'access_groups', 'access_users', 'cache_body', 'cache_extended', 'no_frontpage', 'hiderss', 'entrypassword'); + $supported_properties = array('is_sticky', 'access', 'access_groups', 'access_users', 'multi_authors', 'cache_body', 'cache_extended', 'no_frontpage', 'hiderss', 'entrypassword'); // Capture special characters for "," and ":" $special_from = array('\\,', '\\:'); @@ -185,7 +196,8 @@ class serendipity_event_entryproperties extends serendipity_event return $supported_properties; } - function returnQueryCondition($is_cache) { + function returnQueryCondition($is_cache) + { $and = ''; if (!$is_cache) { $and = " AND property NOT LIKE 'ep_cache_%' "; @@ -194,11 +206,12 @@ class serendipity_event_entryproperties extends serendipity_event return $and; } - /* + /** * This function converts specific property fields so that they are * available natively to other plugins/templates. */ - function applyProperties(&$properties) { + function applyProperties(&$properties) + { global $serendipity; if (is_array($properties['disable_markups'])) { @@ -208,7 +221,8 @@ class serendipity_event_entryproperties extends serendipity_event } } - function addProperties(&$properties, &$eventData) { + function addProperties(&$properties, &$eventData) + { global $serendipity; // Get existing data @@ -243,7 +257,7 @@ class serendipity_event_entryproperties extends serendipity_event serendipity_plugin_api::hook_event('backend_entryproperties', $supported_properties); foreach($supported_properties AS $prop_key) { - // Do not delete a property if it is not subbmitted to this function, because serendipity_updertEntry + // Do not delete a property if it is not submitted to this function, because serendipity_updertEntry // possibly only wants to update entry metadata and left out any specific properties, which need to be kept. // An empty string like "" will properly remove an entryproperty, and POST values will always set an array index to an empty string. // $serendipipty['POST']['propertyform'] will be set whenever the entryeditor was properly displayed and unticked checkboxes shall remain. @@ -269,7 +283,8 @@ class serendipity_event_entryproperties extends serendipity_event } } - function showPasswordform() { + function showPasswordform() + { global $serendipity; $url = serendipity_currentURL(true); @@ -284,38 +299,40 @@ class serendipity_event_entryproperties extends serendipity_event } - function showBackend($element, $eventData, $is_sticky, $no_frontpage, $hiderss, $access_values, $access, $password, $use_groups, $access_groups, $use_users, $access_users, $more = array()) { + function showBackend($element, $eventData, $is_sticky, $no_frontpage, $hiderss, $access_values, $access, $password, $use_groups, $access_groups, $use_users, $access_users, $more = array()) + { global $serendipity; switch($element) { - case 'sticky': + + case 'sticky': ?>
          >
          >
          >
          : @@ -334,62 +351,95 @@ class serendipity_event_entryproperties extends serendipity_event
          - +
          '; - echo '
          '; - } + break; - return true; - - case 'authors': - if ($use_users) { + case 'authors': + if ($use_users) { ?>
          '; - echo '
          '; - } + break; - return true; + case 'multi_authors': +?> +
          + + +
          +
          @@ -411,10 +461,9 @@ class serendipity_event_entryproperties extends serendipity_event
          @@ -449,9 +498,9 @@ class serendipity_event_entryproperties extends serendipity_event
          " class="clearfix form_area media_choose"> - +
          @@ -506,11 +555,12 @@ class serendipity_event_entryproperties extends serendipity_event ?>
          returnQueryCondition($is_cache); - return true; break; case 'backend_display': @@ -571,6 +622,15 @@ class serendipity_event_entryproperties extends serendipity_event $access_groups = array(); } + if (isset($eventData['properties']['ep_multi_authors'])) { + //$eventData['properties']['ep_multi_authors'] = explode(';', $eventData['properties']['ep_multi_authors']); + } elseif (isset($serendipity['POST']['properties']['multi_authors'])) { + //$serendipity['POST']['properties']['multi_authors'] = explode(';', $serendipity['properties']['ep_multi_authors']); + $eventData['properties']['ep_multi_authors'] = $serendipity['POST']['properties']['multi_authors']; + } else { + $eventData['properties']['ep_multi_authors'] = array(); + } + if (isset($eventData['properties']['ep_access_users'])) { $access_users = explode(';', $eventData['properties']['ep_access_users']); } elseif (isset($serendipity['POST']['properties']['access_users'])) { @@ -600,8 +660,6 @@ class serendipity_event_entryproperties extends serendipity_event ?> '. PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE .''; echo ''. PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE .''; } - return true; break; case 'backend_import_entry': @@ -620,7 +677,7 @@ class serendipity_event_entryproperties extends serendipity_event $props['no_nl2br'] = 'true'; $this->addProperties($props, $eventData); } - break; + break; case 'backend_sidebar_entries_event_display_buildcache': if ($is_cache) { @@ -664,10 +721,9 @@ class serendipity_event_entryproperties extends serendipity_event ' . PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE . ''; + echo '' . PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE . ''; } } - return true; break; case 'backend_cache_entries': @@ -691,7 +747,6 @@ class serendipity_event_entryproperties extends serendipity_event $this->updateCache($entry); } } - return true; break; case 'backend_cache_purge': @@ -739,8 +794,6 @@ class serendipity_event_entryproperties extends serendipity_event } $this->addProperties($serendipity['POST']['properties'], $eventData); - - return true; break; case 'frontend_configure': @@ -760,9 +813,21 @@ class serendipity_event_entryproperties extends serendipity_event } foreach($properties AS $idx => $row) { - $eventData[$addData[$row['entryid']]]['properties'][$row['property']] = $row['value']; + if ($row['property'] == "ep_multi_authors") { + $tmp = explode(";", $row['value']); + $counter = 0; + unset($eventData[$addData[$row['entryid']]]['properties'][$row['property']]); + foreach($tmp as $key => $value) { + $tmp_author_array = serendipity_fetchAuthor($value); + $eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_id'] = $value; + $eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_name'] = $tmp_author_array[0]['realname']; + $eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_url'] = serendipity_authorURL($tmp_author_array[0]); + $counter++; + } + } else { + $eventData[$addData[$row['entryid']]]['properties'][$row['property']] = $row['value']; + } } - return true; break; case 'entry_display': @@ -793,7 +858,6 @@ class serendipity_event_entryproperties extends serendipity_event $eventData[0]['properties']['ep_' . $prop_key] = $serendipity['POST']['properties'][$prop_key]; } } - break; case 'entries_header': @@ -909,8 +973,6 @@ class serendipity_event_entryproperties extends serendipity_event } else { $eventData['joins'] .= $cond; } - - return true; break; case 'frontend_entries_rss': @@ -923,7 +985,6 @@ class serendipity_event_entryproperties extends serendipity_event } } } - return true; break; case 'backend_plugins_new_instance': @@ -946,19 +1007,18 @@ class serendipity_event_entryproperties extends serendipity_event // Set current plugin as last plugin in queue. $q = "UPDATE {$serendipity['dbPrefix']}plugins SET sort_order = " . intval($rs[0]) . " WHERE name = '" . $this->instance . "'"; serendipity_db_query($q); - - return true; break; default: return false; - break; } + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/ChangeLog b/plugins/serendipity_event_gravatar/ChangeLog index 5a2ec1c6..0978ca59 100644 --- a/plugins/serendipity_event_gravatar/ChangeLog +++ b/plugins/serendipity_event_gravatar/ChangeLog @@ -1,8 +1,14 @@ -# - * Allows other plugins to fetch user metadata via +Version 1.62.1: +------------------------------------------------------------------------ + * Remove defunct mybloglog + * Switch plugin to http_request2 + + +------------------------------------------------------------------------ + * Allows other plugins to fetch user metadata via avatar_fetch_userinfos hook. * supports !# twitter links now, too. - + Version 1.57: (brockhaus) * Better Gravatar handling, as the call changed a little * Doesn't accept existing but empty images anymore. @@ -12,7 +18,7 @@ Version 1.56: (brockhaus) * Removed inline styles, added class avatar_right and avatar_left. If not found set in css, the plugin will emit a default style for those two. - + Version 1.55: (brockhaus) ------------------------------------------------------------------------ * Twitter and identica where not fetched correctly if fetched first. @@ -21,7 +27,7 @@ Version 1.54: ------------------------------------------------------------------------ * Made PLUGIN_GRAVATAR_SUPPORTED recognize %s as variable for list of supported services - + Version 1.52: ------------------------------------------------------------------------ * Changed display of supported avatars in the comment area in order @@ -40,7 +46,7 @@ Version 1.48 (brockhaus) ------------------------------------------------------------------------ * FIX: PHP compatibility was broken since 1.46 :-/ * Added Identica Avatar. - This is mainly used for Identica Pingbacks and should be used in + This is mainly used for Identica Pingbacks and should be used in front of Favatar, else the Identica sign will show up. * Code cleanup. @@ -68,7 +74,7 @@ Version 1.44 (brockhaus) * Added buildin wavatar suport. * Support for Gravatar fallbacks identyicon, monsterid and wavatar. * Optimized trackback avatars: Querypars will be stripped from URL. - Now in example S8Y blogs always get the same Avatar cached, not + Now in example S8Y blogs always get the same Avatar cached, not one per trackback. Version 1.43 (brockhaus) @@ -81,7 +87,7 @@ Version 1.43 (brockhaus) Version 1.42 (brockhaus) ------------------------------------------------------------------------ - * Encoded _ in user urls in order to differ them from the + * Encoded _ in user urls in order to differ them from the seperators. urlencode doesn't encode _. Thanks to Tino Schwarze finding and fixing this. @@ -89,12 +95,12 @@ Version 1.41 (garvinhicking) ------------------------------------------------------------------------ * Fixed Last-Modified Header of avatar images. - + Version 1.40 () ------------------------------------------------------------------------ * Added ycon support (mo, http://moblog.wiredwings.com) - + ------------------------------------------------------------------------ Version 1.39 (brockhaus): @@ -122,7 +128,7 @@ Version 1.37 (brockhaus): Version 1.36 (brockhaus): * Added new option: You can define, that the plugin should not - produce avatar image directly but a smarty tag only. If this + produce avatar image directly but a smarty tag only. If this option is switched on, you can define in your comments template, where the avatar should be displayed using the smarty tag $comment.comment_avatar @@ -148,7 +154,7 @@ Version 1.34 (brockhaus): * Gravatars rating doesn't work reliable. My G rated Gravatar is only shown, if I use Gravatar X rating. :-/ - Added an option to switch off Gravatars rating parameter (what + Added an option to switch off Gravatars rating parameter (what should be the same as using X rating) ------------------------------------------------------------------------ @@ -172,7 +178,7 @@ Version 1.31 (brockhaus): ------------------------------------------------------------------------ Version 1.30 (brockhaus): - * Standard Avatar was not displayed in subdirectory blog + * Standard Avatar was not displayed in subdirectory blog installtions. * Gravatar link was slightly wrong (but working) @@ -190,7 +196,7 @@ Version 1.28 (brockhaus): ------------------------------------------------------------------------ Version 1.27 (brockhaus): - * If the writer entered his url as www.domain.de instead of + * If the writer entered his url as www.domain.de instead of http://www.domain.de, the Avatar was not always loaded correctly ------------------------------------------------------------------------ @@ -215,7 +221,7 @@ Version 1.24 (brockhaus): ------------------------------------------------------------------------ Version 1.23 (brockhaus): - * While fresh fetching P/Favatars, the Plugin will only accept + * While fresh fetching P/Favatars, the Plugin will only accept responses declared as image by the remote server. This will prevent accepting potential error html pages as Avatar images. @@ -274,7 +280,7 @@ Version 1.14 (brockhaus): ------------------------------------------------------------------------ Version 1.13 (brockhaus): - * Advice changed: It is not the statistic plugin producing not + * Advice changed: It is not the statistic plugin producing not working Pavatars/Favatars but the exit tracking plugin. ------------------------------------------------------------------------ @@ -286,7 +292,7 @@ Version 1.12 (brockhaus): found, are supported now, too. Former the Avatar Plugin assumed, that the default page is the P/Favatar. - * Default configuration now ordered like this: Gravatar -> Pavatar + * Default configuration now ordered like this: Gravatar -> Pavatar -> Favatar -> Default Avatar. * Added advice, that this plugin has to be executed before any link @@ -306,13 +312,13 @@ Version 1.11, testing version not released to CVS/Spartacus (brockhaus): Version 1.10 (brockhaus): * Pavatar / Avatar information where never loaded from cache - + * .. but after beeing loaded from cache it produced an endless request loop for images loaded from the local blog (if comment sidebar plugin was enabled) * Height setting for image was called "heigth".. :-/ - + * Gravarar caching didn't work reliable, if a default avatar was given. @@ -333,7 +339,7 @@ Version 1.8 (brockhaus): Version 1.7 (brockhaus): * Added support for Pavatars (www.pavatar.com) - + * Added support for MyBlogLog Avatars (www.mybloglog.com) * The order for trying avatar methods and what kind of avatars are @@ -345,22 +351,22 @@ Version 1.7 (brockhaus): is defined. (We want less dataprofiles..) * Fetch default avatar via mediadatabase in the configuration. - + * Image size is assured now in HTML code. - + * Below the comment only actual configured avatar methods are shown as supported. ------------------------------------------------------------------------ -Version 1.6 (garvinhickins): +Version 1.6 (garvinhickins): ------------------------------------------------------------------------ -Version 1.5 (garvinhickins): +Version 1.5 (garvinhickins): ------------------------------------------------------------------------ -Version 1.4 (garvinhickins): +Version 1.4 (garvinhickins): ------------------------------------------------------------------------ -Version 1.3 (garvinhickins): +Version 1.3 (garvinhickins): * Fix errors on invalid domains diff --git a/plugins/serendipity_event_gravatar/UTF-8/documentation_cs.html b/plugins/serendipity_event_gravatar/UTF-8/documentation_cs.html deleted file mode 100644 index de89b5ab..00000000 --- a/plugins/serendipity_event_gravatar/UTF-8/documentation_cs.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - Dokumentace: Avatar Plugin - - - - -

          Dokumentace k pluginu 'Gravatar'

          - -

          Dokumentaci k tomuto pluginu pÅ™eložil do ÄeÅ¡tiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 26.6.2011. Od té doby mohl být plugin pozmÄ›nÄ›n nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i aktuální nÄ›meckou dokumentaci, anglickou dokumentaci a ChangeLog. - -

          - - - -

          Přehled

          -

          Pomocí pluginu Avatar lze pÅ™iÅ™adit komentujícím v blogu pÅ™iÅ™adit "obliÄej". Každému samostatnému komentátorovi lze pÅ™iÅ™adit takzvaný Avatar, který ho reprezentuje. K tomu lze použít nÄ›kolik různých mechanizmů, jak umožnit komentujícím použití avatara, které budou v následujícím textu probrány. -

          -

          Vždy je použit první mechanizmus, který nalezne avatara. Další způsoby pak nejsou ani zkouÅ¡eny. To znamená, že je tÅ™eba seÅ™adit metody v tom poÅ™adí, aby byly co nejdříve použity nejÄastÄ›ji používané mechanizmy. Způsoby, které poskytnou avatara v každém případÄ›, by mÄ›ly být umístÄ›ny až na konci, protože po nich zaÅ™azené metody nebudou pÅ™irozenÄ› nikdy uplatnÄ›ny. -

          -

          Důležité: Tento plugin musí být umístěn v seznamu pluginů před všemi pluginy, které mění odkazy, jako například "Markup: Sledování odchodů" (Exit Tracking Plugin). Jinak nemusejí fungovat například avatary, které jsou generovány na základě odkazů na stránky komentátorů. -

          -

          Následuje popis aktuálně dostupných mechanizmů, jak přiřadit avatara komentátorům:

          -

          nahoru

          - - -

          Gravatar

          -

          Gravatar je jedna z nejznámějších služeb pro uživatele avatarů. Uživatele se mohou u této služby registrovat pomocí emailu, na který je vázán obrázek avatara.

          -

          Gravatary jsou tedy spřažené s emailem komentátora. Pouze pokud komentátor zadá svůj mail, je možné dotázat se Gravataru, jestli je pro daný mail registrován obrázek avatara.

          -

          nahoru

          - - -

          Pavatar

          -

          Pavatary jsou avatary (obrázky), které pro tento úÄel nahrál uživatel na svoji domovskou stránku.

          -

          Oproti velmi podobným Favatarům sem může uživatel nahrát obrázek avatara v libovolném rozlišení.

          -

          V tomto případě se zjišťuje avatar na základě domovské stránky, kterou zadal komentátor, konkrétně jestli tato domovská stránka obsahuje Pavatara. Tento způsob zjišťování avatara je použit přirozeně pouze v případě, že komentátor zadal domovksou webovou stránku.

          -

          nahoru

          - - -

          Favatar

          -

          Toto je koncept, pomocí kterého má spousta vlastníků webových stránek Avatara, aniž pro to musejí cokoliv udělat:

          -

          Blog použije jednoduÅ¡e favicon (ikonku webu) ze stránky, kterou komentátor zadal jako svoji domovskou. -Favicon je obvykle jenom obyÄejná ikona, která bývá docela malá a Äasto nevypadá jako avatar. -

          -

          nahoru

          - - -

          Twitter

          -

          V případě, že komentátor zadá adresu domovské stránky jako URL profilu na Twitteru, pak bude tento profil prohledán, jestli obsahuje profilovou fotku, která bude následně použita jako avatar.

          -

          Poznámka: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Twitter pÅ™ed Favatarem, protože jinak bude místo obrázku z profilu použita favicona Twitteru. Což může být na druhou stranu použito úmyslnÄ›, například k jasnému a jednoznaÄnému oznaÄení "tweetbacků" z Twitteru. -

          -

          nahoru

          - - -

          Identica

          -

          Toto je zvláštní avatar pro pingbacky Identica. V tomto případě je hledán profilový obrázek uživatele, který poslal pingback.

          -

          Poznámka: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Identica pÅ™ed Favatarem, protože jinak bude místo obrázku z profilu použita favicona Identicy. Což může být na druhou stranu použito úmyslnÄ›, například k jasnému a jednoznaÄnému oznaÄení "tweetbacků" z Identicy. -

          -

          nahoru

          - - -

          MyBlogLog

          -

          Toto je opět centrální služba (podobně jako Gravatar). MyBlogLog je služba poskytující blogy, ale zároveň z ní lze získat avatary.

          -

          Přítomnost MyBlogLog avatarů je zjištěna z domovské adresy komentátorů. -

          nahoru

          - - -

          Wavatar

          -

          Wavatar je dynamicky vyroben z domovské stránky a emailové adresy komentátorů. Poskytuje pro každého uživatele jiný, ale vždy stejný obrázek. Tímto způsobem je vždycky vložen avatar, tedy všechny metody zařazené po této budou ignorovány. Wavatary vypadají asi následovně:

          -

          -

          nahoru

          - - -

          MonsterID

          -

          MonsterID avatary jsou generovány stejným mechanizmem jako Wavatary nebo Idnetikony. V tomto případě jsou vygenerovány takovéto roztomilé "příšerky" (monstra).

          -

          Podobně jako u Wavataru a Identikon je tímto způsobem vždycky vložen avatar, tedy všechny metody zařazené po této budou ignorovány. -

          -

          nahoru

          - - -

          Identicon/YCon

          -

          -Avatary Identicon (identikony) jsou generovány stejným mechanizmem jako Wavatary nebo MonsterID. V tomto případě jsou vygenerovány abstraktní obrazce.

          -

          Podobně jako u Wavataru a MonsterID je tímto způsobem vždycky vložen avatar, tedy všechny metody zařazené po této budou ignorovány.

          -

          -

          nahoru

          - - -

          Standardavatar

          -

          Metoda "Standardavatar" poskytuje vždycky stejný obrázek pro všechny uživatele. Obrázek, který bude použit, lze zadat v sekci "Nastavení".

          -

          nahoru

          - - -

          Nastavení

          - - -

          Pořadí vložení Avatarů

          -

          Zde je zadáno pořadí zkoušení jednotlivých metod pro zjištšění avatarů ke komentátorům.

          -

          V souÄasnosti existuje 6 metod, ze kterých je možné poÅ™adí sestavit. Je tÅ™eba dát pozor na to, že metody, které generují avatara pokaždé, jsou poslední, které jsou vyzkouÅ¡eny, vÅ¡echny následující metody jsou ignorovány.

          -

          nahoru

          - - -

          Standard-Avatar

          -

          URL adresa ke standardnímu avataru. Tady musíte zadat relativní nebo absolutní URL adresu k obrázku standardního avataru.

          -

          nahoru

          - - -

          Zobrazovat v postranním panelu

          -

          Mají se obrázky avatarů zobrazovat i v postranním panelu (poslední komentáře)?

          -

          nahoru

          - - -

          Zobrazovat podporované typy avatarů

          -

          Pokud je zaÅ¡krtnuto, pak se pod políÄkem k vložení komentáře objeví řádek s výÄtem podporovaných avatarů.

          -

          nahoru

          - - -

          Jméno autora v atributu ALT

          -

          NormálnÄ› je umístÄ›ho jméno autora v atributu TITLE u obrázku, atribut ALT je pak vyplnÄ›n hvÄ›zdiÄkou "*", aby se v rozvržení stránky nic nerozházelo, pokud nejsou nataženy obrázky. NicménÄ› z hlediska přístupnosti stránky i pro slepé Ätenáře je důležité, aby v atributu ALT nÄ›co bylo, protože je to právÄ› tento atribut, který jim je pÅ™edÄítán a podle kterého poznají, co je na obrázku. Pokud tedy chcete podporovat i tyto postižené Ätenáře, mÄ›li byste tuto volbu povolit.

          -

          nahoru

          - - -

          Generovat Smarty Tag

          -

          Pokud je zaškrtnuta tato volby, není obrázek avatara vložen přímo do komentáře, ale místo toho je generován Smarty Tag {$comment.avatar}, který při generování stránky obsahuje HTML kód pro zobrazení obrázku. Tuto volbu byste měli zapnout pouze pokud víte, že šablona vzhledu, kterou požíváte, podporuje tento tag. Jestli tomu tak opravdu je, můžete jednoduše vyzkoušet.

          -

          nahoru

          - - -

          Zarovnání

          -

          Pomocí této volby můžete zadat zarovnání avatara vzhledem ke komentáři, tedy pokud nepoužítáve volbu Smarty Tag. V případě, že Smarty Tag používáte, pak musíte k zarovnání obrázku použít odpovídající CSS třídu ve stylopisu.

          -

          nahoru

          - - -

          Velikost obrázku

          -

          Maximální zobrazená velikost avataru v pixelech.

          -

          nahoru

          - - -

          Doba cachování

          -

          Když mají být avatary doÄasnÄ› ukládány (doporuÄeno!), musí být zde uveden poÄet hodin, bÄ›hem kterých se mají obrázky natahovat z blogového serveru, namísto serveru vzdáleneé avatarové služby. Sice to způsobí lehké zvýšení provozu na vaÅ¡em blogovém serveru, na druhou stranu se stanou obrázky víceménÄ› nezávislé na přístupnosti serveru externích služeb. "0" znamená vypnutí cachování.

          -

          nahoru

          - - -

          Indikace Gravataru

          -

          Dětská pojistka :)

          -

          nahoru

          - - -

          Gravatar Fallback (zpracování chyby)

          -

          Metoda Gravatar umožňuje chybovou metodu pro případ, kdy pro uživatele není nalezen žádný avatar. Tou může být jedna z Monster ID, Identicon nebo Wavatar. Pokud nastavíte tuto chybovou metodu pro Gravatara, nebudou zkoušeny žádné další metody pro zjištění avatara, pokud uživatel zadal emailovou adresu.

          -

          nahoru

          - - -

          Vždy vyžadovat Gravatar Fallback

          -

          Vyžadovat zpracování chyby Gravatar (Gravatar Fallback) také pokud uživatel nezadal žádný email (ale pokud zadal URL adresu domovské stránky nebo jméno).

          -

          nahoru

          - - -

          Historie verzí (ChangeLog)

          - -
            -
          • verze 1.54
          • -
              -
            • Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl pÅ™idán parametr %s pro zobrazení podporovaných avatarových služeb.
            • -
            -
          • verze 1.52
          • -
              -
            • ZmÄ›nÄ›no zobrazení podporovaných avatarů pod polem pro komentář, aby podporovalo hezké zalamování řádků.
            • -
            -
          • verze 1.51
          • -
              -
            • Použití funkce strtolower() pro mailové adresy.
            • -
            -
          • verze 1.49 [brockhaus]
          • -
              -
            • Pavatar v blozích s pÅ™esmÄ›rováním nefungoval, pokud byl odkaz na Pavatar přístupný pouze v informacích tagu "rel link"
            • -
            -
          • verze 1.48 [brockhaus]
          • -
              -
            • Oprava: Kompatibilita PHP byla poruÅ¡ena pÅ™i opravÄ› 1.46 :-/
            • -
            • PÅ™idán avatar Identica. Použito hlavnÄ› pro pingbacky Indetica a mÄ›lo by být použito pÅ™ed Favatarem, jinak se bude zobrazovat znaÄka Identica místo obrázku uživatele.
            • -
            • VyÄiÅ¡tÄ›ní kódu
            • -
            -
          • verze 1.47 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisů v template_c
            • -
            -
          • verze 1.46 [brockhaus]
          • -
              -
            • PÅ™idán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je vÄ›tÅ¡inou použito pro Tweetbacky a mÄ›lo by být použito pÅ™ed Favatarem, jinak se bude zobrazovat logo Twitteru.
            • -
            • VyÄiÅ¡tÄ›ní kódu
            • -
            -
          • verze 1.45 [brockhaus]
          • -
              -
            • NápovÄ›da
            • -
            • VyÄiÅ¡tÄ›ní
            • -
            -
          • verze 1.44 [brockhaus]
          • -
              -
            • PÅ™idána podpora Wavatarů
            • -
            • Podpora pro oÅ¡etÅ™ení chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.
            • -
            • Optimalizace zpÄ›tných volání (trackback) avatarů: Querypars budou odstÅ™iženy z URL. Nyní v ukázkovém Serendipity blogu dostanete vždycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.
            • -
            -
          • verze 1.43 [brockhaus]
          • -
              -
            • Volba nastavení pro pÅ™idání jména autora do attributu ALT u obrázku avatara. NormálnÄ› je to vyplnÄ›no hvÄ›zdiÄkou "*", ale slepci jsou pÅ™i prohlížení stránek závislí na tagu ALT, který jim ÄteÄky pÅ™edÄítají, aby se dozvÄ›dÄ›li, co je obsahem obrázku.
            • -
            -
          • verze 1.42 [brockhaus]
          • -
              -
            • Kódování podtržítka "_" v URL adresách uživatelů, aby se odliÅ¡ily od oddÄ›lovaÄů. Funkce "urlencode" je nekóduje. Díky uživateli [Tino Schwarze] za objevení a opravu.
            • -
            -
          • verze 1.41 [garvinhicking]
          • -
              -
            • Opravena hlaviÄka "Last-Modified" u obrázků avatarů.
            • -
            -
          • verze 1.40
          • - -
          • verze 1.39 [brockhaus]
          • -
              -
            • Avatary Monster ID je nyní také cachován, protože jejich vytváření trvá dlouho.
            • -
            -
          • verze 1.38 [brockhaus]
          • -
              -
            • Podpora Monster ID avatarů (podrobnosti naleznete na http://www.splitbrain.org/go/monsterid)
            • -
            • Selhání pÅ™i Äerstvé instalaci a Äasu cache nastaveném na 0.
            • -
            • Podpora nastavení absolutní cesty k standardnímu avataru.
            • -
            • Po uložení nastavení je nyní cache vždy vyÄiÅ¡tÄ›na, aby byly zmÄ›ny viditelné ihned, dokonce i když je cachování zapnuto.
            • -
            • Pokud plugin nemůže zapisovat do cache, pak to v ladicím módu zapíše do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.
            • -
            -
          • verze 1.37 [brockhaus]
          • -
              -
            • Řádka pod oknem komentáře informující o podporovaných typech avatarů lze skrýt pomocí nastavení.
            • -
            -
          • verze 1.36 [brockhaus]
          • -
              -
            • PÅ™idána nová volba: Můžete nastavit, že plugin nebude vytvářet avatary přímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, můžete si definovat v Å¡ablonÄ› pro komentáře, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.
            • -
            • CSS třída avataru se bude mÄ›nit podle toho, kde je zobrazen. Pro normální komentáře bude mít třídu "comment_avatar", pro plugin "nejnovÄ›jší příspÄ›vky" to bude třída "serendipity_plugin_comments_avatar", aby byla možnost jednoduÅ¡e je oznaÄit, ostylovat.
            • -
            • Nastavení zarovnání avatarů: Nastavení zarovnání bude použito, pokud je avatar vykreslen přímo (ne pomocí smarty).
            • -
            • Nová volba pro vypínání/zapínání obrázků avatarů v postranním sloupci (nejnovÄ›jší komentáře).
            • -
            • Podporovaní metody avatarů se zobrazovaly i pod kontaktním formulářem, což ale nemÄ›lo logický smysl. V tomto fromuláři byly tedy avatary vypnuty.
            • -
            • Další zmÄ›ny v jazykových souborech.
            • -
            -
          • verze 1.35 [brockhaus]
          • -
              -
            • Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)
            • -
            -
          • verze 1.34 [brockhaus]
          • -
              -
            • Hodnocení Gravatarů nepracuje spolehlivÄ›. Můj Gravatar hodnocený jako G je zobrazen pouze pÅ™i použití hodnocení gravatarů X. :-/
              - Přidána volba pro vypnutí parametru hodnocení Gravatarů, což by mělo mít stejný efekt jako nastavení hodnocení X.
            • -
            -
          • verze 1.33 [brockhaus]
          • -
              -
            • Pavatar: X-Pavatar Header je nyní znovu podporován a je první použitou metodou automatické detekce Pavatara.
            • -
            -
          • verze 1.32 [brockhaus]
          • -
              -
            • Výchozí avatar MyBlogLog nebyl správnÄ› detekování. :-/
            • -
            • Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právÄ› výchozí avatar.
            • -
            -
          • verze 1.31 [brockhaus]
          • -
              -
            • ZmÄ›na Äasu volání (call-time) chyby (pass-by-reference) (fetchAvatar).
            • -
            -
          • verze 1.30 [brockhaus]
          • -
              -
            • Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáři webu a ne přímo v koÅ™enové složce.
            • -
            • Odkaz na Gravatara byl trochu Å¡patnÄ› (pÅ™esto fungoval).
            • -
            -
          • verze 1.29 [brockhaus]
          • -
              -
            • Oprava chyby 1.27 pÅ™idávala k URL "http://", i když nebyla zadána vůbec žádná URL adresa.
            • -
            -
          • verze 1.28 [brockhaus]
          • -
              -
            • V Serendipity 1.1 nebylo možné natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.
            • -
            -
          • verze 1.27 [brockhaus]
          • -
              -
            • Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl naÄten správnÄ›.
            • -
            -
          • verze 1.26 [brockhaus]
          • -
              -
            • MyBlogLog trochu pozmÄ›nil způsob volání avatara, což mÄ›lo za následek, že oÅ¡etÅ™ení chybových výstupů (fallback) pro MyBlogLog pÅ™estal fungovat.
            • -
            -
          • verze 1.25 [garvinhicking]
          • -
              -
            • Zarovnání (algin) nahraceno definicí pomocí CSS stylů, takže XHTML už neobsahuje žádné definice zarovnání.
            • -
            -
          • verze 1.24 [brockhaus]
          • -
              -
            • Kontrola odpovÄ›di MyBlogLog, jestli obsahuje opravdu obrázek.
            • -
            • VyÄiÅ¡tÄ›ní pamÄ›ti cache pÅ™i nastavení hodnoty cachování na 0.
            • -
            • Vypnutí ladicích výpisů.
            • -
            -
          • verze 1.23 [brockhaus]
          • -
              -
            • PÅ™i vkládání Äerstvých P/favatarů, plugin pÅ™ijme pouze odpovÄ›di oznaÄené vzdáleným serverem jako obrázky. To zamezí pÅ™ijetí potenciálních html stránek jako obrázku avatara.
            • -
            -
          • verze 1.22 [brockhaus]
          • -
              -
            • Vkládání i pÅ™esmÄ›rovaných P/Favatarů.
            • -
            -
          • verze 1.21 [brockhaus]
          • -
              -
            • Vkládání avatarů se rozbilo pÅ™i vypnutí cache.
            • -
            • ProhlížeÄ nebyl schopen cachovat výchozí avatary kvůli Å¡patnÄ› nastavenému Äasu cache.
            • -
            • Kontrola, jestli cachovaný soubor vypadá jako obrázek, pÅ™edtím, než je odeslán na klienta.
            • -
            -
          • verze 1.20 [brockhaus]
          • -
              -
            • Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)
            • -
            -
          • verze 1.19 [brockhaus]
          • -
              -
            • Využití cache prohlížeÄe má za následek dobré vylepÅ¡ení výkonu!
            • -
            -
          • verze 1.18 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisů
            • -
            -
          • verze 1.17 [brockhaus]
          • -
              -
            • Pokud je zapnuto cachování, je nyní cachováno vÅ¡echno. Známí pÅ™ispÄ›vatelé a komentátoÅ™i nyní nezpůsobí žádné volání cizích serverů, pokud už jsou jejich obrázky cachovány. Velmi pÄ›kné posílení výkonu. Díky Garvinovi za nápad.
            • -
            • Záplata proti hackování od uživatele [garvinhickins]
            • -
            -
          • verze 1.16 [garvinhicking]
          • -
              -
            • uhlazení kódu
            • -
            -
          • verze 1.14 [brockhaus]
          • -
              -
            • Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by nemÄ›l být první v poÅ™adí avatarů.
            • -
            • PÅ™idána pátá kolonka pro výbÄ›r metody avatarů, protože MyBlogLog nyní také podporuje zpracování chyb (fallback).
            • -
            -
          • verze 1.13 [brockhaus]
          • -
              -
            • DoporuÄení zmÄ›nÄ›no: Není to plugin "statistika", který znefunkÄní Pavatary/Favatary, ale plugin "sledování odchodů" (exit tracking plugin)
            • -
            -
          • verze 1.12 [brockhaus]
          • -
              -
            • MyBlogLog avatary jsou nyní také cachovány.
            • -
            • Stránky s pÅ™esmÄ›rováním na výchozí stránku, pokud nebyla nalazena výchozí položka, jsou nyní podporovány. DřívÄ›jší plugin avatar pÅ™edpokládal, že výchozí stránka ja P/Favatar.
            • -
            • Výchozí nastavení poÅ™adí avatarů je nyní: Gravatar -> Pavatar - -> Favatar -> výchozí Avatar
            • -
            • PÅ™idáno doporuÄení, že plugin by mÄ›l být zaÅ™azen pÅ™ed pluginy, které mÄ›ní odkazy.
            • -
            • NaÄítání nastavené cesty pluginu. Dříve to byl vždy adresář 'plugin'.
            • -
            • VyÅ™azeno nastavení okraje gravatara, protože už nefunguje (napořád?).
            • -
            -
          • verze 1.11 [brockhaus], testovací verze nebyla releasována do CVS/Spartacus
          • -
              -
            • Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Takže toto nastavení bylo smazáno.
            • -
            -
          • verze 1.10 [brockhaus]
          • -
              -
            • Informace o Pavatar / Avatar nebyly nikdy naÄtené z cache
            • -
            • ...ale po naÄtení z cache způsobily nekoneÄnou smyÄku pro obrázky naÄtené z lokálního blogu (pokud byl povolen postranní blugin s komentáři - comment sidebar)
            • -
            • Nastavení výšky obrázku bylo pojmenováno "height" ... :-/
            • -
            • Cachování Gravataru nefungovalo spolehlivÄ›, pokud byl nastaven výchozí avatar.
            • -
            -
          • verze 1.9 [brockhaus]
          • -
              -
            • PÅ™i hledání Pavatara byl natažen Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky uživateli [El Burro]
            • -
            -
          • verze 1.8 [brockhaus]
          • -
              -
            • Plugin nebych schopen naÄíst Favatary/Pavatary, pokud bylo pÅ™esmÄ›rování nasmÄ›rováno na URL stránky nastavené jako domovská stránka komentujícího. TÅ™eba Garvin má takový blog...
            • -
            -
          • verze 1.7 [brockhaus]
          • -
              -
            • PÅ™idána podpora Pavatarů (www.pavatar.com)
            • -
            • PÅ™idána podpora MyBlogLog avatarů (www.mybloglog.com)
            • -
            • PoÅ™adí pro výbÄ›r avatarů a jaké typy avatarů jsou podporovány, vÅ¡e je nyní nastavitelné.
            • -
            • Standardní avatar může být jeden z nich (mÄ›l by být poslední).
            • -
            • Volba pro nenastavení Gravatara jako výchozího avatara, i když je definovaný. (Chceme ménÄ› datových profilů...)
            • -
            • Vložení výchozího avatara pomocí mediatéky v nastavení pluginu.
            • -
            • Velikost obrázku je nyní zajiÅ¡tÄ›na pomocí HTML kódu.
            • -
            • Pod polem pro komentář jsou zobrazovány pouze aktuálnÄ› nastavené metody avatara jako podporované.
            • -
            -
          • verze 1.6 [garvinhickins]
          • -
          • verze 1.5 [garvinhickins]
          • -
          • verze 1.4 [garvinhickins]
          • -
          • verze 1.3 [garvinhickins]
          • -
              -
            • Opraveny chyby neplatnosti domény
            • -
            -
          -

          nahoru

          - - - diff --git a/plugins/serendipity_event_gravatar/UTF-8/documentation_cz.html b/plugins/serendipity_event_gravatar/UTF-8/documentation_cz.html deleted file mode 100644 index de89b5ab..00000000 --- a/plugins/serendipity_event_gravatar/UTF-8/documentation_cz.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - Dokumentace: Avatar Plugin - - - - -

          Dokumentace k pluginu 'Gravatar'

          - -

          Dokumentaci k tomuto pluginu pÅ™eložil do ÄeÅ¡tiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 26.6.2011. Od té doby mohl být plugin pozmÄ›nÄ›n nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i aktuální nÄ›meckou dokumentaci, anglickou dokumentaci a ChangeLog. - -

          - - - -

          Přehled

          -

          Pomocí pluginu Avatar lze pÅ™iÅ™adit komentujícím v blogu pÅ™iÅ™adit "obliÄej". Každému samostatnému komentátorovi lze pÅ™iÅ™adit takzvaný Avatar, který ho reprezentuje. K tomu lze použít nÄ›kolik různých mechanizmů, jak umožnit komentujícím použití avatara, které budou v následujícím textu probrány. -

          -

          Vždy je použit první mechanizmus, který nalezne avatara. Další způsoby pak nejsou ani zkouÅ¡eny. To znamená, že je tÅ™eba seÅ™adit metody v tom poÅ™adí, aby byly co nejdříve použity nejÄastÄ›ji používané mechanizmy. Způsoby, které poskytnou avatara v každém případÄ›, by mÄ›ly být umístÄ›ny až na konci, protože po nich zaÅ™azené metody nebudou pÅ™irozenÄ› nikdy uplatnÄ›ny. -

          -

          Důležité: Tento plugin musí být umístěn v seznamu pluginů před všemi pluginy, které mění odkazy, jako například "Markup: Sledování odchodů" (Exit Tracking Plugin). Jinak nemusejí fungovat například avatary, které jsou generovány na základě odkazů na stránky komentátorů. -

          -

          Následuje popis aktuálně dostupných mechanizmů, jak přiřadit avatara komentátorům:

          -

          nahoru

          - - -

          Gravatar

          -

          Gravatar je jedna z nejznámějších služeb pro uživatele avatarů. Uživatele se mohou u této služby registrovat pomocí emailu, na který je vázán obrázek avatara.

          -

          Gravatary jsou tedy spřažené s emailem komentátora. Pouze pokud komentátor zadá svůj mail, je možné dotázat se Gravataru, jestli je pro daný mail registrován obrázek avatara.

          -

          nahoru

          - - -

          Pavatar

          -

          Pavatary jsou avatary (obrázky), které pro tento úÄel nahrál uživatel na svoji domovskou stránku.

          -

          Oproti velmi podobným Favatarům sem může uživatel nahrát obrázek avatara v libovolném rozlišení.

          -

          V tomto případě se zjišťuje avatar na základě domovské stránky, kterou zadal komentátor, konkrétně jestli tato domovská stránka obsahuje Pavatara. Tento způsob zjišťování avatara je použit přirozeně pouze v případě, že komentátor zadal domovksou webovou stránku.

          -

          nahoru

          - - -

          Favatar

          -

          Toto je koncept, pomocí kterého má spousta vlastníků webových stránek Avatara, aniž pro to musejí cokoliv udělat:

          -

          Blog použije jednoduÅ¡e favicon (ikonku webu) ze stránky, kterou komentátor zadal jako svoji domovskou. -Favicon je obvykle jenom obyÄejná ikona, která bývá docela malá a Äasto nevypadá jako avatar. -

          -

          nahoru

          - - -

          Twitter

          -

          V případě, že komentátor zadá adresu domovské stránky jako URL profilu na Twitteru, pak bude tento profil prohledán, jestli obsahuje profilovou fotku, která bude následně použita jako avatar.

          -

          Poznámka: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Twitter pÅ™ed Favatarem, protože jinak bude místo obrázku z profilu použita favicona Twitteru. Což může být na druhou stranu použito úmyslnÄ›, například k jasnému a jednoznaÄnému oznaÄení "tweetbacků" z Twitteru. -

          -

          nahoru

          - - -

          Identica

          -

          Toto je zvláštní avatar pro pingbacky Identica. V tomto případě je hledán profilový obrázek uživatele, který poslal pingback.

          -

          Poznámka: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Identica pÅ™ed Favatarem, protože jinak bude místo obrázku z profilu použita favicona Identicy. Což může být na druhou stranu použito úmyslnÄ›, například k jasnému a jednoznaÄnému oznaÄení "tweetbacků" z Identicy. -

          -

          nahoru

          - - -

          MyBlogLog

          -

          Toto je opět centrální služba (podobně jako Gravatar). MyBlogLog je služba poskytující blogy, ale zároveň z ní lze získat avatary.

          -

          Přítomnost MyBlogLog avatarů je zjištěna z domovské adresy komentátorů. -

          nahoru

          - - -

          Wavatar

          -

          Wavatar je dynamicky vyroben z domovské stránky a emailové adresy komentátorů. Poskytuje pro každého uživatele jiný, ale vždy stejný obrázek. Tímto způsobem je vždycky vložen avatar, tedy všechny metody zařazené po této budou ignorovány. Wavatary vypadají asi následovně:

          -

          -

          nahoru

          - - -

          MonsterID

          -

          MonsterID avatary jsou generovány stejným mechanizmem jako Wavatary nebo Idnetikony. V tomto případě jsou vygenerovány takovéto roztomilé "příšerky" (monstra).

          -

          Podobně jako u Wavataru a Identikon je tímto způsobem vždycky vložen avatar, tedy všechny metody zařazené po této budou ignorovány. -

          -

          nahoru

          - - -

          Identicon/YCon

          -

          -Avatary Identicon (identikony) jsou generovány stejným mechanizmem jako Wavatary nebo MonsterID. V tomto případě jsou vygenerovány abstraktní obrazce.

          -

          Podobně jako u Wavataru a MonsterID je tímto způsobem vždycky vložen avatar, tedy všechny metody zařazené po této budou ignorovány.

          -

          -

          nahoru

          - - -

          Standardavatar

          -

          Metoda "Standardavatar" poskytuje vždycky stejný obrázek pro všechny uživatele. Obrázek, který bude použit, lze zadat v sekci "Nastavení".

          -

          nahoru

          - - -

          Nastavení

          - - -

          Pořadí vložení Avatarů

          -

          Zde je zadáno pořadí zkoušení jednotlivých metod pro zjištšění avatarů ke komentátorům.

          -

          V souÄasnosti existuje 6 metod, ze kterých je možné poÅ™adí sestavit. Je tÅ™eba dát pozor na to, že metody, které generují avatara pokaždé, jsou poslední, které jsou vyzkouÅ¡eny, vÅ¡echny následující metody jsou ignorovány.

          -

          nahoru

          - - -

          Standard-Avatar

          -

          URL adresa ke standardnímu avataru. Tady musíte zadat relativní nebo absolutní URL adresu k obrázku standardního avataru.

          -

          nahoru

          - - -

          Zobrazovat v postranním panelu

          -

          Mají se obrázky avatarů zobrazovat i v postranním panelu (poslední komentáře)?

          -

          nahoru

          - - -

          Zobrazovat podporované typy avatarů

          -

          Pokud je zaÅ¡krtnuto, pak se pod políÄkem k vložení komentáře objeví řádek s výÄtem podporovaných avatarů.

          -

          nahoru

          - - -

          Jméno autora v atributu ALT

          -

          NormálnÄ› je umístÄ›ho jméno autora v atributu TITLE u obrázku, atribut ALT je pak vyplnÄ›n hvÄ›zdiÄkou "*", aby se v rozvržení stránky nic nerozházelo, pokud nejsou nataženy obrázky. NicménÄ› z hlediska přístupnosti stránky i pro slepé Ätenáře je důležité, aby v atributu ALT nÄ›co bylo, protože je to právÄ› tento atribut, který jim je pÅ™edÄítán a podle kterého poznají, co je na obrázku. Pokud tedy chcete podporovat i tyto postižené Ätenáře, mÄ›li byste tuto volbu povolit.

          -

          nahoru

          - - -

          Generovat Smarty Tag

          -

          Pokud je zaškrtnuta tato volby, není obrázek avatara vložen přímo do komentáře, ale místo toho je generován Smarty Tag {$comment.avatar}, který při generování stránky obsahuje HTML kód pro zobrazení obrázku. Tuto volbu byste měli zapnout pouze pokud víte, že šablona vzhledu, kterou požíváte, podporuje tento tag. Jestli tomu tak opravdu je, můžete jednoduše vyzkoušet.

          -

          nahoru

          - - -

          Zarovnání

          -

          Pomocí této volby můžete zadat zarovnání avatara vzhledem ke komentáři, tedy pokud nepoužítáve volbu Smarty Tag. V případě, že Smarty Tag používáte, pak musíte k zarovnání obrázku použít odpovídající CSS třídu ve stylopisu.

          -

          nahoru

          - - -

          Velikost obrázku

          -

          Maximální zobrazená velikost avataru v pixelech.

          -

          nahoru

          - - -

          Doba cachování

          -

          Když mají být avatary doÄasnÄ› ukládány (doporuÄeno!), musí být zde uveden poÄet hodin, bÄ›hem kterých se mají obrázky natahovat z blogového serveru, namísto serveru vzdáleneé avatarové služby. Sice to způsobí lehké zvýšení provozu na vaÅ¡em blogovém serveru, na druhou stranu se stanou obrázky víceménÄ› nezávislé na přístupnosti serveru externích služeb. "0" znamená vypnutí cachování.

          -

          nahoru

          - - -

          Indikace Gravataru

          -

          Dětská pojistka :)

          -

          nahoru

          - - -

          Gravatar Fallback (zpracování chyby)

          -

          Metoda Gravatar umožňuje chybovou metodu pro případ, kdy pro uživatele není nalezen žádný avatar. Tou může být jedna z Monster ID, Identicon nebo Wavatar. Pokud nastavíte tuto chybovou metodu pro Gravatara, nebudou zkoušeny žádné další metody pro zjištění avatara, pokud uživatel zadal emailovou adresu.

          -

          nahoru

          - - -

          Vždy vyžadovat Gravatar Fallback

          -

          Vyžadovat zpracování chyby Gravatar (Gravatar Fallback) také pokud uživatel nezadal žádný email (ale pokud zadal URL adresu domovské stránky nebo jméno).

          -

          nahoru

          - - -

          Historie verzí (ChangeLog)

          - -
            -
          • verze 1.54
          • -
              -
            • Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl pÅ™idán parametr %s pro zobrazení podporovaných avatarových služeb.
            • -
            -
          • verze 1.52
          • -
              -
            • ZmÄ›nÄ›no zobrazení podporovaných avatarů pod polem pro komentář, aby podporovalo hezké zalamování řádků.
            • -
            -
          • verze 1.51
          • -
              -
            • Použití funkce strtolower() pro mailové adresy.
            • -
            -
          • verze 1.49 [brockhaus]
          • -
              -
            • Pavatar v blozích s pÅ™esmÄ›rováním nefungoval, pokud byl odkaz na Pavatar přístupný pouze v informacích tagu "rel link"
            • -
            -
          • verze 1.48 [brockhaus]
          • -
              -
            • Oprava: Kompatibilita PHP byla poruÅ¡ena pÅ™i opravÄ› 1.46 :-/
            • -
            • PÅ™idán avatar Identica. Použito hlavnÄ› pro pingbacky Indetica a mÄ›lo by být použito pÅ™ed Favatarem, jinak se bude zobrazovat znaÄka Identica místo obrázku uživatele.
            • -
            • VyÄiÅ¡tÄ›ní kódu
            • -
            -
          • verze 1.47 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisů v template_c
            • -
            -
          • verze 1.46 [brockhaus]
          • -
              -
            • PÅ™idán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je vÄ›tÅ¡inou použito pro Tweetbacky a mÄ›lo by být použito pÅ™ed Favatarem, jinak se bude zobrazovat logo Twitteru.
            • -
            • VyÄiÅ¡tÄ›ní kódu
            • -
            -
          • verze 1.45 [brockhaus]
          • -
              -
            • NápovÄ›da
            • -
            • VyÄiÅ¡tÄ›ní
            • -
            -
          • verze 1.44 [brockhaus]
          • -
              -
            • PÅ™idána podpora Wavatarů
            • -
            • Podpora pro oÅ¡etÅ™ení chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.
            • -
            • Optimalizace zpÄ›tných volání (trackback) avatarů: Querypars budou odstÅ™iženy z URL. Nyní v ukázkovém Serendipity blogu dostanete vždycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.
            • -
            -
          • verze 1.43 [brockhaus]
          • -
              -
            • Volba nastavení pro pÅ™idání jména autora do attributu ALT u obrázku avatara. NormálnÄ› je to vyplnÄ›no hvÄ›zdiÄkou "*", ale slepci jsou pÅ™i prohlížení stránek závislí na tagu ALT, který jim ÄteÄky pÅ™edÄítají, aby se dozvÄ›dÄ›li, co je obsahem obrázku.
            • -
            -
          • verze 1.42 [brockhaus]
          • -
              -
            • Kódování podtržítka "_" v URL adresách uživatelů, aby se odliÅ¡ily od oddÄ›lovaÄů. Funkce "urlencode" je nekóduje. Díky uživateli [Tino Schwarze] za objevení a opravu.
            • -
            -
          • verze 1.41 [garvinhicking]
          • -
              -
            • Opravena hlaviÄka "Last-Modified" u obrázků avatarů.
            • -
            -
          • verze 1.40
          • - -
          • verze 1.39 [brockhaus]
          • -
              -
            • Avatary Monster ID je nyní také cachován, protože jejich vytváření trvá dlouho.
            • -
            -
          • verze 1.38 [brockhaus]
          • -
              -
            • Podpora Monster ID avatarů (podrobnosti naleznete na http://www.splitbrain.org/go/monsterid)
            • -
            • Selhání pÅ™i Äerstvé instalaci a Äasu cache nastaveném na 0.
            • -
            • Podpora nastavení absolutní cesty k standardnímu avataru.
            • -
            • Po uložení nastavení je nyní cache vždy vyÄiÅ¡tÄ›na, aby byly zmÄ›ny viditelné ihned, dokonce i když je cachování zapnuto.
            • -
            • Pokud plugin nemůže zapisovat do cache, pak to v ladicím módu zapíše do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.
            • -
            -
          • verze 1.37 [brockhaus]
          • -
              -
            • Řádka pod oknem komentáře informující o podporovaných typech avatarů lze skrýt pomocí nastavení.
            • -
            -
          • verze 1.36 [brockhaus]
          • -
              -
            • PÅ™idána nová volba: Můžete nastavit, že plugin nebude vytvářet avatary přímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, můžete si definovat v Å¡ablonÄ› pro komentáře, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.
            • -
            • CSS třída avataru se bude mÄ›nit podle toho, kde je zobrazen. Pro normální komentáře bude mít třídu "comment_avatar", pro plugin "nejnovÄ›jší příspÄ›vky" to bude třída "serendipity_plugin_comments_avatar", aby byla možnost jednoduÅ¡e je oznaÄit, ostylovat.
            • -
            • Nastavení zarovnání avatarů: Nastavení zarovnání bude použito, pokud je avatar vykreslen přímo (ne pomocí smarty).
            • -
            • Nová volba pro vypínání/zapínání obrázků avatarů v postranním sloupci (nejnovÄ›jší komentáře).
            • -
            • Podporovaní metody avatarů se zobrazovaly i pod kontaktním formulářem, což ale nemÄ›lo logický smysl. V tomto fromuláři byly tedy avatary vypnuty.
            • -
            • Další zmÄ›ny v jazykových souborech.
            • -
            -
          • verze 1.35 [brockhaus]
          • -
              -
            • Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)
            • -
            -
          • verze 1.34 [brockhaus]
          • -
              -
            • Hodnocení Gravatarů nepracuje spolehlivÄ›. Můj Gravatar hodnocený jako G je zobrazen pouze pÅ™i použití hodnocení gravatarů X. :-/
              - Přidána volba pro vypnutí parametru hodnocení Gravatarů, což by mělo mít stejný efekt jako nastavení hodnocení X.
            • -
            -
          • verze 1.33 [brockhaus]
          • -
              -
            • Pavatar: X-Pavatar Header je nyní znovu podporován a je první použitou metodou automatické detekce Pavatara.
            • -
            -
          • verze 1.32 [brockhaus]
          • -
              -
            • Výchozí avatar MyBlogLog nebyl správnÄ› detekování. :-/
            • -
            • Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právÄ› výchozí avatar.
            • -
            -
          • verze 1.31 [brockhaus]
          • -
              -
            • ZmÄ›na Äasu volání (call-time) chyby (pass-by-reference) (fetchAvatar).
            • -
            -
          • verze 1.30 [brockhaus]
          • -
              -
            • Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáři webu a ne přímo v koÅ™enové složce.
            • -
            • Odkaz na Gravatara byl trochu Å¡patnÄ› (pÅ™esto fungoval).
            • -
            -
          • verze 1.29 [brockhaus]
          • -
              -
            • Oprava chyby 1.27 pÅ™idávala k URL "http://", i když nebyla zadána vůbec žádná URL adresa.
            • -
            -
          • verze 1.28 [brockhaus]
          • -
              -
            • V Serendipity 1.1 nebylo možné natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.
            • -
            -
          • verze 1.27 [brockhaus]
          • -
              -
            • Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl naÄten správnÄ›.
            • -
            -
          • verze 1.26 [brockhaus]
          • -
              -
            • MyBlogLog trochu pozmÄ›nil způsob volání avatara, což mÄ›lo za následek, že oÅ¡etÅ™ení chybových výstupů (fallback) pro MyBlogLog pÅ™estal fungovat.
            • -
            -
          • verze 1.25 [garvinhicking]
          • -
              -
            • Zarovnání (algin) nahraceno definicí pomocí CSS stylů, takže XHTML už neobsahuje žádné definice zarovnání.
            • -
            -
          • verze 1.24 [brockhaus]
          • -
              -
            • Kontrola odpovÄ›di MyBlogLog, jestli obsahuje opravdu obrázek.
            • -
            • VyÄiÅ¡tÄ›ní pamÄ›ti cache pÅ™i nastavení hodnoty cachování na 0.
            • -
            • Vypnutí ladicích výpisů.
            • -
            -
          • verze 1.23 [brockhaus]
          • -
              -
            • PÅ™i vkládání Äerstvých P/favatarů, plugin pÅ™ijme pouze odpovÄ›di oznaÄené vzdáleným serverem jako obrázky. To zamezí pÅ™ijetí potenciálních html stránek jako obrázku avatara.
            • -
            -
          • verze 1.22 [brockhaus]
          • -
              -
            • Vkládání i pÅ™esmÄ›rovaných P/Favatarů.
            • -
            -
          • verze 1.21 [brockhaus]
          • -
              -
            • Vkládání avatarů se rozbilo pÅ™i vypnutí cache.
            • -
            • ProhlížeÄ nebyl schopen cachovat výchozí avatary kvůli Å¡patnÄ› nastavenému Äasu cache.
            • -
            • Kontrola, jestli cachovaný soubor vypadá jako obrázek, pÅ™edtím, než je odeslán na klienta.
            • -
            -
          • verze 1.20 [brockhaus]
          • -
              -
            • Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)
            • -
            -
          • verze 1.19 [brockhaus]
          • -
              -
            • Využití cache prohlížeÄe má za následek dobré vylepÅ¡ení výkonu!
            • -
            -
          • verze 1.18 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisů
            • -
            -
          • verze 1.17 [brockhaus]
          • -
              -
            • Pokud je zapnuto cachování, je nyní cachováno vÅ¡echno. Známí pÅ™ispÄ›vatelé a komentátoÅ™i nyní nezpůsobí žádné volání cizích serverů, pokud už jsou jejich obrázky cachovány. Velmi pÄ›kné posílení výkonu. Díky Garvinovi za nápad.
            • -
            • Záplata proti hackování od uživatele [garvinhickins]
            • -
            -
          • verze 1.16 [garvinhicking]
          • -
              -
            • uhlazení kódu
            • -
            -
          • verze 1.14 [brockhaus]
          • -
              -
            • Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by nemÄ›l být první v poÅ™adí avatarů.
            • -
            • PÅ™idána pátá kolonka pro výbÄ›r metody avatarů, protože MyBlogLog nyní také podporuje zpracování chyb (fallback).
            • -
            -
          • verze 1.13 [brockhaus]
          • -
              -
            • DoporuÄení zmÄ›nÄ›no: Není to plugin "statistika", který znefunkÄní Pavatary/Favatary, ale plugin "sledování odchodů" (exit tracking plugin)
            • -
            -
          • verze 1.12 [brockhaus]
          • -
              -
            • MyBlogLog avatary jsou nyní také cachovány.
            • -
            • Stránky s pÅ™esmÄ›rováním na výchozí stránku, pokud nebyla nalazena výchozí položka, jsou nyní podporovány. DřívÄ›jší plugin avatar pÅ™edpokládal, že výchozí stránka ja P/Favatar.
            • -
            • Výchozí nastavení poÅ™adí avatarů je nyní: Gravatar -> Pavatar - -> Favatar -> výchozí Avatar
            • -
            • PÅ™idáno doporuÄení, že plugin by mÄ›l být zaÅ™azen pÅ™ed pluginy, které mÄ›ní odkazy.
            • -
            • NaÄítání nastavené cesty pluginu. Dříve to byl vždy adresář 'plugin'.
            • -
            • VyÅ™azeno nastavení okraje gravatara, protože už nefunguje (napořád?).
            • -
            -
          • verze 1.11 [brockhaus], testovací verze nebyla releasována do CVS/Spartacus
          • -
              -
            • Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Takže toto nastavení bylo smazáno.
            • -
            -
          • verze 1.10 [brockhaus]
          • -
              -
            • Informace o Pavatar / Avatar nebyly nikdy naÄtené z cache
            • -
            • ...ale po naÄtení z cache způsobily nekoneÄnou smyÄku pro obrázky naÄtené z lokálního blogu (pokud byl povolen postranní blugin s komentáři - comment sidebar)
            • -
            • Nastavení výšky obrázku bylo pojmenováno "height" ... :-/
            • -
            • Cachování Gravataru nefungovalo spolehlivÄ›, pokud byl nastaven výchozí avatar.
            • -
            -
          • verze 1.9 [brockhaus]
          • -
              -
            • PÅ™i hledání Pavatara byl natažen Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky uživateli [El Burro]
            • -
            -
          • verze 1.8 [brockhaus]
          • -
              -
            • Plugin nebych schopen naÄíst Favatary/Pavatary, pokud bylo pÅ™esmÄ›rování nasmÄ›rováno na URL stránky nastavené jako domovská stránka komentujícího. TÅ™eba Garvin má takový blog...
            • -
            -
          • verze 1.7 [brockhaus]
          • -
              -
            • PÅ™idána podpora Pavatarů (www.pavatar.com)
            • -
            • PÅ™idána podpora MyBlogLog avatarů (www.mybloglog.com)
            • -
            • PoÅ™adí pro výbÄ›r avatarů a jaké typy avatarů jsou podporovány, vÅ¡e je nyní nastavitelné.
            • -
            • Standardní avatar může být jeden z nich (mÄ›l by být poslední).
            • -
            • Volba pro nenastavení Gravatara jako výchozího avatara, i když je definovaný. (Chceme ménÄ› datových profilů...)
            • -
            • Vložení výchozího avatara pomocí mediatéky v nastavení pluginu.
            • -
            • Velikost obrázku je nyní zajiÅ¡tÄ›na pomocí HTML kódu.
            • -
            • Pod polem pro komentář jsou zobrazovány pouze aktuálnÄ› nastavené metody avatara jako podporované.
            • -
            -
          • verze 1.6 [garvinhickins]
          • -
          • verze 1.5 [garvinhickins]
          • -
          • verze 1.4 [garvinhickins]
          • -
          • verze 1.3 [garvinhickins]
          • -
              -
            • Opraveny chyby neplatnosti domény
            • -
            -
          -

          nahoru

          - - - diff --git a/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php index f2690be6..e31d5f09 100644 --- a/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar má implementovaných nÄ›kolik návratových metod pro případ, že pro požadovaného uživatele není znám žádný avatar. Implementovány jsou též Moster ID, Identicon a Wavatar. Pokud vyberete nÄ›který z tÄ›chto zínÄ›ných, nebudou uskuteÄňovány žádné další pokusy o naÄtení avataru, pokud uživatel zadá email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'Vždy návratová hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případÄ›, že uživatel nezadá email (zadá tedy url nebo jméno)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případÄ›, že uživatel nezadá email (zadá tedy url nebo jméno)'); + diff --git a/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php index f2690be6..e31d5f09 100644 --- a/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar má implementovaných nÄ›kolik návratových metod pro případ, že pro požadovaného uživatele není znám žádný avatar. Implementovány jsou též Moster ID, Identicon a Wavatar. Pokud vyberete nÄ›který z tÄ›chto zínÄ›ných, nebudou uskuteÄňovány žádné další pokusy o naÄtení avataru, pokud uživatel zadá email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'Vždy návratová hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případÄ›, že uživatel nezadá email (zadá tedy url nebo jméno)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případÄ›, že uživatel nezadá email (zadá tedy url nebo jméno)'); + diff --git a/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php b/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php index 83d2bd2e..53708b1a 100644 --- a/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -Monster ID avatars are localy created monster images unique for each writer.'); @define('PLUGIN_EVENT_GRAVATAR_EXTLING_WARNING', 'CAUTION! This plugin has to be executed before any plugin changing links (like i.e. the exit tracking plugin)! ' . 'Else Pavatars, Favatars and MayBlogLog avatars won\'t work!'); + diff --git a/plugins/serendipity_event_gravatar/documentation/documentation.css b/plugins/serendipity_event_gravatar/documentation/documentation.css index 8e08128d..344109bb 100644 --- a/plugins/serendipity_event_gravatar/documentation/documentation.css +++ b/plugins/serendipity_event_gravatar/documentation/documentation.css @@ -1,11 +1,12 @@ body { - font-family: Arial, sans-serif!important; - margin: 20; + font-family: Arial, sans-serif!important; + margin: 20; } #title { - background: #cfcfcf; + background: #cfcfcf; margin: 0; -}#content { - background: #efefef; +} +#content { + background: #efefef; margin: 0; -} \ No newline at end of file +} diff --git a/plugins/serendipity_event_gravatar/documentation_cs.html b/plugins/serendipity_event_gravatar/documentation_cs.html index b07b967c..8ebae732 100644 --- a/plugins/serendipity_event_gravatar/documentation_cs.html +++ b/plugins/serendipity_event_gravatar/documentation_cs.html @@ -49,7 +49,7 @@
        • Vždy vyžadovat Gravatar Fallback
        • -
        • ChangeLog (historie verzí)
        • +
        • ChangeLog (historie verzí)
        • @@ -200,232 +200,232 @@ Avatary Identicon (identikony) jsou generov
          • verze 1.54
          • -
              -
            • Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl pøidán parametr %s pro zobrazení podporovaných avatarových služeb.
            • -
            +
              +
            • Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl pøidán parametr %s pro zobrazení podporovaných avatarových služeb.
            • +
          • verze 1.52
          • -
              -
            • Zmìnìno zobrazení podporovaných avatarù pod polem pro komentáø, aby podporovalo hezké zalamování øádkù.
            • -
            +
              +
            • Zmìnìno zobrazení podporovaných avatarù pod polem pro komentáø, aby podporovalo hezké zalamování øádkù.
            • +
          • verze 1.51
          • -
              -
            • Použití funkce strtolower() pro mailové adresy.
            • -
            +
              +
            • Použití funkce strtolower() pro mailové adresy.
            • +
          • verze 1.49 [brockhaus]
          • -
              -
            • Pavatar v blozích s pøesmìrováním nefungoval, pokud byl odkaz na Pavatar pøístupný pouze v informacích tagu "rel link"
            • -
            +
              +
            • Pavatar v blozích s pøesmìrováním nefungoval, pokud byl odkaz na Pavatar pøístupný pouze v informacích tagu "rel link"
            • +
          • verze 1.48 [brockhaus]
          • -
              -
            • Oprava: Kompatibilita PHP byla porušena pøi opravì 1.46 :-/
            • -
            • Pøidán avatar Identica. Použito hlavnì pro pingbacky Indetica a mìlo by být použito pøed Favatarem, jinak se bude zobrazovat znaèka Identica místo obrázku uživatele.
            • -
            • Vyèištìní kódu
            • -
            +
              +
            • Oprava: Kompatibilita PHP byla porušena pøi opravì 1.46 :-/
            • +
            • Pøidán avatar Identica. Použito hlavnì pro pingbacky Indetica a mìlo by být použito pøed Favatarem, jinak se bude zobrazovat znaèka Identica místo obrázku uživatele.
            • +
            • Vyèištìní kódu
            • +
          • verze 1.47 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisù v template_c
            • -
            +
              +
            • Vypnutí ladicích výpisù v template_c
            • +
          • verze 1.46 [brockhaus]
          • -
              -
            • Pøidán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je vìtšinou použito pro Tweetbacky a mìlo by být použito pøed Favatarem, jinak se bude zobrazovat logo Twitteru.
            • -
            • Vyèištìní kódu
            • -
            +
              +
            • Pøidán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je vìtšinou použito pro Tweetbacky a mìlo by být použito pøed Favatarem, jinak se bude zobrazovat logo Twitteru.
            • +
            • Vyèištìní kódu
            • +
          • verze 1.45 [brockhaus]
          • -
              -
            • Nápovìda
            • -
            • Vyèištìní
            • -
            +
              +
            • Nápovìda
            • +
            • Vyèištìní
            • +
          • verze 1.44 [brockhaus]
          • -
              -
            • Pøidána podpora Wavatarù
            • -
            • Podpora pro ošetøení chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.
            • -
            • Optimalizace zpìtných volání (trackback) avatarù: Querypars budou odstøiženy z URL. Nyní v ukázkovém Serendipity blogu dostanete vždycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.
            • -
            +
              +
            • Pøidána podpora Wavatarù
            • +
            • Podpora pro ošetøení chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.
            • +
            • Optimalizace zpìtných volání (trackback) avatarù: Querypars budou odstøiženy z URL. Nyní v ukázkovém Serendipity blogu dostanete vždycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.
            • +
          • verze 1.43 [brockhaus]
          • -
              -
            • Volba nastavení pro pøidání jména autora do attributu ALT u obrázku avatara. Normálnì je to vyplnìno hvìzdièkou "*", ale slepci jsou pøi prohlížení stránek závislí na tagu ALT, který jim èteèky pøedèítají, aby se dozvìdìli, co je obsahem obrázku.
            • -
            +
              +
            • Volba nastavení pro pøidání jména autora do attributu ALT u obrázku avatara. Normálnì je to vyplnìno hvìzdièkou "*", ale slepci jsou pøi prohlížení stránek závislí na tagu ALT, který jim èteèky pøedèítají, aby se dozvìdìli, co je obsahem obrázku.
            • +
          • verze 1.42 [brockhaus]
          • -
              -
            • Kódování podtržítka "_" v URL adresách uživatelù, aby se odlišily od oddìlovaèù. Funkce "urlencode" je nekóduje. Díky uživateli [Tino Schwarze] za objevení a opravu.
            • -
            +
              +
            • Kódování podtržítka "_" v URL adresách uživatelù, aby se odlišily od oddìlovaèù. Funkce "urlencode" je nekóduje. Díky uživateli [Tino Schwarze] za objevení a opravu.
            • +
          • verze 1.41 [garvinhicking]
          • -
              -
            • Opravena hlavièka "Last-Modified" u obrázkù avatarù.
            • -
            +
              +
            • Opravena hlavièka "Last-Modified" u obrázkù avatarù.
            • +
          • verze 1.40
          • - +
          • verze 1.39 [brockhaus]
          • -
              -
            • Avatary Monster ID je nyní také cachován, protože jejich vytváøení trvá dlouho.
            • -
            +
              +
            • Avatary Monster ID je nyní také cachován, protože jejich vytváøení trvá dlouho.
            • +
          • verze 1.38 [brockhaus]
          • -
              -
            • Podpora Monster ID avatarù (podrobnosti naleznete na http://www.splitbrain.org/go/monsterid)
            • -
            • Selhání pøi èerstvé instalaci a èasu cache nastaveném na 0.
            • -
            • Podpora nastavení absolutní cesty k standardnímu avataru.
            • -
            • Po uložení nastavení je nyní cache vždy vyèištìna, aby byly zmìny viditelné ihned, dokonce i když je cachování zapnuto.
            • -
            • Pokud plugin nemùže zapisovat do cache, pak to v ladicím módu zapíše do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.
            • -
            +
              +
            • Podpora Monster ID avatarù (podrobnosti naleznete na http://www.splitbrain.org/go/monsterid)
            • +
            • Selhání pøi èerstvé instalaci a èasu cache nastaveném na 0.
            • +
            • Podpora nastavení absolutní cesty k standardnímu avataru.
            • +
            • Po uložení nastavení je nyní cache vždy vyèištìna, aby byly zmìny viditelné ihned, dokonce i když je cachování zapnuto.
            • +
            • Pokud plugin nemùže zapisovat do cache, pak to v ladicím módu zapíše do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.
            • +
          • verze 1.37 [brockhaus]
          • -
              -
            • Øádka pod oknem komentáøe informující o podporovaných typech avatarù lze skrýt pomocí nastavení.
            • -
            +
              +
            • Øádka pod oknem komentáøe informující o podporovaných typech avatarù lze skrýt pomocí nastavení.
            • +
          • verze 1.36 [brockhaus]
          • -
              -
            • Pøidána nová volba: Mùžete nastavit, že plugin nebude vytváøet avatary pøímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, mùžete si definovat v šablonì pro komentáøe, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.
            • -
            • CSS tøída avataru se bude mìnit podle toho, kde je zobrazen. Pro normální komentáøe bude mít tøídu "comment_avatar", pro plugin "nejnovìjší pøíspìvky" to bude tøída "serendipity_plugin_comments_avatar", aby byla možnost jednoduše je oznaèit, ostylovat.
            • -
            • Nastavení zarovnání avatarù: Nastavení zarovnání bude použito, pokud je avatar vykreslen pøímo (ne pomocí smarty).
            • -
            • Nová volba pro vypínání/zapínání obrázkù avatarù v postranním sloupci (nejnovìjší komentáøe).
            • -
            • Podporovaní metody avatarù se zobrazovaly i pod kontaktním formuláøem, což ale nemìlo logický smysl. V tomto fromuláøi byly tedy avatary vypnuty.
            • -
            • Další zmìny v jazykových souborech.
            • -
            +
              +
            • Pøidána nová volba: Mùžete nastavit, že plugin nebude vytváøet avatary pøímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, mùžete si definovat v šablonì pro komentáøe, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.
            • +
            • CSS tøída avataru se bude mìnit podle toho, kde je zobrazen. Pro normální komentáøe bude mít tøídu "comment_avatar", pro plugin "nejnovìjší pøíspìvky" to bude tøída "serendipity_plugin_comments_avatar", aby byla možnost jednoduše je oznaèit, ostylovat.
            • +
            • Nastavení zarovnání avatarù: Nastavení zarovnání bude použito, pokud je avatar vykreslen pøímo (ne pomocí smarty).
            • +
            • Nová volba pro vypínání/zapínání obrázkù avatarù v postranním sloupci (nejnovìjší komentáøe).
            • +
            • Podporovaní metody avatarù se zobrazovaly i pod kontaktním formuláøem, což ale nemìlo logický smysl. V tomto fromuláøi byly tedy avatary vypnuty.
            • +
            • Další zmìny v jazykových souborech.
            • +
          • verze 1.35 [brockhaus]
          • -
              -
            • Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)
            • -
            +
              +
            • Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)
            • +
          • verze 1.34 [brockhaus]
          • -
              -
            • Hodnocení Gravatarù nepracuje spolehlivì. Mùj Gravatar hodnocený jako G je zobrazen pouze pøi použití hodnocení gravatarù X. :-/
              - Pøidána volba pro vypnutí parametru hodnocení Gravatarù, což by mìlo mít stejný efekt jako nastavení hodnocení X.
            • -
            +
              +
            • Hodnocení Gravatarù nepracuje spolehlivì. Mùj Gravatar hodnocený jako G je zobrazen pouze pøi použití hodnocení gravatarù X. :-/
              + Pøidána volba pro vypnutí parametru hodnocení Gravatarù, což by mìlo mít stejný efekt jako nastavení hodnocení X.
            • +
          • verze 1.33 [brockhaus]
          • -
              -
            • Pavatar: X-Pavatar Header je nyní znovu podporován a je první použitou metodou automatické detekce Pavatara.
            • -
            +
              +
            • Pavatar: X-Pavatar Header je nyní znovu podporován a je první použitou metodou automatické detekce Pavatara.
            • +
          • verze 1.32 [brockhaus]
          • -
              -
            • Výchozí avatar MyBlogLog nebyl správnì detekování. :-/
            • -
            • Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právì výchozí avatar.
            • -
            +
              +
            • Výchozí avatar MyBlogLog nebyl správnì detekování. :-/
            • +
            • Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právì výchozí avatar.
            • +
          • verze 1.31 [brockhaus]
          • -
              -
            • Zmìna èasu volání (call-time) chyby (pass-by-reference) (fetchAvatar).
            • -
            +
              +
            • Zmìna èasu volání (call-time) chyby (pass-by-reference) (fetchAvatar).
            • +
          • verze 1.30 [brockhaus]
          • -
              -
            • Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáøi webu a ne pøímo v koøenové složce.
            • -
            • Odkaz na Gravatara byl trochu špatnì (pøesto fungoval).
            • -
            +
              +
            • Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáøi webu a ne pøímo v koøenové složce.
            • +
            • Odkaz na Gravatara byl trochu špatnì (pøesto fungoval).
            • +
          • verze 1.29 [brockhaus]
          • -
              -
            • Oprava chyby 1.27 pøidávala k URL "http://", i když nebyla zadána vùbec žádná URL adresa.
            • -
            +
              +
            • Oprava chyby 1.27 pøidávala k URL "http://", i když nebyla zadána vùbec žádná URL adresa.
            • +
          • verze 1.28 [brockhaus]
          • -
              -
            • V Serendipity 1.1 nebylo možné natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.
            • -
            +
              +
            • V Serendipity 1.1 nebylo možné natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.
            • +
          • verze 1.27 [brockhaus]
          • -
              -
            • Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl naèten správnì.
            • -
            +
              +
            • Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl naèten správnì.
            • +
          • verze 1.26 [brockhaus]
          • -
              -
            • MyBlogLog trochu pozmìnil zpùsob volání avatara, což mìlo za následek, že ošetøení chybových výstupù (fallback) pro MyBlogLog pøestal fungovat.
            • -
            +
              +
            • MyBlogLog trochu pozmìnil zpùsob volání avatara, což mìlo za následek, že ošetøení chybových výstupù (fallback) pro MyBlogLog pøestal fungovat.
            • +
          • verze 1.25 [garvinhicking]
          • -
              -
            • Zarovnání (algin) nahraceno definicí pomocí CSS stylù, takže XHTML už neobsahuje žádné definice zarovnání.
            • -
            +
              +
            • Zarovnání (algin) nahraceno definicí pomocí CSS stylù, takže XHTML už neobsahuje žádné definice zarovnání.
            • +
          • verze 1.24 [brockhaus]
          • -
              -
            • Kontrola odpovìdi MyBlogLog, jestli obsahuje opravdu obrázek.
            • -
            • Vyèištìní pamìti cache pøi nastavení hodnoty cachování na 0.
            • -
            • Vypnutí ladicích výpisù.
            • -
            +
              +
            • Kontrola odpovìdi MyBlogLog, jestli obsahuje opravdu obrázek.
            • +
            • Vyèištìní pamìti cache pøi nastavení hodnoty cachování na 0.
            • +
            • Vypnutí ladicích výpisù.
            • +
          • verze 1.23 [brockhaus]
          • -
              -
            • Pøi vkládání èerstvých P/favatarù, plugin pøijme pouze odpovìdi oznaèené vzdáleným serverem jako obrázky. To zamezí pøijetí potenciálních html stránek jako obrázku avatara.
            • -
            +
              +
            • Pøi vkládání èerstvých P/favatarù, plugin pøijme pouze odpovìdi oznaèené vzdáleným serverem jako obrázky. To zamezí pøijetí potenciálních html stránek jako obrázku avatara.
            • +
          • verze 1.22 [brockhaus]
          • -
              -
            • Vkládání i pøesmìrovaných P/Favatarù.
            • -
            +
              +
            • Vkládání i pøesmìrovaných P/Favatarù.
            • +
          • verze 1.21 [brockhaus]
          • -
              -
            • Vkládání avatarù se rozbilo pøi vypnutí cache.
            • -
            • Prohlížeè nebyl schopen cachovat výchozí avatary kvùli špatnì nastavenému èasu cache.
            • -
            • Kontrola, jestli cachovaný soubor vypadá jako obrázek, pøedtím, než je odeslán na klienta.
            • -
            +
              +
            • Vkládání avatarù se rozbilo pøi vypnutí cache.
            • +
            • Prohlížeè nebyl schopen cachovat výchozí avatary kvùli špatnì nastavenému èasu cache.
            • +
            • Kontrola, jestli cachovaný soubor vypadá jako obrázek, pøedtím, než je odeslán na klienta.
            • +
          • verze 1.20 [brockhaus]
          • -
              -
            • Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)
            • -
            +
              +
            • Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)
            • +
          • verze 1.19 [brockhaus]
          • -
              -
            • Využití cache prohlížeèe má za následek dobré vylepšení výkonu!
            • -
            +
              +
            • Využití cache prohlížeèe má za následek dobré vylepšení výkonu!
            • +
          • verze 1.18 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisù
            • -
            +
              +
            • Vypnutí ladicích výpisù
            • +
          • verze 1.17 [brockhaus]
          • -
              -
            • Pokud je zapnuto cachování, je nyní cachováno všechno. Známí pøispìvatelé a komentátoøi nyní nezpùsobí žádné volání cizích serverù, pokud už jsou jejich obrázky cachovány. Velmi pìkné posílení výkonu. Díky Garvinovi za nápad.
            • -
            • Záplata proti hackování od uživatele [garvinhickins]
            • -
            +
              +
            • Pokud je zapnuto cachování, je nyní cachováno všechno. Známí pøispìvatelé a komentátoøi nyní nezpùsobí žádné volání cizích serverù, pokud už jsou jejich obrázky cachovány. Velmi pìkné posílení výkonu. Díky Garvinovi za nápad.
            • +
            • Záplata proti hackování od uživatele [garvinhickins]
            • +
          • verze 1.16 [garvinhicking]
          • -
              -
            • uhlazení kódu
            • -
            +
              +
            • uhlazení kódu
            • +
          • verze 1.14 [brockhaus]
          • -
              -
            • Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by nemìl být první v poøadí avatarù.
            • -
            • Pøidána pátá kolonka pro výbìr metody avatarù, protože MyBlogLog nyní také podporuje zpracování chyb (fallback).
            • -
            +
              +
            • Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by nemìl být první v poøadí avatarù.
            • +
            • Pøidána pátá kolonka pro výbìr metody avatarù, protože MyBlogLog nyní také podporuje zpracování chyb (fallback).
            • +
          • verze 1.13 [brockhaus]
          • -
              -
            • Doporuèení zmìnìno: Není to plugin "statistika", který znefunkèní Pavatary/Favatary, ale plugin "sledování odchodù" (exit tracking plugin)
            • -
            +
              +
            • Doporuèení zmìnìno: Není to plugin "statistika", který znefunkèní Pavatary/Favatary, ale plugin "sledování odchodù" (exit tracking plugin)
            • +
          • verze 1.12 [brockhaus]
          • -
              -
            • MyBlogLog avatary jsou nyní také cachovány.
            • -
            • Stránky s pøesmìrováním na výchozí stránku, pokud nebyla nalazena výchozí položka, jsou nyní podporovány. Døívìjší plugin avatar pøedpokládal, že výchozí stránka ja P/Favatar.
            • -
            • Výchozí nastavení poøadí avatarù je nyní: Gravatar -> Pavatar +
                +
              • MyBlogLog avatary jsou nyní také cachovány.
              • +
              • Stránky s pøesmìrováním na výchozí stránku, pokud nebyla nalazena výchozí položka, jsou nyní podporovány. Døívìjší plugin avatar pøedpokládal, že výchozí stránka ja P/Favatar.
              • +
              • Výchozí nastavení poøadí avatarù je nyní: Gravatar -> Pavatar -> Favatar -> výchozí Avatar
              • -
              • Pøidáno doporuèení, že plugin by mìl být zaøazen pøed pluginy, které mìní odkazy.
              • -
              • Naèítání nastavené cesty pluginu. Døíve to byl vždy adresáø 'plugin'.
              • -
              • Vyøazeno nastavení okraje gravatara, protože už nefunguje (napoøád?).
              • -
              +
            • Pøidáno doporuèení, že plugin by mìl být zaøazen pøed pluginy, které mìní odkazy.
            • +
            • Naèítání nastavené cesty pluginu. Døíve to byl vždy adresáø 'plugin'.
            • +
            • Vyøazeno nastavení okraje gravatara, protože už nefunguje (napoøád?).
            • +
          • verze 1.11 [brockhaus], testovací verze nebyla releasována do CVS/Spartacus
          • -
              -
            • Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Takže toto nastavení bylo smazáno.
            • -
            +
              +
            • Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Takže toto nastavení bylo smazáno.
            • +
          • verze 1.10 [brockhaus]
          • -
              -
            • Informace o Pavatar / Avatar nebyly nikdy naètené z cache
            • -
            • ...ale po naètení z cache zpùsobily nekoneènou smyèku pro obrázky naètené z lokálního blogu (pokud byl povolen postranní blugin s komentáøi - comment sidebar)
            • -
            • Nastavení výšky obrázku bylo pojmenováno "height" ... :-/
            • -
            • Cachování Gravataru nefungovalo spolehlivì, pokud byl nastaven výchozí avatar.
            • -
            +
              +
            • Informace o Pavatar / Avatar nebyly nikdy naètené z cache
            • +
            • ...ale po naètení z cache zpùsobily nekoneènou smyèku pro obrázky naètené z lokálního blogu (pokud byl povolen postranní blugin s komentáøi - comment sidebar)
            • +
            • Nastavení výšky obrázku bylo pojmenováno "height" ... :-/
            • +
            • Cachování Gravataru nefungovalo spolehlivì, pokud byl nastaven výchozí avatar.
            • +
          • verze 1.9 [brockhaus]
          • -
              -
            • Pøi hledání Pavatara byl natažen Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky uživateli [El Burro]
            • -
            +
              +
            • Pøi hledání Pavatara byl natažen Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky uživateli [El Burro]
            • +
          • verze 1.8 [brockhaus]
          • -
              -
            • Plugin nebych schopen naèíst Favatary/Pavatary, pokud bylo pøesmìrování nasmìrováno na URL stránky nastavené jako domovská stránka komentujícího. Tøeba Garvin má takový blog...
            • -
            +
              +
            • Plugin nebych schopen naèíst Favatary/Pavatary, pokud bylo pøesmìrování nasmìrováno na URL stránky nastavené jako domovská stránka komentujícího. Tøeba Garvin má takový blog...
            • +
          • verze 1.7 [brockhaus]
          • -
              -
            • Pøidána podpora Pavatarù (www.pavatar.com)
            • -
            • Pøidána podpora MyBlogLog avatarù (www.mybloglog.com)
            • -
            • Poøadí pro výbìr avatarù a jaké typy avatarù jsou podporovány, vše je nyní nastavitelné.
            • -
            • Standardní avatar mùže být jeden z nich (mìl by být poslední).
            • -
            • Volba pro nenastavení Gravatara jako výchozího avatara, i když je definovaný. (Chceme ménì datových profilù...)
            • -
            • Vložení výchozího avatara pomocí mediatéky v nastavení pluginu.
            • -
            • Velikost obrázku je nyní zajištìna pomocí HTML kódu.
            • -
            • Pod polem pro komentáø jsou zobrazovány pouze aktuálnì nastavené metody avatara jako podporované.
            • -
            +
              +
            • Pøidána podpora Pavatarù (www.pavatar.com)
            • +
            • Pøidána podpora MyBlogLog avatarù (www.mybloglog.com)
            • +
            • Poøadí pro výbìr avatarù a jaké typy avatarù jsou podporovány, vše je nyní nastavitelné.
            • +
            • Standardní avatar mùže být jeden z nich (mìl by být poslední).
            • +
            • Volba pro nenastavení Gravatara jako výchozího avatara, i když je definovaný. (Chceme ménì datových profilù...)
            • +
            • Vložení výchozího avatara pomocí mediatéky v nastavení pluginu.
            • +
            • Velikost obrázku je nyní zajištìna pomocí HTML kódu.
            • +
            • Pod polem pro komentáø jsou zobrazovány pouze aktuálnì nastavené metody avatara jako podporované.
            • +
          • verze 1.6 [garvinhickins]
          • verze 1.5 [garvinhickins]
          • verze 1.4 [garvinhickins]
          • verze 1.3 [garvinhickins]
          • -
              -
            • Opraveny chyby neplatnosti domény
            • -
            +
              +
            • Opraveny chyby neplatnosti domény
            • +

          nahoru

          diff --git a/plugins/serendipity_event_gravatar/documentation_cz.html b/plugins/serendipity_event_gravatar/documentation_cz.html index c12ae4b7..64f284ca 100644 --- a/plugins/serendipity_event_gravatar/documentation_cz.html +++ b/plugins/serendipity_event_gravatar/documentation_cz.html @@ -49,7 +49,7 @@
        • V¾dy vy¾adovat Gravatar Fallback
        • -
        • ChangeLog (historie verzí)
        • +
        • ChangeLog (historie verzí)
        • @@ -200,232 +200,232 @@ Avatary Identicon (identikony) jsou generov
          • verze 1.54
          • -
              -
            • Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl pøidán parametr %s pro zobrazení podporovaných avatarových slu¾eb.
            • -
            +
              +
            • Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl pøidán parametr %s pro zobrazení podporovaných avatarových slu¾eb.
            • +
          • verze 1.52
          • -
              -
            • Zmìnìno zobrazení podporovaných avatarù pod polem pro komentáø, aby podporovalo hezké zalamování øádkù.
            • -
            +
              +
            • Zmìnìno zobrazení podporovaných avatarù pod polem pro komentáø, aby podporovalo hezké zalamování øádkù.
            • +
          • verze 1.51
          • -
              -
            • Pou¾ití funkce strtolower() pro mailové adresy.
            • -
            +
              +
            • Pou¾ití funkce strtolower() pro mailové adresy.
            • +
          • verze 1.49 [brockhaus]
          • -
              -
            • Pavatar v blozích s pøesmìrováním nefungoval, pokud byl odkaz na Pavatar pøístupný pouze v informacích tagu "rel link"
            • -
            +
              +
            • Pavatar v blozích s pøesmìrováním nefungoval, pokud byl odkaz na Pavatar pøístupný pouze v informacích tagu "rel link"
            • +
          • verze 1.48 [brockhaus]
          • -
              -
            • Oprava: Kompatibilita PHP byla poru¹ena pøi opravì 1.46 :-/
            • -
            • Pøidán avatar Identica. Pou¾ito hlavnì pro pingbacky Indetica a mìlo by být pou¾ito pøed Favatarem, jinak se bude zobrazovat znaèka Identica místo obrázku u¾ivatele.
            • -
            • Vyèi¹tìní kódu
            • -
            +
              +
            • Oprava: Kompatibilita PHP byla poru¹ena pøi opravì 1.46 :-/
            • +
            • Pøidán avatar Identica. Pou¾ito hlavnì pro pingbacky Indetica a mìlo by být pou¾ito pøed Favatarem, jinak se bude zobrazovat znaèka Identica místo obrázku u¾ivatele.
            • +
            • Vyèi¹tìní kódu
            • +
          • verze 1.47 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisù v template_c
            • -
            +
              +
            • Vypnutí ladicích výpisù v template_c
            • +
          • verze 1.46 [brockhaus]
          • -
              -
            • Pøidán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je vìt¹inou pou¾ito pro Tweetbacky a mìlo by být pou¾ito pøed Favatarem, jinak se bude zobrazovat logo Twitteru.
            • -
            • Vyèi¹tìní kódu
            • -
            +
              +
            • Pøidán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je vìt¹inou pou¾ito pro Tweetbacky a mìlo by být pou¾ito pøed Favatarem, jinak se bude zobrazovat logo Twitteru.
            • +
            • Vyèi¹tìní kódu
            • +
          • verze 1.45 [brockhaus]
          • -
              -
            • Nápovìda
            • -
            • Vyèi¹tìní
            • -
            +
              +
            • Nápovìda
            • +
            • Vyèi¹tìní
            • +
          • verze 1.44 [brockhaus]
          • -
              -
            • Pøidána podpora Wavatarù
            • -
            • Podpora pro o¹etøení chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.
            • -
            • Optimalizace zpìtných volání (trackback) avatarù: Querypars budou odstøi¾eny z URL. Nyní v ukázkovém Serendipity blogu dostanete v¾dycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.
            • -
            +
              +
            • Pøidána podpora Wavatarù
            • +
            • Podpora pro o¹etøení chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.
            • +
            • Optimalizace zpìtných volání (trackback) avatarù: Querypars budou odstøi¾eny z URL. Nyní v ukázkovém Serendipity blogu dostanete v¾dycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.
            • +
          • verze 1.43 [brockhaus]
          • -
              -
            • Volba nastavení pro pøidání jména autora do attributu ALT u obrázku avatara. Normálnì je to vyplnìno hvìzdièkou "*", ale slepci jsou pøi prohlí¾ení stránek závislí na tagu ALT, který jim èteèky pøedèítají, aby se dozvìdìli, co je obsahem obrázku.
            • -
            +
              +
            • Volba nastavení pro pøidání jména autora do attributu ALT u obrázku avatara. Normálnì je to vyplnìno hvìzdièkou "*", ale slepci jsou pøi prohlí¾ení stránek závislí na tagu ALT, který jim èteèky pøedèítají, aby se dozvìdìli, co je obsahem obrázku.
            • +
          • verze 1.42 [brockhaus]
          • -
              -
            • Kódování podtr¾ítka "_" v URL adresách u¾ivatelù, aby se odli¹ily od oddìlovaèù. Funkce "urlencode" je nekóduje. Díky u¾ivateli [Tino Schwarze] za objevení a opravu.
            • -
            +
              +
            • Kódování podtr¾ítka "_" v URL adresách u¾ivatelù, aby se odli¹ily od oddìlovaèù. Funkce "urlencode" je nekóduje. Díky u¾ivateli [Tino Schwarze] za objevení a opravu.
            • +
          • verze 1.41 [garvinhicking]
          • -
              -
            • Opravena hlavièka "Last-Modified" u obrázkù avatarù.
            • -
            +
              +
            • Opravena hlavièka "Last-Modified" u obrázkù avatarù.
            • +
          • verze 1.40
          • - +
          • verze 1.39 [brockhaus]
          • -
              -
            • Avatary Monster ID je nyní také cachován, proto¾e jejich vytváøení trvá dlouho.
            • -
            +
              +
            • Avatary Monster ID je nyní také cachován, proto¾e jejich vytváøení trvá dlouho.
            • +
          • verze 1.38 [brockhaus]
          • -
              -
            • Podpora Monster ID avatarù (podrobnosti naleznete na http://www.splitbrain.org/go/monsterid)
            • -
            • Selhání pøi èerstvé instalaci a èasu cache nastaveném na 0.
            • -
            • Podpora nastavení absolutní cesty k standardnímu avataru.
            • -
            • Po ulo¾ení nastavení je nyní cache v¾dy vyèi¹tìna, aby byly zmìny viditelné ihned, dokonce i kdy¾ je cachování zapnuto.
            • -
            • Pokud plugin nemù¾e zapisovat do cache, pak to v ladicím módu zapí¹e do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.
            • -
            +
              +
            • Podpora Monster ID avatarù (podrobnosti naleznete na http://www.splitbrain.org/go/monsterid)
            • +
            • Selhání pøi èerstvé instalaci a èasu cache nastaveném na 0.
            • +
            • Podpora nastavení absolutní cesty k standardnímu avataru.
            • +
            • Po ulo¾ení nastavení je nyní cache v¾dy vyèi¹tìna, aby byly zmìny viditelné ihned, dokonce i kdy¾ je cachování zapnuto.
            • +
            • Pokud plugin nemù¾e zapisovat do cache, pak to v ladicím módu zapí¹e do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.
            • +
          • verze 1.37 [brockhaus]
          • -
              -
            • Øádka pod oknem komentáøe informující o podporovaných typech avatarù lze skrýt pomocí nastavení.
            • -
            +
              +
            • Øádka pod oknem komentáøe informující o podporovaných typech avatarù lze skrýt pomocí nastavení.
            • +
          • verze 1.36 [brockhaus]
          • -
              -
            • Pøidána nová volba: Mù¾ete nastavit, ¾e plugin nebude vytváøet avatary pøímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, mù¾ete si definovat v ¹ablonì pro komentáøe, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.
            • -
            • CSS tøída avataru se bude mìnit podle toho, kde je zobrazen. Pro normální komentáøe bude mít tøídu "comment_avatar", pro plugin "nejnovìj¹í pøíspìvky" to bude tøída "serendipity_plugin_comments_avatar", aby byla mo¾nost jednodu¹e je oznaèit, ostylovat.
            • -
            • Nastavení zarovnání avatarù: Nastavení zarovnání bude pou¾ito, pokud je avatar vykreslen pøímo (ne pomocí smarty).
            • -
            • Nová volba pro vypínání/zapínání obrázkù avatarù v postranním sloupci (nejnovìj¹í komentáøe).
            • -
            • Podporovaní metody avatarù se zobrazovaly i pod kontaktním formuláøem, co¾ ale nemìlo logický smysl. V tomto fromuláøi byly tedy avatary vypnuty.
            • -
            • Dal¹í zmìny v jazykových souborech.
            • -
            +
              +
            • Pøidána nová volba: Mù¾ete nastavit, ¾e plugin nebude vytváøet avatary pøímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, mù¾ete si definovat v ¹ablonì pro komentáøe, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.
            • +
            • CSS tøída avataru se bude mìnit podle toho, kde je zobrazen. Pro normální komentáøe bude mít tøídu "comment_avatar", pro plugin "nejnovìj¹í pøíspìvky" to bude tøída "serendipity_plugin_comments_avatar", aby byla mo¾nost jednodu¹e je oznaèit, ostylovat.
            • +
            • Nastavení zarovnání avatarù: Nastavení zarovnání bude pou¾ito, pokud je avatar vykreslen pøímo (ne pomocí smarty).
            • +
            • Nová volba pro vypínání/zapínání obrázkù avatarù v postranním sloupci (nejnovìj¹í komentáøe).
            • +
            • Podporovaní metody avatarù se zobrazovaly i pod kontaktním formuláøem, co¾ ale nemìlo logický smysl. V tomto fromuláøi byly tedy avatary vypnuty.
            • +
            • Dal¹í zmìny v jazykových souborech.
            • +
          • verze 1.35 [brockhaus]
          • -
              -
            • Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)
            • -
            +
              +
            • Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)
            • +
          • verze 1.34 [brockhaus]
          • -
              -
            • Hodnocení Gravatarù nepracuje spolehlivì. Mùj Gravatar hodnocený jako G je zobrazen pouze pøi pou¾ití hodnocení gravatarù X. :-/
              - Pøidána volba pro vypnutí parametru hodnocení Gravatarù, co¾ by mìlo mít stejný efekt jako nastavení hodnocení X.
            • -
            +
              +
            • Hodnocení Gravatarù nepracuje spolehlivì. Mùj Gravatar hodnocený jako G je zobrazen pouze pøi pou¾ití hodnocení gravatarù X. :-/
              + Pøidána volba pro vypnutí parametru hodnocení Gravatarù, co¾ by mìlo mít stejný efekt jako nastavení hodnocení X.
            • +
          • verze 1.33 [brockhaus]
          • -
              -
            • Pavatar: X-Pavatar Header je nyní znovu podporován a je první pou¾itou metodou automatické detekce Pavatara.
            • -
            +
              +
            • Pavatar: X-Pavatar Header je nyní znovu podporován a je první pou¾itou metodou automatické detekce Pavatara.
            • +
          • verze 1.32 [brockhaus]
          • -
              -
            • Výchozí avatar MyBlogLog nebyl správnì detekování. :-/
            • -
            • Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právì výchozí avatar.
            • -
            +
              +
            • Výchozí avatar MyBlogLog nebyl správnì detekování. :-/
            • +
            • Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právì výchozí avatar.
            • +
          • verze 1.31 [brockhaus]
          • -
              -
            • Zmìna èasu volání (call-time) chyby (pass-by-reference) (fetchAvatar).
            • -
            +
              +
            • Zmìna èasu volání (call-time) chyby (pass-by-reference) (fetchAvatar).
            • +
          • verze 1.30 [brockhaus]
          • -
              -
            • Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáøi webu a ne pøímo v koøenové slo¾ce.
            • -
            • Odkaz na Gravatara byl trochu ¹patnì (pøesto fungoval).
            • -
            +
              +
            • Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáøi webu a ne pøímo v koøenové slo¾ce.
            • +
            • Odkaz na Gravatara byl trochu ¹patnì (pøesto fungoval).
            • +
          • verze 1.29 [brockhaus]
          • -
              -
            • Oprava chyby 1.27 pøidávala k URL "http://", i kdy¾ nebyla zadána vùbec ¾ádná URL adresa.
            • -
            +
              +
            • Oprava chyby 1.27 pøidávala k URL "http://", i kdy¾ nebyla zadána vùbec ¾ádná URL adresa.
            • +
          • verze 1.28 [brockhaus]
          • -
              -
            • V Serendipity 1.1 nebylo mo¾né natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.
            • -
            +
              +
            • V Serendipity 1.1 nebylo mo¾né natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.
            • +
          • verze 1.27 [brockhaus]
          • -
              -
            • Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl naèten správnì.
            • -
            +
              +
            • Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl naèten správnì.
            • +
          • verze 1.26 [brockhaus]
          • -
              -
            • MyBlogLog trochu pozmìnil zpùsob volání avatara, co¾ mìlo za následek, ¾e o¹etøení chybových výstupù (fallback) pro MyBlogLog pøestal fungovat.
            • -
            +
              +
            • MyBlogLog trochu pozmìnil zpùsob volání avatara, co¾ mìlo za následek, ¾e o¹etøení chybových výstupù (fallback) pro MyBlogLog pøestal fungovat.
            • +
          • verze 1.25 [garvinhicking]
          • -
              -
            • Zarovnání (algin) nahraceno definicí pomocí CSS stylù, tak¾e XHTML u¾ neobsahuje ¾ádné definice zarovnání.
            • -
            +
              +
            • Zarovnání (algin) nahraceno definicí pomocí CSS stylù, tak¾e XHTML u¾ neobsahuje ¾ádné definice zarovnání.
            • +
          • verze 1.24 [brockhaus]
          • -
              -
            • Kontrola odpovìdi MyBlogLog, jestli obsahuje opravdu obrázek.
            • -
            • Vyèi¹tìní pamìti cache pøi nastavení hodnoty cachování na 0.
            • -
            • Vypnutí ladicích výpisù.
            • -
            +
              +
            • Kontrola odpovìdi MyBlogLog, jestli obsahuje opravdu obrázek.
            • +
            • Vyèi¹tìní pamìti cache pøi nastavení hodnoty cachování na 0.
            • +
            • Vypnutí ladicích výpisù.
            • +
          • verze 1.23 [brockhaus]
          • -
              -
            • Pøi vkládání èerstvých P/favatarù, plugin pøijme pouze odpovìdi oznaèené vzdáleným serverem jako obrázky. To zamezí pøijetí potenciálních html stránek jako obrázku avatara.
            • -
            +
              +
            • Pøi vkládání èerstvých P/favatarù, plugin pøijme pouze odpovìdi oznaèené vzdáleným serverem jako obrázky. To zamezí pøijetí potenciálních html stránek jako obrázku avatara.
            • +
          • verze 1.22 [brockhaus]
          • -
              -
            • Vkládání i pøesmìrovaných P/Favatarù.
            • -
            +
              +
            • Vkládání i pøesmìrovaných P/Favatarù.
            • +
          • verze 1.21 [brockhaus]
          • -
              -
            • Vkládání avatarù se rozbilo pøi vypnutí cache.
            • -
            • Prohlí¾eè nebyl schopen cachovat výchozí avatary kvùli ¹patnì nastavenému èasu cache.
            • -
            • Kontrola, jestli cachovaný soubor vypadá jako obrázek, pøedtím, ne¾ je odeslán na klienta.
            • -
            +
              +
            • Vkládání avatarù se rozbilo pøi vypnutí cache.
            • +
            • Prohlí¾eè nebyl schopen cachovat výchozí avatary kvùli ¹patnì nastavenému èasu cache.
            • +
            • Kontrola, jestli cachovaný soubor vypadá jako obrázek, pøedtím, ne¾ je odeslán na klienta.
            • +
          • verze 1.20 [brockhaus]
          • -
              -
            • Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)
            • -
            +
              +
            • Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)
            • +
          • verze 1.19 [brockhaus]
          • -
              -
            • Vyu¾ití cache prohlí¾eèe má za následek dobré vylep¹ení výkonu!
            • -
            +
              +
            • Vyu¾ití cache prohlí¾eèe má za následek dobré vylep¹ení výkonu!
            • +
          • verze 1.18 [brockhaus]
          • -
              -
            • Vypnutí ladicích výpisù
            • -
            +
              +
            • Vypnutí ladicích výpisù
            • +
          • verze 1.17 [brockhaus]
          • -
              -
            • Pokud je zapnuto cachování, je nyní cachováno v¹echno. Známí pøispìvatelé a komentátoøi nyní nezpùsobí ¾ádné volání cizích serverù, pokud u¾ jsou jejich obrázky cachovány. Velmi pìkné posílení výkonu. Díky Garvinovi za nápad.
            • -
            • Záplata proti hackování od u¾ivatele [garvinhickins]
            • -
            +
              +
            • Pokud je zapnuto cachování, je nyní cachováno v¹echno. Známí pøispìvatelé a komentátoøi nyní nezpùsobí ¾ádné volání cizích serverù, pokud u¾ jsou jejich obrázky cachovány. Velmi pìkné posílení výkonu. Díky Garvinovi za nápad.
            • +
            • Záplata proti hackování od u¾ivatele [garvinhickins]
            • +
          • verze 1.16 [garvinhicking]
          • -
              -
            • uhlazení kódu
            • -
            +
              +
            • uhlazení kódu
            • +
          • verze 1.14 [brockhaus]
          • -
              -
            • Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by nemìl být první v poøadí avatarù.
            • -
            • Pøidána pátá kolonka pro výbìr metody avatarù, proto¾e MyBlogLog nyní také podporuje zpracování chyb (fallback).
            • -
            +
              +
            • Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by nemìl být první v poøadí avatarù.
            • +
            • Pøidána pátá kolonka pro výbìr metody avatarù, proto¾e MyBlogLog nyní také podporuje zpracování chyb (fallback).
            • +
          • verze 1.13 [brockhaus]
          • -
              -
            • Doporuèení zmìnìno: Není to plugin "statistika", který znefunkèní Pavatary/Favatary, ale plugin "sledování odchodù" (exit tracking plugin)
            • -
            +
              +
            • Doporuèení zmìnìno: Není to plugin "statistika", který znefunkèní Pavatary/Favatary, ale plugin "sledování odchodù" (exit tracking plugin)
            • +
          • verze 1.12 [brockhaus]
          • -
              -
            • MyBlogLog avatary jsou nyní také cachovány.
            • -
            • Stránky s pøesmìrováním na výchozí stránku, pokud nebyla nalazena výchozí polo¾ka, jsou nyní podporovány. Døívìj¹í plugin avatar pøedpokládal, ¾e výchozí stránka ja P/Favatar.
            • -
            • Výchozí nastavení poøadí avatarù je nyní: Gravatar -> Pavatar +
                +
              • MyBlogLog avatary jsou nyní také cachovány.
              • +
              • Stránky s pøesmìrováním na výchozí stránku, pokud nebyla nalazena výchozí polo¾ka, jsou nyní podporovány. Døívìj¹í plugin avatar pøedpokládal, ¾e výchozí stránka ja P/Favatar.
              • +
              • Výchozí nastavení poøadí avatarù je nyní: Gravatar -> Pavatar -> Favatar -> výchozí Avatar
              • -
              • Pøidáno doporuèení, ¾e plugin by mìl být zaøazen pøed pluginy, které mìní odkazy.
              • -
              • Naèítání nastavené cesty pluginu. Døíve to byl v¾dy adresáø 'plugin'.
              • -
              • Vyøazeno nastavení okraje gravatara, proto¾e u¾ nefunguje (napoøád?).
              • -
              +
            • Pøidáno doporuèení, ¾e plugin by mìl být zaøazen pøed pluginy, které mìní odkazy.
            • +
            • Naèítání nastavené cesty pluginu. Døíve to byl v¾dy adresáø 'plugin'.
            • +
            • Vyøazeno nastavení okraje gravatara, proto¾e u¾ nefunguje (napoøád?).
            • +
          • verze 1.11 [brockhaus], testovací verze nebyla releasována do CVS/Spartacus
          • -
              -
            • Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Tak¾e toto nastavení bylo smazáno.
            • -
            +
              +
            • Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Tak¾e toto nastavení bylo smazáno.
            • +
          • verze 1.10 [brockhaus]
          • -
              -
            • Informace o Pavatar / Avatar nebyly nikdy naètené z cache
            • -
            • ...ale po naètení z cache zpùsobily nekoneènou smyèku pro obrázky naètené z lokálního blogu (pokud byl povolen postranní blugin s komentáøi - comment sidebar)
            • -
            • Nastavení vý¹ky obrázku bylo pojmenováno "height" ... :-/
            • -
            • Cachování Gravataru nefungovalo spolehlivì, pokud byl nastaven výchozí avatar.
            • -
            +
              +
            • Informace o Pavatar / Avatar nebyly nikdy naètené z cache
            • +
            • ...ale po naètení z cache zpùsobily nekoneènou smyèku pro obrázky naètené z lokálního blogu (pokud byl povolen postranní blugin s komentáøi - comment sidebar)
            • +
            • Nastavení vý¹ky obrázku bylo pojmenováno "height" ... :-/
            • +
            • Cachování Gravataru nefungovalo spolehlivì, pokud byl nastaven výchozí avatar.
            • +
          • verze 1.9 [brockhaus]
          • -
              -
            • Pøi hledání Pavatara byl nata¾en Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky u¾ivateli [El Burro]
            • -
            +
              +
            • Pøi hledání Pavatara byl nata¾en Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky u¾ivateli [El Burro]
            • +
          • verze 1.8 [brockhaus]
          • -
              -
            • Plugin nebych schopen naèíst Favatary/Pavatary, pokud bylo pøesmìrování nasmìrováno na URL stránky nastavené jako domovská stránka komentujícího. Tøeba Garvin má takový blog...
            • -
            +
              +
            • Plugin nebych schopen naèíst Favatary/Pavatary, pokud bylo pøesmìrování nasmìrováno na URL stránky nastavené jako domovská stránka komentujícího. Tøeba Garvin má takový blog...
            • +
          • verze 1.7 [brockhaus]
          • -
              -
            • Pøidána podpora Pavatarù (www.pavatar.com)
            • -
            • Pøidána podpora MyBlogLog avatarù (www.mybloglog.com)
            • -
            • Poøadí pro výbìr avatarù a jaké typy avatarù jsou podporovány, v¹e je nyní nastavitelné.
            • -
            • Standardní avatar mù¾e být jeden z nich (mìl by být poslední).
            • -
            • Volba pro nenastavení Gravatara jako výchozího avatara, i kdy¾ je definovaný. (Chceme ménì datových profilù...)
            • -
            • Vlo¾ení výchozího avatara pomocí mediatéky v nastavení pluginu.
            • -
            • Velikost obrázku je nyní zaji¹tìna pomocí HTML kódu.
            • -
            • Pod polem pro komentáø jsou zobrazovány pouze aktuálnì nastavené metody avatara jako podporované.
            • -
            +
              +
            • Pøidána podpora Pavatarù (www.pavatar.com)
            • +
            • Pøidána podpora MyBlogLog avatarù (www.mybloglog.com)
            • +
            • Poøadí pro výbìr avatarù a jaké typy avatarù jsou podporovány, v¹e je nyní nastavitelné.
            • +
            • Standardní avatar mù¾e být jeden z nich (mìl by být poslední).
            • +
            • Volba pro nenastavení Gravatara jako výchozího avatara, i kdy¾ je definovaný. (Chceme ménì datových profilù...)
            • +
            • Vlo¾ení výchozího avatara pomocí mediatéky v nastavení pluginu.
            • +
            • Velikost obrázku je nyní zaji¹tìna pomocí HTML kódu.
            • +
            • Pod polem pro komentáø jsou zobrazovány pouze aktuálnì nastavené metody avatara jako podporované.
            • +
          • verze 1.6 [garvinhickins]
          • verze 1.5 [garvinhickins]
          • verze 1.4 [garvinhickins]
          • verze 1.3 [garvinhickins]
          • -
              -
            • Opraveny chyby neplatnosti domény
            • -
            +
              +
            • Opraveny chyby neplatnosti domény
            • +

          nahoru

          diff --git a/plugins/serendipity_event_gravatar/documentation_de.html b/plugins/serendipity_event_gravatar/documentation_de.html index 48f9e811..f2668cd8 100644 --- a/plugins/serendipity_event_gravatar/documentation_de.html +++ b/plugins/serendipity_event_gravatar/documentation_de.html @@ -49,97 +49,72 @@

          Überblick

          -

          Mit dem Avatar Plugin kann man Kommentatoren in seinem Blog "ein Gesicht" geben. -Für jeden einzelnen Kommentator im Blog wird ein so genanntes Avatar zur Verfügung gestellt, das ihn repräsentiert. -Dafür werden unterschiedliche Mechanismen angeboten, die nacheinander durchprobiert werden, ob sie ein Avatar für -den Kommentator liefern.

          -

          Der erste Mechanismus, der ein Avatar findet, wird benutzt, nachfolgende Mechanismen -dann nicht mehr ausprobiert. Dies bedeutet, dass man die Methoden so sortieren sollte, dass die am meisten bevorzugte -zuerst ausprobiert wird. Methoden, die auf jeden Fall immer ein Avatar liefern, sollten als letzte konfiguriert werden, -da nach diesen natürlich keine weiteren Methoden ausprobiert werden. -

          -

          Wichtig: Dieses Plugin muss vor allen Plugins in der Liste stehen, die Links verändern, wie -z.B. das "Exit Tracking Plugin". Ansonsten können Avatare, die auf den Links der Kommentatoren beruhen, nicht -funktionieren.

          +

          Mit dem Avatar Plugin kann man Kommentatoren in seinem Blog "ein Gesicht" geben. Für jeden einzelnen Kommentator im Blog wird ein so genanntes Avatar zur Verfügung gestellt, das ihn repräsentiert. Dafür werden unterschiedliche Mechanismen angeboten, die nacheinander durchprobiert werden, ob sie ein Avatar für den Kommentator liefern.

          +

          Der erste Mechanismus, der ein Avatar findet, wird benutzt, nachfolgende Mechanismen dann nicht mehr ausprobiert. Dies bedeutet, dass man die Methoden so sortieren sollte, dass die am meisten bevorzugte zuerst ausprobiert wird. Methoden, die auf jeden Fall immer ein Avatar liefern, sollten als letzte konfiguriert werden, da nach diesen natürlich keine weiteren Methoden ausprobiert werden.

          +

          Wichtig: Dieses Plugin muss vor allen Plugins in der Liste stehen, die Links verändern, wie z.B. das "Exit Tracking Plugin". Ansonsten können Avatare, die auf den Links der Kommentatoren beruhen, nicht funktionieren.

          Hier folgt eine Beschreibung der aktuell verfügbaren Mechanismen, ein Avatar für einen Kommentator zu ermitteln:

          top

          Gravatar

          -

          Gravatar ist einer der bekanntesten Services für Benutzer Avatare. -Benutzer können sich bei diesem Service mit einer EMail registrieren und für sich ein Avatar Bild hinterlegen

          -

          Gravatare sind also von der vom Kommentator eingegebenen EMail abhängig. Nur wenn eine solche angegeben wurde, kann -ermittelt werden, ob für diese ein Avatar beim Gravatar Service hinterlegt wurde.

          +

          Gravatar ist einer der bekanntesten Services für Benutzer Avatare. Benutzer können sich bei diesem Service mit einer EMail registrieren und für sich ein Avatar Bild hinterlegen

          +

          Gravatare sind also von der vom Kommentator eingegebenen EMail abhängig. Nur wenn eine solche angegeben wurde, kann ermittelt werden, ob für diese ein Avatar beim Gravatar Service hinterlegt wurde.

          top

          Pavatar

          -

          Pavatare sind Avatare (Bilddateien), die der Schreber genau -für diesen Zweck auf seiner Homepage hinterlegt hat.

          -

          Im Gegensatz zu den recht ähnlichen Favataren kann man hier also ein eigenes Avatar Bild -mit einer beliebigen Auflösung hinterlegen.

          -

          Hier wird anhand der vom Kommentator angegebenen Homepage ermittelt, ob diese ein Pavatar liefert. Pavatare sind -also nur ladbar, wenn der Kommentator eine Homepage angegeben hat

          +

          Pavatare sind Avatare (Bilddateien), die der Schreber genau für diesen Zweck auf seiner Homepage hinterlegt hat.

          +

          Im Gegensatz zu den recht ähnlichen Favataren kann man hier also ein eigenes Avatar Bild mit einer beliebigen Auflösung hinterlegen.

          +

          Hier wird anhand der vom Kommentator angegebenen Homepage ermittelt, ob diese ein Pavatar liefert. Pavatare sind also nur ladbar, wenn der Kommentator eine Homepage angegeben hat

          top

          Favatar

          Dies ist ein Konzept mit dem viele Hompage Besitzer automatisch einen Avatar haben, ohne dass sie dafür irgendetwas tun müssen:

          -

          Das Blog holt sich hier einfach das favicon der Homepage, die der Benutzer als seine URL angegeben hat. -Dafür ist das favicon aber eben ein Icon und somit normaler Weise auch recht klein und nicht immer als Avatar geeignet.

          +

          Das Blog holt sich hier einfach das favicon der Homepage, die der Benutzer als seine URL angegeben hat. Dafür ist das favicon aber eben ein Icon und somit normaler Weise auch recht klein und nicht immer als Avatar geeignet.

          top

          Twitter

          -

          Falls der Kommentator als URL ein Twitter Profil angegeben hat, dann wird versucht, hier das Profilbild für diesen -Benutzer zu laden.

          -

          Anmerkung: Falls auch Favatare geladen werden sollen, dann muss Twitter vor diesen versucht werden, sonst wird das -Favicon von Twitter geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Twitter klar zu markieren.

          +

          Falls der Kommentator als URL ein Twitter Profil angegeben hat, dann wird versucht, hier das Profilbild für diesen Benutzer zu laden.

          +

          Anmerkung: Falls auch Favatare geladen werden sollen, dann muss Twitter vor diesen versucht werden, sonst wird das Favicon von Twitter geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Twitter klar zu markieren.

          top

          Identica

          -

          Dies ist ein spezielles Avatar für Identica Pingbacks. Es wird versucht, -das Profilbild des Benutzers zu laden, der den Pingback ausgelöst hat.

          -

          Anmerkung: Falls auch Favatare geladen werden sollen, dann muss Identica vor diesen versucht werden, sonst wird das -Favicon von Identica geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Identica klar zu markieren.

          +

          Dies ist ein spezielles Avatar für Identica Pingbacks. Es wird versucht, das Profilbild des Benutzers zu laden, der den Pingback ausgelöst hat.

          +

          Anmerkung: Falls auch Favatare geladen werden sollen, dann muss Identica vor diesen versucht werden, sonst wird das Favicon von Identica geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Identica klar zu markieren.

          top

          MyBlogLog

          -

          Dies ist wieder ein (dem Gravatar Service sehr ähnlicher) zentraler Service. MyBlogLog ist eigentlich ein Blog Community Service, -aber man kann aus diesem ebenfalls Avatare ermitteln

          -

          Das Vorhandensein eines MyBlogLog Avatars wird über die Homepage Angabe des Kommentators ermittelt. +

          Dies ist wieder ein (dem Gravatar Service sehr ähnlicher) zentraler Service. MyBlogLog ist eigentlich ein Blog Community Service, aber man kann aus diesem ebenfalls Avatare ermitteln

          +

          Das Vorhandensein eines MyBlogLog Avatars wird über die Homepage Angabe des Kommentators ermittelt.

          top

          Wavatar

          -

          Das Wavatar wird dynamisch erzeugt aus der Eingabe von Hompage und EMail des Kommentators. Es liefert für jeden Benutzer ein anderes -aber immer selbes Avatar. Da es immer ein Avatar liefert, werden alle nachfolgenden Avatar Methoden ignoriert. -Wavatare sehen in etwa wie folgt aus:

          +

          Das Wavatar wird dynamisch erzeugt aus der Eingabe von Hompage und EMail des Kommentators. Es liefert für jeden Benutzer ein anderes aber immer selbes Avatar. Da es immer ein Avatar liefert, werden alle nachfolgenden Avatar Methoden ignoriert. Wavatare sehen in etwa wie folgt aus:

          top

          MonsterID

          -

          MonsterID Avatare werden nach dem selben Mechanismus erzeugt, wie Wavatare und Indenticons, hier werden kleine niedliche "Monster" -aus den Benutzer Angaben erzeugt.

          +

          MonsterID Avatare werden nach dem selben Mechanismus erzeugt, wie Wavatare und Indenticons, hier werden kleine niedliche "Monster" aus den Benutzer Angaben erzeugt.

          Genau wie Wavatar und Identicon liefern sie immer einen Avatar für den Kommentator.

          top

          Identicon/YCon

          -

          Identicon werden nach dem selben Mechanismus erzeugt, wie Wavatare und MonsterIDs, sie sehen nur anders aus. Hier werden -abstrakte Gebilde erzeugt.

          +

          Identicon werden nach dem selben Mechanismus erzeugt, wie Wavatare und MonsterIDs, sie sehen nur anders aus. Hier werden abstrakte Gebilde erzeugt.

          Genau wie Wavatar und MonsterID liefern sie immer einen Avatar für den Kommentator.

          top

          Standardavatar

          -

          Die Methode "Standardavatar" liefert immer das selbe Avatar für alle Benutzer. Das Bild, das hier benutzt werden soll, kann -weiter unten konfiguriert werden.

          +

          Die Methode "Standardavatar" liefert immer das selbe Avatar für alle Benutzer. Das Bild, das hier benutzt werden soll, kann weiter unten konfiguriert werden.

          top

          @@ -148,63 +123,62 @@ weiter unten konfiguriert werden.

          Avatar laden über

          Hiermit wird die Reihenfolge festgelegt, in der versucht wird, ein Avatar für den Kommentator zu erzeugen.

          -

          Es gibt derzeit 6 Einschübe, mit denen die Reihenfolge festgelegt wird. Zu beachten ist, dass Methoden, -die auf jeden Fall ein Avatar liefern, alle nachfolgenden Methoden nicht zur Probe bringen.

          +

          Es gibt derzeit 6 Einschübe, mit denen die Reihenfolge festgelegt wird. Zu beachten ist, dass Methoden, die auf jeden Fall ein Avatar liefern, alle nachfolgenden Methoden nicht zur Probe bringen.

          top

          Standard-Avatar

          -

          URL zu ihrem Standard-Avatar. Hier müssen Sie den relativen oder absoluten Pfad bezogen auf ihre Server URL zu ihrem Standard Avatar angeben.

          +

          URL zu ihrem Standard-Avatar. Hier müssen Sie den relativen oder absoluten Pfad bezogen auf ihre Server URL zu ihrem Standard Avatar angeben.

          top

          In der Seitenleiste anzeigen

          -

          Sollen Avatar Bilder auch in der Seitenleiste (letze Kommentare) angezeigt werden?

          +

          Sollen Avatar Bilder auch in der Seitenleiste (letze Kommentare) angezeigt werden?

          top

          Avatar Typ anzeigen

          -

          Wenn angeschaltet, wird eine Zeile unterhalb des Kommentar Editors ausgegeben, die angibt, welche Avatar Typen aktuell unterstützt werden.

          +

          Wenn angeschaltet, wird eine Zeile unterhalb des Kommentar Editors ausgegeben, die angibt, welche Avatar Typen aktuell unterstützt werden.

          top

          Autorenname im ALT Attribut

          -

          Normaler Weise wird der Autorenname im TITLE Attribut des Avatar Bildes angegeben, das ALT Attribut wird mit einem * gefüllt, um das Seitenlayout nicht zu zerstören, wenn der Browser das Bild nicht laden kann. Allerdings wird blinden Lesern das ALT Attribut vorgelesen. Falls Sie diese Leser unterstützen wollen, sollten Sie diese Option einschalten.

          +

          Normaler Weise wird der Autorenname im TITLE Attribut des Avatar Bildes angegeben, das ALT Attribut wird mit einem * gefüllt, um das Seitenlayout nicht zu zerstören, wenn der Browser das Bild nicht laden kann. Allerdings wird blinden Lesern das ALT Attribut vorgelesen. Falls Sie diese Leser unterstützen wollen, sollten Sie diese Option einschalten.

          top

          Smarty Tag erzeugen

          -

          Wenn diese Option eingeschaltet ist, so wird das Avatar Bild nicht direkt in den Kommentar geschrieben, sondern es wird ein Smarty Tag {$comment.avatar} erzeugt, in dem der HTML Code des Images steht. Sie sollten diese Option nur einschalten, wenn sie wissen, dass ihr Template dieses Smarty Tag unterstützt. Ob das der Fall ist, sollten sie einfach ausprobieren.

          +

          Wenn diese Option eingeschaltet ist, so wird das Avatar Bild nicht direkt in den Kommentar geschrieben, sondern es wird ein Smarty Tag {$comment.avatar} erzeugt, in dem der HTML Code des Images steht. Sie sollten diese Option nur einschalten, wenn sie wissen, dass ihr Template dieses Smarty Tag unterstützt. Ob das der Fall ist, sollten sie einfach ausprobieren.

          top

          Ausrichtung

          -

          Mit dieser Option kann die Ausrichtung des Avatars im Kommentar konfiguriert werden, falls sie nicht die Smarty Tag Option verwenden. Bei der Smarty Tag Option muss die Ausrichtung über die entsprechende CSS Klasse im Stylesheet konfiguriert werden.

          +

          Mit dieser Option kann die Ausrichtung des Avatars im Kommentar konfiguriert werden, falls sie nicht die Smarty Tag Option verwenden. Bei der Smarty Tag Option muss die Ausrichtung über die entsprechende CSS Klasse im Stylesheet konfiguriert werden.

          top

          Bildgröße

          -

          Maximal dargestellte Größe des Avatar-Bildes in Pixeln

          +

          Maximal dargestellte Größe des Avatar-Bildes in Pixeln

          top

          Cache Zeit

          -

          Wenn Avatare zwischengespeichert werden sollen (empfohlen!), muss hier die Anzahl der Stunden eingetragen werden, die Bilder vom eigenen Server anstatt vom externen Service abgeholt werden sollen. Dies wird mehr Traffic auf diesem Blog Server verursachen, dafür macht es die Avatar Darstellung unabhängiger vom externen zentralen Server. "0" stellt das Zwischenspeichern ab.

          +

          Wenn Avatare zwischengespeichert werden sollen (empfohlen!), muss hier die Anzahl der Stunden eingetragen werden, die Bilder vom eigenen Server anstatt vom externen Service abgeholt werden sollen. Dies wird mehr Traffic auf diesem Blog Server verursachen, dafür macht es die Avatar Darstellung unabhängiger vom externen zentralen Server. "0" stellt das Zwischenspeichern ab.

          top

          Gravatar Indizierung

          -

          Kinderschutz :)

          +

          Kinderschutz :)

          top

          Gravatar Fallback

          -

          Gravatar implementiert einige eigene Fallback Methoden für den Fal, dass kein Gravatar für den Benutzer gefunden wurde. Es wurde ebenso Moster ID, Identicon und Wavatar. Wenn Du einen dieser Fallbacks einstellst, so wird keine weitere Methode nach Gravatar versucht, falls der Benutzer eine EMail angegeben hat.

          +

          Gravatar implementiert einige eigene Fallback Methoden für den Fal, dass kein Gravatar für den Benutzer gefunden wurde. Es wurde ebenso Moster ID, Identicon und Wavatar. Wenn Du einen dieser Fallbacks einstellst, so wird keine weitere Methode nach Gravatar versucht, falls der Benutzer eine EMail angegeben hat.

          top

          Gravatar Fallback immer benutzen

          -

          Gravatar Fallbacks auch dann benutzen, wenn der Benutzer keine EMail (aber eine URL oder einen Namen) eingegeben hat.

          +

          Gravatar Fallbacks auch dann benutzen, wenn der Benutzer keine EMail (aber eine URL oder einen Namen) eingegeben hat.

          top

          diff --git a/plugins/serendipity_event_gravatar/lang_cs.inc.php b/plugins/serendipity_event_gravatar/lang_cs.inc.php index dca79ec0..24941d51 100644 --- a/plugins/serendipity_event_gravatar/lang_cs.inc.php +++ b/plugins/serendipity_event_gravatar/lang_cs.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar má implementovaných nìkolik návratových metod pro pøípad, že pro požadovaného uživatele není znám žádný avatar. Implementovány jsou též Moster ID, Identicon a Wavatar. Pokud vyberete nìkterý z tìchto zínìných, nebudou uskuteèòovány žádné další pokusy o naètení avataru, pokud uživatel zadá email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'Vždy návratová hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v pøípadì, že uživatel nezadá email (zadá tedy url nebo jméno)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v pøípadì, že uživatel nezadá email (zadá tedy url nebo jméno)'); + diff --git a/plugins/serendipity_event_gravatar/lang_cz.inc.php b/plugins/serendipity_event_gravatar/lang_cz.inc.php index 5194bdb6..a133cb28 100644 --- a/plugins/serendipity_event_gravatar/lang_cz.inc.php +++ b/plugins/serendipity_event_gravatar/lang_cz.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar má implementovaných nìkolik návratových metod pro pøípad, ¾e pro po¾adovaného u¾ivatele není znám ¾ádný avatar. Implementovány jsou té¾ Moster ID, Identicon a Wavatar. Pokud vyberete nìkterý z tìchto zínìných, nebudou uskuteèòovány ¾ádné dal¹í pokusy o naètení avataru, pokud u¾ivatel zadá email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'V¾dy návratová hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Pou¾ívat návratovou hodnotu Gravatar i v pøípadì, ¾e u¾ivatel nezadá email (zadá tedy url nebo jméno)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Pou¾ívat návratovou hodnotu Gravatar i v pøípadì, ¾e u¾ivatel nezadá email (zadá tedy url nebo jméno)'); + diff --git a/plugins/serendipity_event_gravatar/lang_de.inc.php b/plugins/serendipity_event_gravatar/lang_de.inc.php index e04e584a..60d3261d 100644 --- a/plugins/serendipity_event_gravatar/lang_de.inc.php +++ b/plugins/serendipity_event_gravatar/lang_de.inc.php @@ -1,4 +1,4 @@ -Monster ID avatars are localy created monster images unique for each writer.'); @define('PLUGIN_EVENT_GRAVATAR_EXTLING_WARNING', 'CAUTION! This plugin has to be executed before any plugin changing links (like i.e. the exit tracking plugin)! ' . 'Else Pavatars, Favatars and MayBlogLog avatars won\'t work!'); + diff --git a/plugins/serendipity_event_gravatar/monsterid/monsterid.php b/plugins/serendipity_event_gravatar/monsterid/monsterid.php index 1370830a..4af69739 100644 --- a/plugins/serendipity_event_gravatar/monsterid/monsterid.php +++ b/plugins/serendipity_event_gravatar/monsterid/monsterid.php @@ -2,7 +2,7 @@ function build_monster($filename, $seed='',$size=''){ // init random seed - if($seed) srand( hexdec(substr(md5($seed),0,6)) ); + if ($seed) srand( hexdec(substr(md5($seed),0,6)) ); // throw the dice for body parts $parts = array( @@ -31,17 +31,17 @@ function build_monster($filename, $seed='',$size=''){ imagedestroy($im); // color the body - if($part == 'body'){ + if ($part == 'body') { $color = imagecolorallocate($monster, rand(20,235), rand(20,235), rand(20,235)); imagefill($monster,60,60,$color); } } // restore random seed - if($seed) srand(); + if ($seed) srand(); // resize if needed, then output - if($size && $size < 400){ + if ($size && $size < 400) { $out = @imagecreatetruecolor($size,$size); if (!$out) return false; // Problems creating image! imagecopyresampled($out,$monster,0,0,0,0,$size,$size,120,120); @@ -49,10 +49,12 @@ function build_monster($filename, $seed='',$size=''){ imagedestroy($out); imagedestroy($monster); return true; - }else{ + } else { //header ("Content-type: image/png"); imagepng($monster,$filename); imagedestroy($monster); return true; } } + +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php b/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php index 6a00aaa9..46c98627 100755 --- a/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php +++ b/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php @@ -1,20 +1,14 @@ -add('stackable', false); $propbag->add('author', 'Garvin Hicking, Grischa Brockhaus'); $propbag->add('requirements', array( - 'serendipity' => '0.7', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('version', PLUGIN_EVENT_GRAVATAR_VERSION); - $propbag->add('groups', array('IMAGES')); - $propbag->add('event_hooks', array( + $propbag->add('groups', array('IMAGES')); + $propbag->add('event_hooks', array( 'frontend_display' => true, 'frontend_comment' => true, 'external_plugin' => true, 'css' => true, )); - $configuration = array('longdescription','seperator'); - $config_methods = array(); + $configuration = array('longdescription', 'separator'); + $config_methods = array(); for ($idx=1; $idx<=PLUGIN_EVENT_GRAVATAR_METHOD_MAX; $idx++) { $config_methods[] = "method_$idx"; } - - + $propbag->add('configuration', array_merge($configuration, $config_methods, - array('defaultavatar', 'recent_entries', 'infoline', + array('defaultavatar', 'recent_entries', 'infoline', 'autoralt', 'smartyimage', 'align', 'size', 'cache', 'rating', 'gravatar_fallback','gravatar_fallback_use_always','warning') ) ); } - function introspect_config_item($name, &$propbag) { global $serendipity; - + $types = array( 'gravatar' => "Gravatar", 'favatar' => "Favatar", 'pavatar' => "Pavatar", 'twitter' => "Twitter", 'identica' => "Identica", - 'mybloglog' => "MyBlogLog", 'monsterid' => "Monster ID", 'wavatars' => "Wavatars", 'identicon' => "Identicon/YCon", @@ -101,7 +92,7 @@ class serendipity_event_gravatar extends serendipity_event return true; } } - + $gravatar_fallbacks = array( 'monsterid' => "Monster ID", 'wavatar' => "Wavatar", @@ -109,8 +100,9 @@ class serendipity_event_gravatar extends serendipity_event 'default' => "Gravatar symbol", 'none' => "---", ); - + switch($name) { + case 'smartyimage': $propbag->add('type', 'boolean'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_USE_SMARTY); @@ -136,13 +128,16 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('type', 'content'); $propbag->add('default', PLUGIN_EVENT_GRAVATAR_EXTLING_WARNING); break; + case 'longdescription': $propbag->add('type', 'content'); $propbag->add('default', PLUGIN_EVENT_GRAVATAR_LONG_DESCRIPTION); break; - case 'seperator': - $propbag->add('type', 'seperator'); + + case 'separator': + $propbag->add('type', 'separator'); break; + case 'gravatar_fallback': $propbag->add('type', 'select'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_FALLBACK); @@ -150,19 +145,16 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('select_values', $gravatar_fallbacks); $propbag->add('default', 'none'); break; + case 'gravatar_fallback_use_always': $propbag->add('type', 'boolean'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS); $propbag->add('description',PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC); $propbag->add('default', false); break; - + case 'defaultavatar': - if (version_compare('1.2',$serendipity['version'])==1) {// 1 if 1.2 higher than actual version number - $propbag->add('type', 'string'); - } else { - $propbag->add('type', 'media'); - } + $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR_DESC); $propbag->add('default', ''); @@ -193,7 +185,7 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_RATING); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_RATING_DESC); - $propbag->add('radio', array( + $propbag->add('radio', array( 'value' => array('-', 'G', 'PG', 'R', 'X'), 'desc' => array(PLUGIN_EVENT_GRAVATAR_RATING_NO,PLUGIN_EVENT_GRAVATAR_RATING_G, PLUGIN_EVENT_GRAVATAR_RATING_PG, PLUGIN_EVENT_GRAVATAR_RATING_R, PLUGIN_EVENT_GRAVATAR_RATING_X) )); @@ -222,20 +214,23 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('default', false); break; + default: + return false; } - return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = PLUGIN_EVENT_GRAVATAR_NAME; } /** * Will be called while saving settings */ - function cleanup() { - // *Always* clean up the cache after changing configuration, else + function cleanup() + { + // *Always* clean up the cache after changing configuration, else // the configuration change will first be seen after cache time is run out. $this->log("-------"); $cacheDir = $this->getCacheDirectory(); @@ -249,13 +244,13 @@ class serendipity_event_gravatar extends serendipity_event } } } - - function event_hook($event, &$bag, &$eventData, $addData = null) + + function event_hook($event, &$bag, &$eventData, $addData = null) { global $serendipity; static $cache = null; static $method = null; - + $hooks = &$bag->get('event_hooks'); if ($cache === null) { @@ -269,7 +264,7 @@ class serendipity_event_gravatar extends serendipity_event if (isset($hooks[$event])) { switch($event) { - + // Catch external_plugin event for fresh fetching avatar icons // This will response with an image (not with html code) case 'external_plugin': @@ -305,49 +300,51 @@ class serendipity_event_gravatar extends serendipity_event } else { return false; } - - break; - // Print out image html for the user avatar into the frontend_display - case 'frontend_display': + // Print out image html for the user avatar into the frontend_display + case 'frontend_display': if (!isset($eventData['comment'])) { - return true; + return true; } $this->printAvatarHtml($eventData, $addData); - - return true; break; + case 'css': // avatar css has to be emitted no matter of smarty enabled: the sidebar needs it. - //$useSmarty = serendipity_db_bool($this->get_config('smartyimage', false)); - //if (!$useSmarty && !(strpos($eventData, '.avatar_left') || strpos($eventData, '.avatar_rigth'))) { - if (!(strpos($eventData, '.avatar_left') || strpos($eventData, '.avatar_rigth'))) { -?> + // CSS class does NOT exist by user customized template styles, include default + if (false === (strpos($eventData, '.avatar_left') || strpos($eventData, '.avatar_rigth'))) { + $eventData .= ' + +/* serendipity_event_gravatar start */ + .avatar_left { - float:left; - margin-left:0px; - margin-right:10px; + float:left; + margin-left:0px; + margin-right:10px; } .avatar_right { - float:right; - margin-right:0px; - margin-left:10px; + float:right; + margin-right:0px; + margin-left:10px; } -get_config('infoline', true))){ + if (!serendipity_db_bool($this->get_config('infoline', 'true'))){ return false; } - + // The contact form uses the comments, too. We don't want this information line there and detect it by the missing properties entry. if (empty($eventData['properties'])){ return false; @@ -378,7 +375,7 @@ class serendipity_event_gravatar extends serendipity_event $supported_methods .= (empty($supported_methods) ? '' : ', ') . 'Monster ID'; break; case 'identicon': - $supported_methods .= (empty($supported_methods) ? '' : ', ') . 'Identicon/Ycon'; + $supported_methods .= (empty($supported_methods) ? '' : ', ') . 'Identicon/Ycon'; break; case 'wavatars': $supported_methods .= (empty($supported_methods) ? '' : ', ') . 'Wavatars'; @@ -386,54 +383,55 @@ class serendipity_event_gravatar extends serendipity_event } } echo '
          ' . sprintf(PLUGIN_EVENT_GRAVATAR_SUPPORTED, $supported_methods) . '
          '; - return true; break; default: return false; + } + return true; } else { return false; } } - + /** * Returns HTML displaying the user avatar. This is done without any call to external servers. * If a cached avatar is found, the image will have it as SRC, else the SRC will be filled with * an external_plugin call, that will try to fetch a fresh avatar later. - * */ - function printAvatarHtml(&$eventData, &$addData){ + function printAvatarHtml(&$eventData, &$addData) + { global $serendipity; - - $useSmarty = serendipity_db_bool($this->get_config('smartyimage', false)); - + + $useSmarty = serendipity_db_bool($this->get_config('smartyimage', 'false')); + // comments sidebar plugin doesn't support smarty, so switch it off, if detected if ($addData['from'] == 'serendipity_plugin_comments:generate_content') { - if (!serendipity_db_bool($this->get_config('recent_entries', true))) { + if (!serendipity_db_bool($this->get_config('recent_entries', 'true'))) { return false; } $useSmarty = false; - } - + } + if (empty($eventData['url']) && empty($eventData['email']) && empty($eventData['author']) && !$this->supportDefaultAvatar()) { $this->log("No url nor email handed and default avatar not supported!"); return false; } - + if (!empty($eventData['url']) && !preg_match('@^https*://@i',$eventData['url'])){ $this->log("Changed wrong url: {$eventData['url']}"); $eventData['url'] = 'http://' . $eventData['url']; } - + $url = ''; if (!empty($eventData['url'])) { - $url = $eventData['url']; + $url = $eventData['url']; } - - if (!empty($eventData['url'])) { // Strip Query paras - $urlparts = explode('?', $eventData['url']); - $url = $urlparts[0]; + + if (!empty($eventData['url'])) { // Strip Query params + $urlparts = explode('?', $eventData['url']); + $url = $urlparts[0]; } $title = ''; $author = 'unknown'; @@ -441,38 +439,38 @@ class serendipity_event_gravatar extends serendipity_event $author = (function_exists('serendipity_specialchars') ? serendipity_specialchars($eventData['author']) : htmlspecialchars($eventData['author'], ENT_COMPAT, LANG_CHARSET)); $title = $author; } - + if (isset($eventData['email']) && !empty($eventData['email'])) { - $email_md5 = md5(strtolower($eventData['email'])); + $email_md5 = md5(strtolower($eventData['email'])); } else { - $email_md5 = ''; + $email_md5 = ''; } if ($this->cache_seconds > 0) { $cache_file = $this->getCacheFilePath($eventData); // if no cache filename was generated, no usable user data was found. - // this meens: it won't be possible to generate any image, so break at this point. + // this meens: it won't be possible to generate any image, so break at this point. if (!isset($cache_file)) { - return false; + return false; } $this->log("comment print: " . print_r($eventData, true)); - // If there is a cache file that's new enough, return the image immidiatly + // If there is a cache file that's new enough, return the image immidiatly if (file_exists($cache_file) && (time() - filemtime($cache_file) < $this->cache_seconds)) { $url = $serendipity['baseURL'] . $serendipity['indexFile'] . '?/' - . $this->getPermaPluginPath() . '/cachedAvatar_' . md5($url) . '_' . $email_md5 + . $this->getPermaPluginPath() . '/cachedAvatar_' . md5($url) . '_' . $email_md5 . '_' . md5($author); } else { // no image cached yet, call external plugin hook for fetching a new one $url = $serendipity['baseURL'] . $serendipity['indexFile'] . '?/' - . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 + . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 . '_' . $this->urlencode($author) . '_' . $eventData['id']; } - + } else { // call external plugin hook for fetching a new one $url = $serendipity['baseURL'] . $serendipity['indexFile'] . '?/' - . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 + . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 . '_' . $this->urlencode($author) . '_' . $eventData['id']; } - + $image_html = $this->generateImageHtml($url, $title, $this->get_config('align', 'right'), !$useSmarty, $this->generateAvatarCssClass($addData)); if ($useSmarty) { $eventData['avatar'] = $image_html; @@ -480,15 +478,16 @@ class serendipity_event_gravatar extends serendipity_event else { $eventData['comment'] = $image_html . $eventData['comment']; } - + return true; } - + /** - * Generates a CSS class for the avatar depending where it is displayed. + * Generates a CSS class for the avatar depending where it is displayed. * Defaults to comment_avatar in comments and is unique for plugins. */ - function generateAvatarCssClass($addData){ + function generateAvatarCssClass($addData) + { if (empty($addData)) { return "avatar"; } @@ -497,18 +496,19 @@ class serendipity_event_gravatar extends serendipity_event $css = $parts[0]; return ($css == 'functions_entries'? 'comment' : $css ) . '_avatar'; } - + /** * Tests wether the default avatar is supported */ - function supportDefaultAvatar(){ - + function supportDefaultAvatar() + { + // Check if a default avatar is defined $default = $this->getDefaultImageConfiguration(); if (empty($default['defaultavatar'])) { return false; } - + // check if default avatar method is configured as one of the avatar methods. for($methodnr = 1; $methodnr <= PLUGIN_EVENT_GRAVATAR_METHOD_MAX; $methodnr++){ $method = $this->get_config("method_" . $methodnr); @@ -517,7 +517,7 @@ class serendipity_event_gravatar extends serendipity_event if ($method == 'none'){ return false; } - + // return true if default avatar method is found if ($method == 'default'){ return true; @@ -525,20 +525,21 @@ class serendipity_event_gravatar extends serendipity_event } return false; } - + /** * Will try to fetch a fresh avatar image by user configuration. If retreiving was successfull, - * the image will cached and displayed as binary image response. + * the image will cached and displayed as binary image response. */ - function fetchAvatar(&$eventData) { + function fetchAvatar(&$eventData) + { global $serendipity; - + $methodnr = 1; - + // Assure existance of cache directory @mkdir($this->getCacheDirectory()); $default = $this->getDefaultImageConfiguration(); - + // load configuration of last run $lastrun_fname = $this->getCacheFilePath($eventData) . '.lastrun'; if (file_exists($lastrun_fname) && (time() - filemtime($lastrun_fname))< $this->cache_seconds) { @@ -552,7 +553,7 @@ class serendipity_event_gravatar extends serendipity_event $methodnr = $this->avatarConfiguration['methodnr']; $this->log("MethodNr by lastrun: $methodnr"); } - } + } $success = false; while (!$success && $methodnr <= PLUGIN_EVENT_GRAVATAR_METHOD_MAX) { @@ -573,16 +574,13 @@ class serendipity_event_gravatar extends serendipity_event case 'identica': $success = $this->fetchIdentica($eventData); break; - case 'mybloglog': - $success = $this->fetchMyBlogLog($eventData); - break; case 'monsterid': $success = $this->fetchMonster($eventData); break; case 'wavatars': $success = $this->fetchWavatar($eventData); break; - case 'identicon': + case 'identicon': $success = $this->fetchYcon($eventData); break; case 'default': @@ -610,13 +608,14 @@ class serendipity_event_gravatar extends serendipity_event /** * Fetches a Gravatar and returns it as a binary image response. - * + * * @param array eventdata the data given by the event * @param int cache hours for fetching images from cache - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchGravatar(&$eventData){ + function fetchGravatar(&$eventData) + { global $serendipity; $this->log("Gravatar: url=" . $eventData['url'] . " email_md5=" . $eventData['email_md5'] . " author=" .$eventData['author']) ; @@ -625,30 +624,30 @@ class serendipity_event_gravatar extends serendipity_event return false; } if (empty($eventData['email_md5'])) { - if (!serendipity_db_bool($this->get_config('gravatar_fallback_use_always', false)) || (empty($eventData['url']) && empty($eventData['author']))) { - return false; - } - else { - if (empty($eventData['url'])) $email_md5 = md5($eventData['author']); - else $email_md5 = md5($eventData['url']); - } + if (!serendipity_db_bool($this->get_config('gravatar_fallback_use_always', 'false')) || (empty($eventData['url']) && empty($eventData['author']))) { + return false; + } + else { + if (empty($eventData['url'])) $email_md5 = md5($eventData['author']); + else $email_md5 = md5($eventData['url']); + } } else { - $email_md5 = $eventData['email_md5']; + $email_md5 = $eventData['email_md5']; } $default = $this->getDefaultImageConfiguration(); - + $gravatar_fallback = $this->get_config("gravatar_fallback"); $fallback = ""; if ($gravatar_fallback != 'none') { - $fallback = '&d=' . $gravatar_fallback; + $fallback = '&d=' . $gravatar_fallback; } else { - //$defaultavatar = urlencode((empty($default['defaultavatar'])? $serendipity['baseURL'] . 'dummy.gif': 'http://' . $_SERVER['SERVER_NAME'] . $default['defaultavatar'])); - $defaultavatar = urlencode($serendipity['serendipityHTTPPath'] . 'dummy456.gif123'); // Add a not existing image to produce an error we can check - $fallback = '&d=' . $defaultavatar; + //$defaultavatar = urlencode((empty($default['defaultavatar'])? $serendipity['baseURL'] . 'dummy.gif': 'http://' . $_SERVER['SERVER_NAME'] . $default['defaultavatar'])); + $defaultavatar = urlencode($serendipity['serendipityHTTPPath'] . 'dummy456.gif123'); // Add a not existing image to produce an error we can check + $fallback = '&d=' . $defaultavatar; } - + $urltpl = 'http://www.gravatar.com/avatar.php?' . 'gravatar_id=' . $email_md5 . $fallback @@ -657,79 +656,44 @@ class serendipity_event_gravatar extends serendipity_event // Assure a default avatar, because we need it for testing if the avatar given by Gravatar is a dummy image. $this->log("Gravatar Link: " . $urltpl) ; - + $success = $this->saveAndResponseAvatar($eventData, $urltpl, 1); $this->avatarConfiguration['gravatar_found'] = $success; + return $success; } - /** - * Tries to add a MyBlogLog.com avatar to the comment. - * - * @param array eventdata the data given by the event - * @param int cache hours for fetching images from cache - * @param array default default values for avatar images - * - * @return boolean true, if Avatar was found and added to the comment buffer - */ - function fetchMyBlogLog(&$eventData){ - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - global $serendipity; - // Was lastrun successfull? - if (isset($this->avatarConfiguration['mybloglog_found']) && !$this->avatarConfiguration['mybloglog_found']) { - return false; - } - if (empty($eventData['url'])) { - return false; - } - - // Get configured plugin path: - $pluginPath = 'plugin'; - if (isset($serendipity['permalinkPluginPath'])){ - $pluginPath = $serendipity['permalinkPluginPath']; - } - - $author_url = 'http://pub.mybloglog.com/coiserv.php?' - . 'href=' . $eventData['url'] - . '&n=' . (!empty($eventData['author']) ? $eventData['author'] : '*'); - - $check = $this->saveAndResponseMyBlogAvatar($eventData, $author_url); - $this->avatarConfiguration['mybloglog_found'] = $check; - - return $check; - } - - /** * Tries to add a favatar or pavatar (depending on the given mode) to the comment. - * + * * @param array eventdata the data given by the event * @param int cache hours for fetching images from cache - * @param string mode has to be 'P' for Pavatar or 'F' for Favatar loading. - * + * @param string mode has to be 'P' for Pavatar or 'F' for Favatar loading. + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchPFavatar(&$eventData, $mode="F"){ - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + function fetchPFavatar(&$eventData, $mode="F") + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; global $serendipity; - + $default = $this->getDefaultImageConfiguration(); - + $url = $eventData['url']; if (empty($url)) { return false; } $favicon = false; - + $this->log($mode . " - Trying to fetch for $url"); - + // Try to get the URL $parts = @parse_url($url); if (!is_array($parts)) { return false; } - + $ip = @gethostbyname($parts['host']); if (!$ip || $ip == $parts['host']) { return false; @@ -738,45 +702,42 @@ class serendipity_event_gravatar extends serendipity_event $this->log($mode . " - URL ok."); $cache_file = $this->getCacheFilePath($eventData); - + // Load icon url detected in last run if (isset($this->avatarConfiguration['img_url_'.$mode])){ $favicon = $this->avatarConfiguration['img_url_'.$mode]; $this->log($mode . " - using last run url: $favicon"); } - + if ($favicon === false) { // use optimization for localhost $islocalhost = ($_SERVER['HTTP_HOST'] == $parts['host']); - + if (function_exists('serendipity_request_start')) { serendipity_request_start(); } - - + // Evaluate URL of P/Favatar - $req = new HTTP_Request($url, array('allowRedirects' => true, 'maxRedirects' => 3)); + $options = array('follow_redirects' => true, 'max_redirects' => 3); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $options); $favicon = false; // code 200: OK, code 30x: REDIRECTION $responses = "/(200 OK)|(30[0-9] Found)/"; // |(30[0-9] Moved) - if (!$islocalhost && (PEAR::isError($req->sendRequest()) || preg_match($responses, $req->getResponseCode()))) { - // nothing to do, - $favicon = false; - $this->log($mode . " - Error fetching $url: " . $req->getResponseCode()); - } - else { - $pavatarHeaderIcon = $req->getResponseHeader("X-Pavatar"); - $fContent = $req->getResponseBody(); + try { + $response = $req->send(); + $pavatarHeaderIcon = $response->getHeader("X-Pavatar"); + $fContent = $response->getBody(); if ($mode=='P' && !empty($pavatarHeaderIcon)){ $faviconURL = $pavatarHeaderIcon; $this->log("Found x-pavatar in head: $faviconURL"); } - else if (!$islocalhost && - ($mode=='P' && preg_match('/]+rel="pavatar"[^>]+?href="([^"]+?)"/si', $fContent, $matches)) || - ($mode=='F' && preg_match('/]+rel="(?:shortcut )?icon"[^>]+?href="([^"]+?)"/si', $fContent, $matches)) - ) + else if (!$islocalhost && ($mode=='P' && preg_match('/]+rel="pavatar"[^>]+?href="([^"]+?)"/si', $fContent, $matches)) || + ($mode=='F' && preg_match('/]+rel="(?:shortcut )?icon"[^>]+?href="([^"]+?)"/si', $fContent, $matches))) { - // Attempt to grab an avatar link from their webpage url $linkUrl = (function_exists('serendipity_entity_decode') ? serendipity_entity_decode($matches[1]) : html_entity_decode($matches[1], ENT_COMPAT, LANG_CHARSET)); if (substr($linkUrl, 0, 1) == '/') { @@ -790,61 +751,65 @@ class serendipity_event_gravatar extends serendipity_event } else { $faviconURL = $url . '/' . $linkUrl; } - + $this->log($mode . " - Found link rel to url $faviconURL"); - } - else { + } else { // If unsuccessful, attempt to "guess" the favicon location $urlParts = parse_url($url); $faviconURL = $urlParts['scheme'] . '://' . $urlParts['host'] . ($mode=='F'?'/favicon.ico':'/pavatar.png'); $this->log($mode . " - Not found link rel, guessing $faviconURL"); } - + // Split image URL and check if image is available using a fast and timed out socket: - $url_parts = @parse_url($faviconURL); if (!is_array($url_parts)) { $url_parts = array(); } - + if (!empty($url_parts['path'])) { $documentpath = $url_parts['path']; } else { $documentpath = '/'; } - + if (!empty($url_parts['query'])) { $documentpath .= '?' . $url_parts["query"]; } - + if (empty($url_parts['port'])) { $url_parts['port'] = '80'; } - + if (!empty($url_parts['host'])) { $socket = @fsockopen($url_parts['host'], $url_parts['port'], $errno, $errstr, 30); - + if ($socket) { fwrite($socket, "HEAD " . $documentpath . " HTTP/1.0\r\nHost: {$url_parts['host']}\r\n\r\n"); $http_response = fgets($socket, 25); - + $this->log($mode . ' Testing server ' . $url_parts['host'] . " dopath: $documentpath - HEAD Response: $http_response"); - - if (preg_match($responses, $http_response)) // We only test for server existance + + if (preg_match($responses, $http_response)) // We only test for server existance { $favicon = $faviconURL; } fclose($socket); } } - + // Remember the last result of the P/Favatar search - $this->avatarConfiguration['img_url_'.$mode] = $favicon; + $this->avatarConfiguration['img_url_'.$mode] = $favicon; + } catch (HTTP_Request2_Exception $e) { + if (!$islocalhost && preg_match($responses, $response->getStatus())) { + $favicon = false; + $this->log($mode . " - Error fetching $url: " . $response->getStatus()); + } } + if (function_exists('serendipity_request_end')) { serendipity_request_end(); } - } // if favicon url not loaded from cache + } // if favicon url not loaded from cache if (!empty($favicon)) { $this->log($mode . " - found at: $favicon"); @@ -853,11 +818,11 @@ class serendipity_event_gravatar extends serendipity_event else { return false; } - } - - function fetchTwitter(&$eventData) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + + function fetchTwitter(&$eventData) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; // Was lastrun successfull? if (isset($this->avatarConfiguration['twitter_found']) && !$this->avatarConfiguration['twitter_found']) { @@ -873,7 +838,7 @@ class serendipity_event_gravatar extends serendipity_event } catch (Exception $e) { $this->log($e); } - + if (empty($eventData['url'])) { return false; } @@ -887,22 +852,33 @@ class serendipity_event_gravatar extends serendipity_event $path = trim($parts['path']); $dirs = explode('/',$path); $twittername = $dirs[1]; - //if ($twittername=='#!') $twittername = $dirs[2]; - + $this->log("Twitteruser found ($url): $twittername"); - + $twitter_search = 'http://search.twitter.com/search.atom?q=from%3A' . $twittername . '&rpp=1'; serendipity_request_start(); - $req = new HTTP_Request($twitter_search); - $req->sendRequest(); - $this->last_error = $req->getResponseCode(); - if ($req->getResponseCode() != 200) { - $this->last_error = $req->getResponseCode(); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($twitter_search, HTTP_Request2::METHOD_GET, $options); + try { + $response = $req->send(); + + $this->last_error = $response->getStatus(); + if ($response->getStatus() != 200) { + throw new HTTP_Request2_Exception("Could not search on twitter"); + } + $response = trim($response->getBody()); + + } catch (HTTP_Request2_Exception $e) { + $this->last_error = $response->getStatus(); serendipity_request_end(); $this->log("Twitter Error: {$this->last_error}"); return false; } - $response = trim($req->getResponseBody()); + serendipity_request_end(); $parser = xml_parser_create(); $vals=array(); $index=array(); @@ -916,20 +892,21 @@ class serendipity_event_gravatar extends serendipity_event break; } } - if ($success) { + if ($success) { $success = $this->saveAndResponseAvatar($eventData, $img_url); } } $this->avatarConfiguration['twitter_found'] = $success; return $success; } - return false; - + return false; + } - - function fetchIdentica(&$eventData) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - + + function fetchIdentica(&$eventData) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + // Was lastrun successfull? if (isset($this->avatarConfiguration['identica_found']) && !$this->avatarConfiguration['identica_found']) { return false; @@ -938,21 +915,30 @@ class serendipity_event_gravatar extends serendipity_event return false; } $url = $eventData['url']; - + if (preg_match('@^http://identi\.ca/notice/(\d+)$@',$url,$matches)) { $status_id = $matches[1]; $search = "http://identi.ca/api/statuses/show/$status_id.xml"; serendipity_request_start(); - $req = new HTTP_Request($search); - $req->sendRequest(); - $this->last_error = $req->getResponseCode(); - if ($req->getResponseCode() != 200) { - $this->last_error = $req->getResponseCode(); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($search, HTTP_Request2::METHOD_GET, $options); + try { + $response = $req->send(); + $this->last_error = $response->getStatus(); + if ($response->getStatus() != 200) { + throw new HTTP_Request2_Exception("Could not search on identica"); + } + $response = trim($response->getBody()); + } catch (HTTP_Request2_Exception $e) { + $this->last_error = $response->getStatus(); serendipity_request_end(); $this->log("Identica Error: {$this->last_error}"); return false; } - $response = trim($req->getResponseBody()); serendipity_request_end(); $parser = xml_parser_create(); $vals=array(); $index=array(); @@ -966,20 +952,21 @@ class serendipity_event_gravatar extends serendipity_event return $success; } - return false; - + return false; + } - + /** * Shows a monster id avatar. - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchMonster(&$eventData){ + function fetchMonster(&$eventData) + { require_once dirname(__FILE__) . '/monsterid/monsterid.php'; - + $seed = md5($eventData['author']) . $eventData['email_md5'] . md5($eventData['url']); $default = $this->getDefaultImageConfiguration(); $size = $default['size']; @@ -997,19 +984,20 @@ class serendipity_event_gravatar extends serendipity_event $this->fetchDefault(); } - return true; + return true; } /** * Shows a monster id avatar. - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchWavatar(&$eventData){ + function fetchWavatar(&$eventData) + { require_once dirname(__FILE__) . '/wavatars/wavatars.php'; - + $seed = md5($eventData['author']) . $eventData['email_md5'] . md5($eventData['url']); $default = $this->getDefaultImageConfiguration(); $size = $default['size']; @@ -1027,21 +1015,22 @@ class serendipity_event_gravatar extends serendipity_event $this->fetchDefault(); } - return true; + return true; } /** * Shows an identicon/ycon avatar (generated locally). * http://www.docuverse.com/blog/donpark/2007/01/18/visual-security-9-block-ip-identification * http://www.evilissexy.com/ - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchYcon(&$eventData){ + function fetchYcon(&$eventData) + { require_once dirname(__FILE__) . '/ycon/ycon.image.php'; - + $seed = md5($eventData['author']) . $eventData['email_md5'] . md5($eventData['url']); $default = $this->getDefaultImageConfiguration(); $size = $default['size']; @@ -1059,24 +1048,25 @@ class serendipity_event_gravatar extends serendipity_event $this->fetchDefault(); } - return true; + return true; } - + /** * Shows the local default avatar. - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchDefault(){ + function fetchDefault() + { global $serendipity; - + $default = $this->getDefaultImageConfiguration(); if (empty($default['defaultavatar'])) { return false; } - + $this->log("FetchDefault"); // Set fetch date. Show will use this for caclculating cache. $this->avatarConfiguration['fetch_date'] = time(); @@ -1087,65 +1077,67 @@ class serendipity_event_gravatar extends serendipity_event $this->log("DefaultUrl RPL: " . $defaultUrl); $this->log("FetchDefault: DOC_ROOT" . $_SERVER["DOCUMENT_ROOT"]); $this->show($_SERVER["DOCUMENT_ROOT"] . '/' . $defaultUrl); - + return true; } - /** - * Caches an avatar and streams it back to the browser. + * Caches an avatar and streams it back to the browser. */ - function saveAndResponseAvatar($eventData, $url, $allow_redirection = 3){ - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + function saveAndResponseAvatar($eventData, $url, $allow_redirection = 3) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; global $serendipity; $fContent = null; - + if (function_exists('serendipity_request_start')) { serendipity_request_start(); } - - if ($allow_redirection) { - $request_pars['allowRedirects'] = true; - $request_pars['maxRedirects'] = $allow_redirection; - } - else { - $request_pars['allowRedirects'] = false; - } - - $req = new HTTP_Request($url, $request_pars); - // if the request leads to an error we don't want to have it: return false - if (PEAR::isError($req->sendRequest()) || ($req->getResponseCode() != '200')) { - $fContent = null; - if ($req->getResponseCode() != '200') { - $this->log("Avatar fetch error: " . $req->getResponseCode() . " for url=" . $url); - } - else { - $this->log("Avatar fetch error: PEAR reported ERROR for url=" . $url); - } - + if ($allow_redirection) { + $request_pars['follow_redirects'] = true; + $request_pars['max_redirects'] = $allow_redirection; } else { + $request_pars['follow_redirects'] = false; + } + + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $request_pars['ssl_verify_peer'] = false; + } + + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $request_pars); + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception("Could not search on identica"); + } // Allow only images as Avatar! - $mime = $req->getResponseHeader("content-type"); + $mime = $response->getHeader("content-type"); + $this->avatarConfiguration['mime-type'] = $mime; $this->log("Avatar fetch mimetype: $mime" . " for url=" . $url); $mimeparts = explode('/',$mime); if (count($mimeparts)==2 && $mimeparts[0]=='image') { - $fContent = $req->getResponseBody(); + $fContent = $response->getBody(); } - } - + } catch (HTTP_Request2_Exception $e) { + $fContent = null; + $this->log("Avatar fetch error: " . $e); + + } + if (function_exists('serendipity_request_start')) { serendipity_request_end(); } - + // if no content was fetched, return false if (!isset($fContent) || empty($fContent)){ $this->log("Avatar fetch: no Content!"); return false; } - $cache_file = $this->cacheAvatar($eventData, $fContent,$req); + $cache_file = $this->cacheAvatar($eventData, $fContent); if ($cache_file) { $this->show($cache_file); } @@ -1156,135 +1148,18 @@ class serendipity_event_gravatar extends serendipity_event return true; } - function saveAndResponseMyBlogAvatar($eventData, $url) { - global $serendipity; - - $request_pars['allowRedirects'] = false; - - $this->log("saveAndResponseMyBlogAvatar: " . $url); - - // First a dummy icon is fetched. This is done by fetching a MyBlog Avatar for a not existing domain. - // If we have done this before, the dummy_md5 is already set, so we can skip this fetching here. - if (!isset($this->mybloglog_dummy_md5)) { - - $cachefilename = '_mybloglogdummy.md5'; - $cache_file = $this->getCacheDirectory() . '/' . $cachefilename; - - // Look up the cache for the md5 of the MyBlogLog dummy icon saved earlier: - if (file_exists($cache_file) && time() - filemtime($cache_file) < $this->cache_seconds){ - $fp = fopen($cache_file, 'rb'); - $this->mybloglog_dummy_md5 = fread($fp, filesize($cache_file)); - fclose($fp); - $this->log("Loaded dummy MD5: " . $this->mybloglog_dummy_md5); - } - else { // dummy MD5 file was not cached or was too old. We have to fetch the dummy icon now - $dummyurl = 'http://pub.mybloglog.com/coiserv.php?href=http://grunz.grunz.grunz&n=*'; - $this->log("trying dummyUrl: " . $dummyurl); - if (function_exists('serendipity_request_start')) { - serendipity_request_start(); - } - $reqdummy = new HTTP_Request($dummyurl, $request_pars); - if (PEAR::isError($reqdummy->sendRequest()) || ($reqdummy->getResponseCode() != '200')) { - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - $this->avatarConfiguration["mybloglog_dummy_error!"]=$reqdummy->getResponseCode(); - // unable to fetch a dummy picture! - $this->log("unable to fetch a dummy picture!" . $dummyurl); - return false; // what can we say else.. - } - else { - - // Allow only images as Avatar! - $mime = $reqdummy->getResponseHeader("content-type"); - $this->log("MyBlogLog Avatar fetch mimetype: $mime"); - $mimeparts = explode('/',$mime); - if (count($mimeparts)!=2 || $mimeparts[0]!='image') { - // unable to fetch a dummy picture! - $this->log("unable to fetch a dummy picture!" . $dummyurl); - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - return false; // what can we say else.. - } - - $fContent = $reqdummy->getResponseBody(); - $this->mybloglog_dummy_md5 = md5($fContent); - // Save MD5 of dummy icon for later runs - $fp = fopen($cache_file, 'wb'); - fwrite($fp,$this->mybloglog_dummy_md5); - fclose($fp); - $this->log("dummy MD5 saved: " . $this->mybloglog_dummy_md5); - } - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - } - } - - // Fetch the correct icon and compare: - if (isset($this->mybloglog_dummy_md5)) { - $cachefilename = $this->getCacheFilePath($eventData); - - // fetch the icon - if (function_exists('serendipity_request_start')) { - serendipity_request_start(); - } - $this->log("Fetching mbl: " . $url); - $req = new HTTP_Request($url, $request_pars); - if (PEAR::isError($req->sendRequest()) || ($req->getResponseCode() != '200')) { - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - $this->log("Unable to fetch the correct image!"); - // Unable to fetch the correct image! - return false; - } - else { - // Test, if this realy is an image! - $mime_type = $req->getResponseHeader('content-type'); - if (!empty($mime_type)) $mt_parts = explode('/',$mime_type); - if (isset($mt_parts) && is_array($mt_parts) && $mt_parts[0] == 'image') { - $fContent = $req->getResponseBody(); - $avtmd5 = md5($fContent); - $this->log("mbl image fetched, MD5: " . $avtmd5); - if ($this->mybloglog_dummy_md5 != $avtmd5) { - $this->log("caching mbl image: " . $cachefilename); - $this->cacheAvatar($eventData,$fContent,$req); - } - } else { - $this->log("MyBlogLog did not return an image: " . $mime_type ); - $avtmd5 = $this->mybloglog_dummy_md5; // Declare it as dummy in order not to save it. - } - - } - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - - if ($this->mybloglog_dummy_md5 == $avtmd5){ // This seems to be a dummy avatar! - return false; - } - else { - $this->show($cachefilename); - return true; - } - } - return false; - } - /** * Caches an avatar file. - * + * * @param string cache_file name of file used for caching * @param string fContent content to be cached - * @param request req optional the request that produced this content (for logging) */ - function cacheAvatar($eventData, $fContent, $req=null){ + function cacheAvatar($eventData, $fContent) + { $cache_file = $this->getCacheFilePath($eventData); $this->log("cacheAvatar: " . $cache_file); - + // Save image @mkdir($this->getCacheDirectory()); $fp = @fopen($cache_file, 'wb'); @@ -1300,20 +1175,14 @@ class serendipity_event_gravatar extends serendipity_event fwrite($fp, $fContent); fclose($fp); - if (isset($req)){ - // Remember mime type - $mime_type = $req->getResponseHeader('content-type'); - $this->avatarConfiguration['mime-type'] = $mime_type; - } return $cache_file; } - - /** * Return binary response for an image */ - function show($filename) { + function show($filename) + { $this->log("show: $filename"); if (!file_exists($filename)) { header('X-Avatar: No-Image'); @@ -1328,16 +1197,16 @@ class serendipity_event_gravatar extends serendipity_event if (!isset($mime_type)) { $size = @getimagesize($filename); $mime_type = $size['mime']; - $this->avatarConfiguration['mime-type'] = $mime_type; + $this->avatarConfiguration['mime-type'] = $mime_type; } - + // test wether this really is (at least declared as) an image! // else deny it. $mime_parts = explode('/', $mime_type); if (count($mime_parts)!=2 || $mime_parts[0]!='image') { return false; } - + $fp = @fopen($filename, "rb"); if ($fp) { if (isset($this->avatarConfiguration['fetch_date'])) { @@ -1372,67 +1241,71 @@ class serendipity_event_gravatar extends serendipity_event * @param string title the title for that image * @return string the html code representing the Avatar */ - function generateImageHtml($url, $title = null, $align = 'right', $addAlignClass = true, $cssClass = "comment_avatar"){ - + function generateImageHtml($url, $title = null, $align = 'right', $addAlignClass = true, $cssClass = "comment_avatar") + { $default = $this->getDefaultImageConfiguration(); - + if (empty($title)){ $title = 'Avatar'; } if (PLUGIN_EVENT_GRAVATAR_DEBUG) $title .= ' (Avatar Plugin V.' . PLUGIN_EVENT_GRAVATAR_VERSION . ' DEBUG)'; - + // set alignment by configuration $cssAlign = ''; if ($addAlignClass && ($align == 'right' || $align == 'left')) $cssAlign = "avatar_$align"; $alt = '*'; - if (serendipity_db_bool($this->get_config('autoralt', false))) { - $alt = $title; + if (serendipity_db_bool($this->get_config('autoralt', 'false'))) { + $alt = $title; } return '' . $alt . ''; } - + /** * Just generates comments into the comment block. Used for debugging only! */ - function generateComment(&$eventData, $comment){ + function generateComment(&$eventData, $comment) + { $eventData['comment'] = "-- $comment --
          \n" . $eventData['comment']; } /** * Returns the avatar cache directory */ - function getCacheDirectory(){ + function getCacheDirectory() + { global $serendipity; if ($this->cache_dir === null) { $this->cache_dir = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/serendipity_event_avatar'; } - return $this->cache_dir; + return $this->cache_dir; } - + /** * Returns the Path of the avatar cache file by the given user data found in eventData * If no relevant user data was found, null is returned. - * + * */ - function getCacheFilePath($eventData){ + function getCacheFilePath($eventData) + { global $serendipity; - + $cache_filename = $this->getCacheFileName($eventData); if (!isset($cache_filename)) { return null; } return $this->getCacheDirectory() .'/' . $cache_filename;; } - + /** * Returns the URL of the cached avatar by the given user data found in eventData * If no relevant user data was found, null is returned. - * + * */ - function getCacheFileUrl($eventData){ + function getCacheFileUrl($eventData) + { global $serendipity; - + $cache_filename = $this->getCacheFileName($eventData); if (!isset($cache_filename)) { return null; @@ -1443,32 +1316,35 @@ class serendipity_event_gravatar extends serendipity_event /** * Returns a URL encoded and signed variable. */ - function urlencode($url) { + function urlencode($url) + { $hash = md5($this->instance_id . $url); return $hash . str_replace ('_', '%5F', urlencode($url)); } - - function urldecode($url) { + + function urldecode($url) + { $hash = substr($url, 0, 32); $real_url = urldecode(substr($url, 32)); if ($hash == md5($this->instance_id . $real_url)) { // Valid hash was found. - return $real_url; + return $real_url; } else { // Invalid hash. return ''; } } - + /** * Returns only the name of the cached avatar by the given user data found in eventData * If no relevant user data was found, null is returned. - * + * */ - function getCacheFileName($eventData){ + function getCacheFileName($eventData) + { global $serendipity; - + if (!isset($eventData['email']) && !isset($eventData['email_md5']) && !isset($eventData['url'])) { return null; } @@ -1479,19 +1355,20 @@ class serendipity_event_gravatar extends serendipity_event else if (isset($eventData['email'])) { $email_md5 = md5(strtolower($eventData['email'])); } - + $author_md5= isset($eventData['author'])? md5($eventData['author']) : ''; $url_md5 = isset($eventData['url'])? md5($eventData['url']) : '' ; return $url_md5 . '_' . $email_md5 . '_' . $author_md5; } - + /** * Builds an array of default image configuration */ - function getDefaultImageConfiguration() { + function getDefaultImageConfiguration() + { global $serendipity; - + if ($this->defaultImageConfigurationdefault === null) { $this->defaultImageConfigurationdefault = array( 'defaultavatar' => ($this->get_config('defaultavatar')==''?'': $this->get_config('defaultavatar', '')), @@ -1502,26 +1379,29 @@ class serendipity_event_gravatar extends serendipity_event return $this->defaultImageConfigurationdefault; } - function getPermaPluginPath() { + function getPermaPluginPath() + { global $serendipity; - // Get configured plugin path: + // Get configured plugin path: $pluginPath = 'plugin'; if (isset($serendipity['permalinkPluginPath'])){ $pluginPath = $serendipity['permalinkPluginPath']; } - + return $pluginPath; - + } - - function log($message){ + + function log($message) + { if (!PLUGIN_EVENT_GRAVATAR_DEBUG) return; $fp = fopen($this->getCacheDirectory() . '.log','a'); fwrite($fp, $message . "\n"); fclose($fp); } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/wavatars/wavatars.php b/plugins/serendipity_event_gravatar/wavatars/wavatars.php index 9e075a6f..9be2cac5 100644 --- a/plugins/serendipity_event_gravatar/wavatars/wavatars.php +++ b/plugins/serendipity_event_gravatar/wavatars/wavatars.php @@ -99,9 +99,9 @@ Builds the avatar. function wavatar_build ($filename, $seed, $size) { - if (!function_exists (imagecreatetruecolor)) { - return false; - } + if (!function_exists (imagecreatetruecolor)) { + return false; + } $face = 1 + (hexdec (substr ($seed, 1, 2)) % (WAVATAR_FACES)); $bg_color = (hexdec (substr ($seed, 3, 2)) % 240); $fade = 1 + (hexdec (substr ($seed, 5, 2)) % (WAVATAR_BACKGROUNDS)); @@ -142,4 +142,4 @@ function wavatar_build ($filename, $seed, $size) return true; } -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/ycon/ChangeLog b/plugins/serendipity_event_gravatar/ycon/ChangeLog deleted file mode 100644 index 5a2ec1c6..00000000 --- a/plugins/serendipity_event_gravatar/ycon/ChangeLog +++ /dev/null @@ -1,366 +0,0 @@ -# - * Allows other plugins to fetch user metadata via - avatar_fetch_userinfos hook. - * supports !# twitter links now, too. - -Version 1.57: (brockhaus) - * Better Gravatar handling, as the call changed a little - * Doesn't accept existing but empty images anymore. - -Version 1.56: (brockhaus) ------------------------------------------------------------------------- - * Removed inline styles, added class avatar_right and avatar_left. - If not found set in css, the plugin will emit a default style for - those two. - -Version 1.55: (brockhaus) ------------------------------------------------------------------------- - * Twitter and identica where not fetched correctly if fetched first. - -Version 1.54: ------------------------------------------------------------------------- - * Made PLUGIN_GRAVATAR_SUPPORTED recognize %s as variable for - list of supported services - -Version 1.52: ------------------------------------------------------------------------- - * Changed display of supported avatars in the comment area in order - to allow nice linebreaks. - -Version 1.51: ------------------------------------------------------------------------- - * Use strtolower() for mail names - -Version 1.49 (brockhaus) ------------------------------------------------------------------------- - * Pavatar in blogs having redirection didn't work, if Pavatar link - was only available in rel link info. - -Version 1.48 (brockhaus) ------------------------------------------------------------------------- - * FIX: PHP compatibility was broken since 1.46 :-/ - * Added Identica Avatar. - This is mainly used for Identica Pingbacks and should be used in - front of Favatar, else the Identica sign will show up. - * Code cleanup. - -Version 1.47 (brockhaus) ------------------------------------------------------------------------- - * Disabled debug logging into template_c - -Version 1.46 (brockhaus) ------------------------------------------------------------------------- - - * Added Twitter Avatar (if URL points to a twitter profile) - This is mainly used for Tweetbacks and should be used in front of - Favatar, else the twitter sign will show up. - * Code cleanup. - -Version 1.45 (brockhaus) ------------------------------------------------------------------------- - - * Helpfiles - * Cleanup. - -Version 1.44 (brockhaus) ------------------------------------------------------------------------- - - * Added buildin wavatar suport. - * Support for Gravatar fallbacks identyicon, monsterid and wavatar. - * Optimized trackback avatars: Querypars will be stripped from URL. - Now in example S8Y blogs always get the same Avatar cached, not - one per trackback. - -Version 1.43 (brockhaus) ------------------------------------------------------------------------- - - * Option for adding the authors name to the ALT attribute of the - avatar image. Normaly this is filled with a *, but blind people - depend on the ALT tag. - -Version 1.42 (brockhaus) ------------------------------------------------------------------------- - - * Encoded _ in user urls in order to differ them from the - seperators. urlencode doesn't encode _. Thanks to Tino Schwarze - finding and fixing this. - -Version 1.41 (garvinhicking) ------------------------------------------------------------------------- - - * Fixed Last-Modified Header of avatar images. - -Version 1.40 () ------------------------------------------------------------------------- - - * Added ycon support (mo, http://moblog.wiredwings.com) - ------------------------------------------------------------------------- -Version 1.39 (brockhaus): - - * Monster Avatars are cached now, too, as creating them costs time. - ------------------------------------------------------------------------- -Version 1.38 (brockhaus): - - * Support for Monster ID avatars (details found on - http://www.splitbrain.org/go/monsterid) - * Crashed while fresh installing and cache time set to 0 - * Allows configuring absolute path to standard avatar now. - * After saving the configuration now the cache is *always* cleared, - in order to make the changes visible immidiately even if caching - is enabled. - * If the plugin is unable to write into the cache, it will log it - in debug mode and show the default image, if no cached file found. - ------------------------------------------------------------------------- -Version 1.37 (brockhaus): - - * The avatar type infoline below the comments editor is optional now - ------------------------------------------------------------------------- -Version 1.36 (brockhaus): - - * Added new option: You can define, that the plugin should not - produce avatar image directly but a smarty tag only. If this - option is switched on, you can define in your comments template, - where the avatar should be displayed using the smarty tag - $comment.comment_avatar - * Css class of avatar will change depending on where it is - displayed. For normal comments it will be "comment_avatar", for the - recent entries plugin it will be "serendipity_plugin_comments_avatar" - in order to have the possibility to easily style it. - * Avatar alignment configuration: The configured alignment will be - used, if the avatar is written directliy (no smarty tag). - * New option for switching on/off the avatar images in the sidebar - plugin (recent comments). - * Supported avatar methods where displayed in the contact form - plugin too, but this made no sense. Disabled it there. - * Some more changes in the language files. - ------------------------------------------------------------------------- -Version 1.35 (brockhaus): - - * Corrected errors in English language file. (Thanks to Don!) - ------------------------------------------------------------------------- -Version 1.34 (brockhaus): - - * Gravatars rating doesn't work reliable. My G rated Gravatar is only - shown, if I use Gravatar X rating. :-/ - Added an option to switch off Gravatars rating parameter (what - should be the same as using X rating) - ------------------------------------------------------------------------- -Version 1.33 (brockhaus): - - * Pavatar: X-Pavatar Header is supported now again and is the first - pavatar autodetect method used. - ------------------------------------------------------------------------- -Version 1.32 (brockhaus): - - * MyBlogLog default avatar was not detected correctly anmore. :-/ - * If no email nor url is given, but default avatar is defined, now - the default avatar is displayed. - ------------------------------------------------------------------------- -Version 1.31 (brockhaus): - - * Changed call-time pass-by-reference bug (fetchAvatar) - ------------------------------------------------------------------------- -Version 1.30 (brockhaus): - - * Standard Avatar was not displayed in subdirectory blog - installtions. - * Gravatar link was slightly wrong (but working) - ------------------------------------------------------------------------- -Version 1.29 (brockhaus): - - * Bugfix 1.27 added http:// even if no URL was given at all. - ------------------------------------------------------------------------- -Version 1.28 (brockhaus): - - * With Serendipity 1.1 it was not possible to configure a default - avatar. The configuration was not 1.1 compatible. - ------------------------------------------------------------------------- -Version 1.27 (brockhaus): - - * If the writer entered his url as www.domain.de instead of - http://www.domain.de, the Avatar was not always loaded correctly - ------------------------------------------------------------------------- -Version 1.26 (brockhaus): - - * MyBlogLog changed avatar calling slightly resuling MyBlogLog Avatar - fallback not working anymore. - ------------------------------------------------------------------------- -Version 1.25 (garvinhicking): - - * Replaced align with style attributes, as there is no align in - XHTML - ------------------------------------------------------------------------- -Version 1.24 (brockhaus): - - * Check MyBlogLog result if it really is an image. - * Cleaning up cache directory when setting cache to 0. - * Debug logging disabled. - ------------------------------------------------------------------------- -Version 1.23 (brockhaus): - - * While fresh fetching P/Favatars, the Plugin will only accept - responses declared as image by the remote server. This will - prevent accepting potential error html pages as Avatar images. - ------------------------------------------------------------------------- -Version 1.22 (brockhaus): - - * Fetch redirected P/Favatars, too. - ------------------------------------------------------------------------- -Version 1.21 (brockhaus): - - * Avatar fetching was broken when cache was disabled. - * Browser was not able to cache default avatars, because a wrong - cache time (in the past) was sent. - * Checks, if cached file looks like an image, before sending it - to the client. - ------------------------------------------------------------------------- -Version 1.20 (brockhaus): - - * Avatar image title is the author's name now instead of Avatar (V.) - ------------------------------------------------------------------------- -Version 1.19 (brockhaus): - - * Made the browser cache avatars resulting in a very good - performance boost! - ------------------------------------------------------------------------- -Version 1.18 (brockhaus): - - * Debugging loging disabled. - ------------------------------------------------------------------------- -Version 1.17 (brockhaus): - - * If cache is enabled, *everything* is cached now. Known writers - won't produce *any* external server call, if allready cached. - This is a very nice performance boost! Thanks to garvin for hinting - me. - * Anti hacking patches by garvinhickins - ------------------------------------------------------------------------- -Version 1.16 (garvinhicking): - - * Coding style - ------------------------------------------------------------------------- -Version 1.14 (brockhaus): - - * Fallback possibility for MyBlogLog implemented! :-) But it is - slow even with caching optimazation. MBL shouldn't be the first - option. - * Fifth method slot in configuration, as MBL now supports fallback, too. - ------------------------------------------------------------------------- -Version 1.13 (brockhaus): - - * Advice changed: It is not the statistic plugin producing not - working Pavatars/Favatars but the exit tracking plugin. - ------------------------------------------------------------------------- -Version 1.12 (brockhaus): - - * MyBlogLog avatars are cached now, too. - - * Pages redirecting to a default page, if the requested item was not - found, are supported now, too. Former the Avatar Plugin assumed, - that the default page is the P/Favatar. - - * Default configuration now ordered like this: Gravatar -> Pavatar - -> Favatar -> Default Avatar. - - * Added advice, that this plugin has to be executed before any link - changing plugin. - - * Reading configured plugin path. Former it was 'plugin' always. - - * Dropped gravatar border setting, as it is not working (anymore?) - ------------------------------------------------------------------------- -Version 1.11, testing version not released to CVS/Spartacus (brockhaus): - - * Fallback for Gravatar working! But this shows an default avatar - to Gravatar, not mattering the settings. So revoked this setting. - ------------------------------------------------------------------------- -Version 1.10 (brockhaus): - - * Pavatar / Avatar information where never loaded from cache - - * .. but after beeing loaded from cache it produced an endless - request loop for images loaded from the local blog (if comment - sidebar plugin was enabled) - - * Height setting for image was called "heigth".. :-/ - - * Gravarar caching didn't work reliable, if a default avatar was - given. - ------------------------------------------------------------------------- -Version 1.9 (brockhaus): - - * While searching for Pavatar, the Favatar was loaded as Pavatar, - if no Pavatar image but a favicon was found. (Thanks to El Burro) - ------------------------------------------------------------------------- -Version 1.8 (brockhaus): - - * Plugin was unable to load Favatars/Pavatars, if a redirection was - signaled at the url given by the commentor as homepage. Garvin's - blog is such a page.. - ------------------------------------------------------------------------- -Version 1.7 (brockhaus): - - * Added support for Pavatars (www.pavatar.com) - - * Added support for MyBlogLog Avatars (www.mybloglog.com) - - * The order for trying avatar methods and what kind of avatars are - supported is now configurable. - - * Standard avatar may be one of them (should be last) - - * Option for not giving the default avatar to gravatar even if one - is defined. (We want less dataprofiles..) - - * Fetch default avatar via mediadatabase in the configuration. - - * Image size is assured now in HTML code. - - * Below the comment only actual configured avatar methods are shown - as supported. - ------------------------------------------------------------------------- -Version 1.6 (garvinhickins): - ------------------------------------------------------------------------- -Version 1.5 (garvinhickins): - ------------------------------------------------------------------------- -Version 1.4 (garvinhickins): - ------------------------------------------------------------------------- -Version 1.3 (garvinhickins): - - * Fix errors on invalid domains diff --git a/plugins/serendipity_event_gravatar/ycon/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_gravatar/ycon/UTF-8/lang_pl.inc.php deleted file mode 100644 index e69de29b..00000000 diff --git a/plugins/serendipity_event_gravatar/ycon/ycon.image.php b/plugins/serendipity_event_gravatar/ycon/ycon.image.php index b20a117b..6033e271 100644 --- a/plugins/serendipity_event_gravatar/ycon/ycon.image.php +++ b/plugins/serendipity_event_gravatar/ycon/ycon.image.php @@ -2,13 +2,13 @@ require_once 'ycon.php'; function build_ycon($filename, $seed='',$size=''){ - $hash = md5($seed); - $image = ycon($hash, $size, 255, 255, 255); - imagetruecolortopalette($image, false, 64); -// header('Content-type: image/png'); - imagepng($image,$filename); - imagedestroy($image); - return true; + $hash = md5($seed); + $image = ycon($hash, $size, 255, 255, 255); + imagetruecolortopalette($image, false, 64); +// header('Content-type: image/png'); + imagepng($image,$filename); + imagedestroy($image); + return true; } ?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/ycon/ycon.php b/plugins/serendipity_event_gravatar/ycon/ycon.php index 5574765f..21c04da2 100644 --- a/plugins/serendipity_event_gravatar/ycon/ycon.php +++ b/plugins/serendipity_event_gravatar/ycon/ycon.php @@ -52,7 +52,7 @@ function ycon($hash, $size, $bg_red, $bg_green, $bg_blue) $red = hexdec(substr($hash, 0, 3)) % 12; // 0-192 for color $green = hexdec(substr($hash, 3, 3)) % 12; // (in increments of 16) $blue = hexdec(substr($hash, 6, 3)) % 12; - + $corners = hexdec(substr($hash, 9, 1)) % 16; // 14 gylphs $corners_i = hexdec(substr($hash, 10, 1)) % 2; // inverted? $corners_a = hexdec(substr($hash, 11, 1)) % 4; // 4 rotations @@ -93,7 +93,7 @@ function ycon($hash, $size, $bg_red, $bg_green, $bg_blue) $shape = (int)($center / 2); $inverted = (($center % 2) == 0); - + draw_glpyh($draw_icon, $square, $square, $square, $color, $background, $shape, 0, $inverted); imagecopyresampled($icon, $draw_icon, 0, 0, 0, 0, $size, $size, $draw_size, $draw_size); @@ -230,7 +230,7 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat 0, $full, $full, 0); break; - + case 13: // squat diamond $points = array( $quarter, 0, @@ -238,7 +238,7 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat $quarter, $full, 0, $half); break; - + case 14: // hourglass on its side (and kinda' squished...) $points = array( 0, $half, @@ -253,7 +253,7 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat $half, $half, $half, $full); break; - + default: die('$shape must be in range [0..13] (' . $shape . ' is out of range)'); } @@ -282,4 +282,5 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat // draw the bastard imagefilledpolygon($image, $points, count($points) / 2, $drawing_color); } -?> + +?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php index e1d8d5ed..42219422 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php @@ -1,23 +1,24 @@ - diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php index d85742a4..957ffde6 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php index 2c102066..064810bb 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php @@ -1,20 +1,21 @@ - * EN-Revision: 690 */ @@ -16,4 +16,3 @@ @define('PLUGIN_EVENT_MAILER_CONVERTP', '¿Convertir párrafo HTML en saltos de linea?'); @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Añade saltos de linea luego de cada párrafo HTML. Esta opción es muy útil si también activas la eliminación HTML, así tus párrafos se mantendrán.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php index 99f83618..bdecb148 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php index e36f7d0e..b2d10588 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 817 */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Sending'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'é›»å­ãƒ¡ãƒ¼ãƒ«ã«ã¦ã“ã®ã‚¨ãƒ³ãƒˆãƒªã‚’é€ä¿¡ã™ã‚‹'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php index 3d5e4317..6f6ea02b 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php @@ -1,16 +1,15 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_MAILER_NAME', 'ê¸€ì„ ì „ìžìš°íŽ¸ìœ¼ë¡œ 발송'); - @define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 ê¸€ì„ ì „ìžìš°íŽ¸ì„ í†µí•´ 특정 주소로 발송함'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', 'ì „ìžìš°íޏ 수신ìž'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 ê¸€ì„ ë°œì†¡í•  ì „ìžìš°íޏ 주소 (ë©”ì¼ë§ 리스트 권장)'); - @define('PLUGIN_EVENT_MAILER_LINK', 'ê¸€ì— ëŒ€í•œ ë§í¬ 발송'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', 'ì „ìžìš°íŽ¸ì— ì›ë³¸ 글로 ê°ˆ 수 있는 ë§í¬ë¥¼ í¬í•¨ì‹œí‚´'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'ì „ìžìš°íޏì—서 HTML 태그를 제거함'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML ë¬¸ë‹¨ì„ ìƒˆ 줄로 변환'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML ë¬¸ë‹¨ì´ ë나는 ë¶€ë¶„ì— ìƒˆ ì¤„ì„ ì¶”ê°€í•©ë‹ˆë‹¤. HTML 제거 ê¸°ëŠ¥ì„ ì‚¬ìš©í•  때 문단 구조를 ìœ ì§€í•˜ëŠ”ë° ìœ ìš©í•˜ê²Œ 쓸 수 있습니다.'); +@define('PLUGIN_EVENT_MAILER_NAME', 'ê¸€ì„ ì „ìžìš°íŽ¸ìœ¼ë¡œ 발송'); +@define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 ê¸€ì„ ì „ìžìš°íŽ¸ì„ í†µí•´ 특정 주소로 발송함'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', 'ì „ìžìš°íޏ 수신ìž'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 ê¸€ì„ ë°œì†¡í•  ì „ìžìš°íޏ 주소 (ë©”ì¼ë§ 리스트 권장)'); +@define('PLUGIN_EVENT_MAILER_LINK', 'ê¸€ì— ëŒ€í•œ ë§í¬ 발송'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', 'ì „ìžìš°íŽ¸ì— ì›ë³¸ 글로 ê°ˆ 수 있는 ë§í¬ë¥¼ í¬í•¨ì‹œí‚´'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'ì „ìžìš°íޏì—서 HTML 태그를 제거함'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML ë¬¸ë‹¨ì„ ìƒˆ 줄로 변환'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML ë¬¸ë‹¨ì´ ë나는 ë¶€ë¶„ì— ìƒˆ ì¤„ì„ ì¶”ê°€í•©ë‹ˆë‹¤. HTML 제거 ê¸°ëŠ¥ì„ ì‚¬ìš©í•  때 문단 구조를 ìœ ì§€í•˜ëŠ”ë° ìœ ìš©í•˜ê²Œ 쓸 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php index 1d421d15..816afbef 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'WysyÅ‚anie.'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'WyÅ›lij ten wpis e-mailem'); - -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php index 3185043b..54efdc48 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - @@ -15,4 +15,3 @@ @define('PLUGIN_EVENT_MAILER_CONVERTP', 'Converter parágrafos de HTML em mudanças de linha?'); @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Junta mudanças de linha a seguir a cada parágrafo. Esta opção é muito útil se também escolher a eliminação de etiquetas HTML, pois assim manter-se-ão os parágrafos.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php index 8c4ab2f1..16b86aaa 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php @@ -21,4 +21,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'PoslaÅ¥ tento príspevok e-mailom'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'PoslaÅ¥ vÅ¡etkým autorom'); -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php index 01c72de6..387876f4 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,14 +12,14 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_MAILER_NAME', '坄逿–‡ç« '); - @define('PLUGIN_EVENT_MAILER_DESC', 'å¯è®“æ‚¨å¯„é€æ–°ç™¼ä½ˆçš„æ–‡ç« åˆ°é›»å­éƒµä»¶ä¿¡ç®±'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電å­ä¿¡ç®± (建議:電å­å ±)'); - @define('PLUGIN_EVENT_MAILER_LINK', '包括文章連çµï¼Ÿ'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連çµä½å€ã€‚'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'è½‰æ› HTML æ®µè½æˆæ–°è¡Œï¼Ÿ'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於æ¯å€‹ HTML 的段è½ã€‚如果您開啟 移除 HTML? 的功能,這會檢查æ¯å€‹æœªè‡ªå·±æ®µè¡Œçš„æ®µè½ï¼Œç„¶å¾Œè‡ªå‹•幫您段行。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_NAME', '坄逿–‡ç« '); +@define('PLUGIN_EVENT_MAILER_DESC', 'å¯è®“æ‚¨å¯„é€æ–°ç™¼ä½ˆçš„æ–‡ç« åˆ°é›»å­éƒµä»¶ä¿¡ç®±'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電å­ä¿¡ç®± (建議:電å­å ±)'); +@define('PLUGIN_EVENT_MAILER_LINK', '包括文章連çµï¼Ÿ'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連çµä½å€ã€‚'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'è½‰æ› HTML æ®µè½æˆæ–°è¡Œï¼Ÿ'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於æ¯å€‹ HTML 的段è½ã€‚如果您開啟 移除 HTML? 的功能,這會檢查æ¯å€‹æœªè‡ªå·±æ®µè¡Œçš„æ®µè½ï¼Œç„¶å¾Œè‡ªå‹•幫您段行。'); + diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php index 0dfa9e70..f5377232 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php @@ -13,4 +13,5 @@ @define('PLUGIN_EVENT_MAILER_RECIPIENTS', '电å­é‚®ä»¶æ”¶ä»¶äºº (ä¸åŒæ”¶ä»¶äººä¹‹é—´ä½¿ç”¨ç©ºæ ¼åŒºåˆ†)'); @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '你决定ä¸å°†æ­¤æ–‡ç« é€šè¿‡ç”µå­é‚®ä»¶å‘é€å‡ºåŽ»ï¼Œå› æ­¤è¯¥æ–‡ç« æ²¡æœ‰é€šè¿‡ç”µå­é‚®ä»¶å‘é€å‡ºåŽ»ã€‚'); @define('PLUGIN_EVENT_MAILER_SENDING', '电å­é‚®ä»¶å‘é€ä¸­â€¦â€¦'); -@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电å­é‚®ä»¶å‘逿–‡ç« '); \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电å­é‚®ä»¶å‘逿–‡ç« '); + diff --git a/plugins/serendipity_event_mailer/lang_bg.inc.php b/plugins/serendipity_event_mailer/lang_bg.inc.php index a1ec98b6..5fab92fc 100644 --- a/plugins/serendipity_event_mailer/lang_bg.inc.php +++ b/plugins/serendipity_event_mailer/lang_bg.inc.php @@ -1,23 +1,24 @@ - diff --git a/plugins/serendipity_event_mailer/lang_cz.inc.php b/plugins/serendipity_event_mailer/lang_cz.inc.php index cee4ef4a..34aaec6b 100644 --- a/plugins/serendipity_event_mailer/lang_cz.inc.php +++ b/plugins/serendipity_event_mailer/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_mailer/lang_de.inc.php b/plugins/serendipity_event_mailer/lang_de.inc.php index 66f93350..75bd5a24 100644 --- a/plugins/serendipity_event_mailer/lang_de.inc.php +++ b/plugins/serendipity_event_mailer/lang_de.inc.php @@ -1,20 +1,21 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -23,3 +23,4 @@ @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Send to all authors'); @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'Keep images and hyperlinks when removing html?'); @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Only applies when removing HTML-tags from the mail. If enabled, images and hyperlinks will be put inside the text, when disabled those placeholders will also be removed.'); + diff --git a/plugins/serendipity_event_mailer/lang_es.inc.php b/plugins/serendipity_event_mailer/lang_es.inc.php index 53624b1f..3b7581ad 100644 --- a/plugins/serendipity_event_mailer/lang_es.inc.php +++ b/plugins/serendipity_event_mailer/lang_es.inc.php @@ -1,6 +1,6 @@ - * EN-Revision: 690 */ @@ -19,4 +19,4 @@ @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Esta entrada no fue enviada via E-Mail porque decidiste no hacerlo.'); @define('PLUGIN_EVENT_MAILER_SENDING', 'Enviando'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Enviar esta entrada via E-Mail'); -?> \ No newline at end of file + diff --git a/plugins/serendipity_event_mailer/lang_fr.inc.php b/plugins/serendipity_event_mailer/lang_fr.inc.php index b49b5921..863f70ab 100644 --- a/plugins/serendipity_event_mailer/lang_fr.inc.php +++ b/plugins/serendipity_event_mailer/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/lang_ja.inc.php b/plugins/serendipity_event_mailer/lang_ja.inc.php index e36f7d0e..b2d10588 100644 --- a/plugins/serendipity_event_mailer/lang_ja.inc.php +++ b/plugins/serendipity_event_mailer/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 817 */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Sending'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'é›»å­ãƒ¡ãƒ¼ãƒ«ã«ã¦ã“ã®ã‚¨ãƒ³ãƒˆãƒªã‚’é€ä¿¡ã™ã‚‹'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_mailer/lang_ko.inc.php b/plugins/serendipity_event_mailer/lang_ko.inc.php index 3d5e4317..6f6ea02b 100644 --- a/plugins/serendipity_event_mailer/lang_ko.inc.php +++ b/plugins/serendipity_event_mailer/lang_ko.inc.php @@ -1,16 +1,15 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_MAILER_NAME', 'ê¸€ì„ ì „ìžìš°íŽ¸ìœ¼ë¡œ 발송'); - @define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 ê¸€ì„ ì „ìžìš°íŽ¸ì„ í†µí•´ 특정 주소로 발송함'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', 'ì „ìžìš°íޏ 수신ìž'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 ê¸€ì„ ë°œì†¡í•  ì „ìžìš°íޏ 주소 (ë©”ì¼ë§ 리스트 권장)'); - @define('PLUGIN_EVENT_MAILER_LINK', 'ê¸€ì— ëŒ€í•œ ë§í¬ 발송'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', 'ì „ìžìš°íŽ¸ì— ì›ë³¸ 글로 ê°ˆ 수 있는 ë§í¬ë¥¼ í¬í•¨ì‹œí‚´'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'ì „ìžìš°íޏì—서 HTML 태그를 제거함'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML ë¬¸ë‹¨ì„ ìƒˆ 줄로 변환'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML ë¬¸ë‹¨ì´ ë나는 ë¶€ë¶„ì— ìƒˆ ì¤„ì„ ì¶”ê°€í•©ë‹ˆë‹¤. HTML 제거 ê¸°ëŠ¥ì„ ì‚¬ìš©í•  때 문단 구조를 ìœ ì§€í•˜ëŠ”ë° ìœ ìš©í•˜ê²Œ 쓸 수 있습니다.'); +@define('PLUGIN_EVENT_MAILER_NAME', 'ê¸€ì„ ì „ìžìš°íŽ¸ìœ¼ë¡œ 발송'); +@define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 ê¸€ì„ ì „ìžìš°íŽ¸ì„ í†µí•´ 특정 주소로 발송함'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', 'ì „ìžìš°íޏ 수신ìž'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 ê¸€ì„ ë°œì†¡í•  ì „ìžìš°íޏ 주소 (ë©”ì¼ë§ 리스트 권장)'); +@define('PLUGIN_EVENT_MAILER_LINK', 'ê¸€ì— ëŒ€í•œ ë§í¬ 발송'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', 'ì „ìžìš°íŽ¸ì— ì›ë³¸ 글로 ê°ˆ 수 있는 ë§í¬ë¥¼ í¬í•¨ì‹œí‚´'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'ì „ìžìš°íޏì—서 HTML 태그를 제거함'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML ë¬¸ë‹¨ì„ ìƒˆ 줄로 변환'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML ë¬¸ë‹¨ì´ ë나는 ë¶€ë¶„ì— ìƒˆ ì¤„ì„ ì¶”ê°€í•©ë‹ˆë‹¤. HTML 제거 ê¸°ëŠ¥ì„ ì‚¬ìš©í•  때 문단 구조를 ìœ ì§€í•˜ëŠ”ë° ìœ ìš©í•˜ê²Œ 쓸 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_mailer/lang_pl.inc.php b/plugins/serendipity_event_mailer/lang_pl.inc.php index 0e66a81d..99a0226a 100644 --- a/plugins/serendipity_event_mailer/lang_pl.inc.php +++ b/plugins/serendipity_event_mailer/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Wysy³anie.'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Wy¶lij ten wpis e-mailem'); - -?> diff --git a/plugins/serendipity_event_mailer/lang_pt_PT.inc.php b/plugins/serendipity_event_mailer/lang_pt_PT.inc.php index 09c71392..4f570809 100644 --- a/plugins/serendipity_event_mailer/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_mailer/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - @@ -15,4 +15,3 @@ @define('PLUGIN_EVENT_MAILER_CONVERTP', 'Converter parágrafos de HTML em mudanças de linha?'); @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Junta mudanças de linha a seguir a cada parágrafo. Esta opção é muito útil se também escolher a eliminação de etiquetas HTML, pois assim manter-se-ão os parágrafos.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/lang_sk.inc.php b/plugins/serendipity_event_mailer/lang_sk.inc.php index 3aaa465b..57a889fd 100644 --- a/plugins/serendipity_event_mailer/lang_sk.inc.php +++ b/plugins/serendipity_event_mailer/lang_sk.inc.php @@ -21,4 +21,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Posla» tento príspevok e-mailom'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Posla» v¹etkým autorom'); -?> diff --git a/plugins/serendipity_event_mailer/lang_tn.inc.php b/plugins/serendipity_event_mailer/lang_tn.inc.php index 01c72de6..387876f4 100644 --- a/plugins/serendipity_event_mailer/lang_tn.inc.php +++ b/plugins/serendipity_event_mailer/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,14 +12,14 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_MAILER_NAME', '坄逿–‡ç« '); - @define('PLUGIN_EVENT_MAILER_DESC', 'å¯è®“æ‚¨å¯„é€æ–°ç™¼ä½ˆçš„æ–‡ç« åˆ°é›»å­éƒµä»¶ä¿¡ç®±'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電å­ä¿¡ç®± (建議:電å­å ±)'); - @define('PLUGIN_EVENT_MAILER_LINK', '包括文章連çµï¼Ÿ'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連çµä½å€ã€‚'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'è½‰æ› HTML æ®µè½æˆæ–°è¡Œï¼Ÿ'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於æ¯å€‹ HTML 的段è½ã€‚如果您開啟 移除 HTML? 的功能,這會檢查æ¯å€‹æœªè‡ªå·±æ®µè¡Œçš„æ®µè½ï¼Œç„¶å¾Œè‡ªå‹•幫您段行。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_NAME', '坄逿–‡ç« '); +@define('PLUGIN_EVENT_MAILER_DESC', 'å¯è®“æ‚¨å¯„é€æ–°ç™¼ä½ˆçš„æ–‡ç« åˆ°é›»å­éƒµä»¶ä¿¡ç®±'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電å­ä¿¡ç®± (建議:電å­å ±)'); +@define('PLUGIN_EVENT_MAILER_LINK', '包括文章連çµï¼Ÿ'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連çµä½å€ã€‚'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'è½‰æ› HTML æ®µè½æˆæ–°è¡Œï¼Ÿ'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於æ¯å€‹ HTML 的段è½ã€‚如果您開啟 移除 HTML? 的功能,這會檢查æ¯å€‹æœªè‡ªå·±æ®µè¡Œçš„æ®µè½ï¼Œç„¶å¾Œè‡ªå‹•幫您段行。'); + diff --git a/plugins/serendipity_event_mailer/lang_zh.inc.php b/plugins/serendipity_event_mailer/lang_zh.inc.php index 0dfa9e70..f5377232 100644 --- a/plugins/serendipity_event_mailer/lang_zh.inc.php +++ b/plugins/serendipity_event_mailer/lang_zh.inc.php @@ -13,4 +13,5 @@ @define('PLUGIN_EVENT_MAILER_RECIPIENTS', '电å­é‚®ä»¶æ”¶ä»¶äºº (ä¸åŒæ”¶ä»¶äººä¹‹é—´ä½¿ç”¨ç©ºæ ¼åŒºåˆ†)'); @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '你决定ä¸å°†æ­¤æ–‡ç« é€šè¿‡ç”µå­é‚®ä»¶å‘é€å‡ºåŽ»ï¼Œå› æ­¤è¯¥æ–‡ç« æ²¡æœ‰é€šè¿‡ç”µå­é‚®ä»¶å‘é€å‡ºåŽ»ã€‚'); @define('PLUGIN_EVENT_MAILER_SENDING', '电å­é‚®ä»¶å‘é€ä¸­â€¦â€¦'); -@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电å­é‚®ä»¶å‘逿–‡ç« '); \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电å­é‚®ä»¶å‘逿–‡ç« '); + diff --git a/plugins/serendipity_event_mailer/serendipity_event_mailer.php b/plugins/serendipity_event_mailer/serendipity_event_mailer.php index ee021bed..61cff4f8 100644 --- a/plugins/serendipity_event_mailer/serendipity_event_mailer.php +++ b/plugins/serendipity_event_mailer/serendipity_event_mailer.php @@ -1,4 +1,8 @@ -add('description', PLUGIN_EVENT_MAILER_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Sebastian Nohn, Kristian Koehntopp, Garvin Hicking'); - $propbag->add('version', '1.53'); + $propbag->add('version', '1.54'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -66,6 +70,7 @@ class serendipity_event_mailer extends serendipity_event } switch($name) { + case 'what': $propbag->add('type', 'select'); $propbag->add('name', CONTENT); @@ -124,30 +129,33 @@ class serendipity_event_mailer extends serendipity_event break; default: - break; + return false; } - return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'backend_display': if (isset($serendipity['POST']['properties']['mailto'])) { $mailto = $serendipity['POST']['properties']['mailto']; } else { $mailto = $this->get_config('mailto'); } - + if (isset($serendipity['POST']['properties']['sendentry_all'])) { $sendtoall = $serendipity['POST']['properties']['sendentry_all']; } else { @@ -247,12 +255,12 @@ class serendipity_event_mailer extends serendipity_event } } - if (serendipity_db_bool($this->get_config('convertp', false)) == true) { + if (serendipity_db_bool($this->get_config('convertp', 'false'))) { $mail['body'] = str_replace('

          ', "

          \n", $mail['body']); } - if (serendipity_db_bool($this->get_config('striptags', false)) == true) { - if (serendipity_db_bool($this->get_config('keepstriptags', true))) { + if (serendipity_db_bool($this->get_config('striptags', 'false'))) { + if (serendipity_db_bool($this->get_config('keepstriptags', 'true'))) { $mail['body'] = preg_replace('§]+href=["\']([^"\']*)["\'][^>]*>([^<]*)§i', "$2 [$1]", $mail['body']); $mail['body'] = preg_replace('§]+src=["\']([^"\']*)["\'][^>]*>§i', "[" . IMAGE . ": $1]", $mail['body']); } else { @@ -262,7 +270,7 @@ class serendipity_event_mailer extends serendipity_event $mail['body'] = strip_tags($mail['body']); } - if (serendipity_db_bool($this->get_config('includelink', false)) == true) { + if (serendipity_db_bool($this->get_config('includelink', 'false'))) { $mail['body'] = serendipity_archiveURL($eventData['id'], $eventData['title'], 'baseURL', true, array('timestamp' => $eventData['timestamp'])) . "\n\n" . $mail['body']; } @@ -273,17 +281,18 @@ class serendipity_event_mailer extends serendipity_event } } } - return true; break; default: return false; - break; } + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php index 82acb89e..c150d769 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php @@ -1,12 +1,12 @@ -'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tagů, uvnitÅ™ kterých nemají být konce řádků nahrazovány.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagů oddÄ›lujte Äárkou. Tip: Zadávané tagy jsou vyhodnocovány jako regulární výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagů <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy

          '); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy

          místo tagů
          '); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat další znaÄkovací pluginy?'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php index 171ebb71..8ade0e6c 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php @@ -17,8 +17,8 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'MÄ›ní znaky konce řádku na tagy
          '); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tagů, uvnitÅ™ kterých nemají být konce řádků nahrazovány.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagů oddÄ›lujte Äárkou. Tip: Zadávané tagy jsou vyhodnocovány jako regulární výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagů <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy

          '); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy

          místo tagů
          '); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat další znaÄkovací pluginy?'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php index 4c87411a..e5070761 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Zoznam html tagov, vo vnútri ktorých nemajú byÅ¥ konce riadkov nahradzované.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagov oddeľovaÅ¥ Äiarkou. Tip: Zadané tagy sú vyhodnocované ako regulárny výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použíť tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'VkladaÅ¥ tagy <p> namiesto tagov <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použíť tagy

          '); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkladať tagy

          namiesto tagov
          '); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php index 439ac7bb..7822c03d 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php @@ -1,4 +1,4 @@ -'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tagù, uvnitø kterých nemají být konce øádkù nahrazovány.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagù oddìlujte èárkou. Tip: Zadávané tagy jsou vyhodnocovány jako regulární výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagù <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy

          '); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy

          místo tagù
          '); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat další znaèkovací pluginy?'); diff --git a/plugins/serendipity_event_nl2br/lang_cz.inc.php b/plugins/serendipity_event_nl2br/lang_cz.inc.php index d2d65c17..beadb402 100644 --- a/plugins/serendipity_event_nl2br/lang_cz.inc.php +++ b/plugins/serendipity_event_nl2br/lang_cz.inc.php @@ -17,8 +17,8 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'Mìní znaky konce øádku na tagy
          '); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tagù, uvnitø kterých nemají být konce øádkù nahrazovány.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagù oddìlujte èárkou. Tip: Zadávané tagy jsou vyhodnocovány jako regulární výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou¾ít tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagù <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou¾ít tagy

          '); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy

          místo tagù
          '); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat dal¹í znaèkovací pluginy?'); diff --git a/plugins/serendipity_event_nl2br/lang_de.inc.php b/plugins/serendipity_event_nl2br/lang_de.inc.php index edeb3bb0..2fad7f0c 100644 --- a/plugins/serendipity_event_nl2br/lang_de.inc.php +++ b/plugins/serendipity_event_nl2br/lang_de.inc.php @@ -1,4 +1,4 @@ -'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Zoznam html tagov, vo vnútri ktorých nemajú by» konce riadkov nahradzované.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagov oddeµova» èiarkou. Tip: Zadané tagy sú vyhodnocované ako regulárny výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou¾í» tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vklada» tagy <p> namiesto tagov <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou¾í» tagy

          '); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vklada» tagy

          namiesto tagov
          '); diff --git a/plugins/serendipity_event_nl2br/lang_tn.inc.php b/plugins/serendipity_event_nl2br/lang_tn.inc.php index 439ac7bb..7822c03d 100644 --- a/plugins/serendipity_event_nl2br/lang_tn.inc.php +++ b/plugins/serendipity_event_nl2br/lang_tn.inc.php @@ -1,4 +1,4 @@ -add('description', PLUGIN_EVENT_NL2BR_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.20'); + $propbag->add('version', '2.21'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -55,7 +59,8 @@ class serendipity_event_nl2br extends serendipity_event $propbag->add('configuration', $conf_array); } - function cleanup() { + function cleanup() + { global $serendipity; /* check possible config mismatch setting in combination with ISOBR */ @@ -83,7 +88,8 @@ class serendipity_event_nl2br extends serendipity_event return true; } - function example() { + function example() + { return '

          PLEASE NOTE the implications of this markup plugin:

          This plugin transfers linebreaks to HTML-linebreaks, so that they show up in your blog entry.

          In two cases this can raise problematic issues for you:

          @@ -100,16 +106,19 @@ class serendipity_event_nl2br extends serendipity_event '."\n"; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } @@ -156,27 +165,32 @@ class serendipity_event_nl2br extends serendipity_event $propbag->add('name', constant($name)); $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); $propbag->add('default', 'true'); + break; } return true; } - function isolate($src, $regexp = NULL) { + function isolate($src, $regexp = NULL) + { if($regexp) return preg_replace_callback($regexp, array($this, 'isolate'), $src); global $_buf; $_buf[] = $src[0]; return "\001" . (count($_buf) - 1); } - function restore_callback($matches) { + function restore_callback($matches) + { global $_buf; return $_buf[$matches[1]]; } - function restore($text) { + function restore($text) + { return preg_replace_callback('!\001(\d+)!', array($this, 'restore_callback'), $text); // works?! } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; static $markup = null; static $isolate = null; @@ -204,7 +218,9 @@ class serendipity_event_nl2br extends serendipity_event } if (isset($hooks[$event])) { + switch($event) { + case 'frontend_display': // check single entry for temporary disabled markups @@ -224,7 +240,7 @@ class serendipity_event_nl2br extends serendipity_event */ // don't run, if the textile, or markdown plugin already took care about markup if ($markup && $serendipity['nl2br']['entry_disabled_markup'] === false && (class_exists('serendipity_event_textile') || class_exists('serendipity_event_markdown'))) { - return true; + break; } // NOTE: the wysiwyg-editor needs to send its own ['properties']['ep_no_nl2br'] to disable the nl2br() parser! @@ -278,9 +294,7 @@ class serendipity_event_nl2br extends serendipity_event } } } - - return true; - break; + break; case 'backend_configure': @@ -295,15 +309,13 @@ class serendipity_event_nl2br extends serendipity_event // hook into default/admin/entries.tpl somehow via the Heart Of Gold = serendipity_printEntryForm() before! it is loaded $serendipity['smarty']->assign('iso2br', true); } - - - return true; - break; + break; case 'css': -?> + $eventData .= ' + +/* nl2br plugin start */ -/* nl2br plugin */ p.whiteline { margin-top: 0em; margin-bottom: 1em; @@ -314,24 +326,28 @@ p.break { margin-bottom: 0em; } -'; } - /* + /** * Remove unnecessary paragraphs * Unnecessary are those which start and end immediately. * They only get created by isolate_block_elements * @param mixed text * @return string - * */ - function clean_code ($text) { + */ + function clean_code ($text) + { if (is_array($text)) { $text = implode($text); } return str_replace(array('

          ','

          ', '

          '),"", $text); } - function purge_p($text) { + function purge_p($text) + { $text = str_replace('

          ', "", $text); return str_replace(array('

          ','

          ', '

          ', '

          '),"\n", $text); } - /* + /** * Use nl2p on text within blockelements, useful e.g. with blockquotes * @param array text * @return string - * */ - function formate_block_elements($textstring) { + */ + function formate_block_elements($textstring) + { $block_elements = array('end_tags($start_tag); @@ -466,8 +487,9 @@ p.break { * Make sure none of these block_elements are within a

          * @param string text * @return string - * */ - function isolate_block_elements($textstring) { + */ + function isolate_block_elements($textstring) + { $block_elements = array('

          */ - function end_tags($start_tag) { + function end_tags($start_tag) + { return str_replace("<", ""; } @@ -539,7 +564,8 @@ p.break { * @param int start * $param array text */ - function next_nl_block($i, $text) { + function next_nl_block($i, $text) + { $skipped = false; for ($i--; $i>0; $i-- ) { if (!$skipped){ @@ -547,12 +573,14 @@ p.break { if (strpos($text[$i], "\n") === false) { $skipped = true; } - }else if (strpos($text[$i], "\n") !== false) { + } else if (strpos($text[$i], "\n") !== false) { break; } } return $i; } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_responsiveimages/UTF-8/lang_de.inc.php b/plugins/serendipity_event_responsiveimages/UTF-8/lang_de.inc.php new file mode 100644 index 00000000..b14dbb40 --- /dev/null +++ b/plugins/serendipity_event_responsiveimages/UTF-8/lang_de.inc.php @@ -0,0 +1,10 @@ +add('name', PLUGIN_EVENT_RESPONSIVE_NAME); + $propbag->add('description', PLUGIN_EVENT_RESPONSIVE_DESC); + $propbag->add('stackable', false); + $propbag->add('author', 'Serendipity Team'); + $propbag->add('version', '0.2.2'); + $propbag->add('requirements', array( + 'serendipity' => '2.2', + )); + $propbag->add('cachable_events', array('frontend_display' => true)); + $propbag->add('event_hooks', array('frontend_display' => true, + 'backend_media_makethumb' => true + )); + $propbag->add('groups', array('MARKUP')); + + $this->markup_elements = array( + array( + 'name' => 'ENTRY_BODY', + 'element' => 'body', + ), + array( + 'name' => 'EXTENDED_BODY', + 'element' => 'extended', + ) + ); + + $conf_array = array(); + foreach($this->markup_elements as $element) { + $conf_array[] = $element['name']; + } + $propbag->add('configuration', $conf_array); + } + + function install() + { + serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); + } + + function uninstall(&$propbag) + { + serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); + serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); + } + + function generate_content(&$title) + { + $title = $this->title; + } + + function introspect_config_item($name, &$propbag) + { + $propbag->add('type', 'boolean'); + $propbag->add('name', constant($name)); + $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); + $propbag->add('default', 'true'); + return true; + } + + function event_hook($event, &$bag, &$eventData, $addData = null) + { + global $serendipity; + + $hooks = &$bag->get('event_hooks'); + $this->breakpoints = [1600, 1200, 600]; # This can later on be overwritten by the theme + $this->thumbWidths = [1200, 800, 400]; # This can later on be overwritten by the theme + + if (isset($hooks[$event])) { + + switch($event) { + + case 'frontend_display': + foreach ($this->markup_elements as $temp) { + if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && + !$eventData['properties']['ep_disable_markup_' . $this->instance] && + !isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { + $element = $temp['element']; + $eventData[$element] = $this->_responsive_markup($eventData[$element]); + } + } + break; + + case 'backend_media_makethumb': + echo $addData; + // $eventData is usually defined as: + // array(array( + // 'thumbSize' => $serendipity['thumbSize'], + // 'thumb' => $serendipity['thumbSuffix'] + // )); + // We now just need to add the additional array elements, with the new sizes and suffix. + // We can use $addData, containing the path to the full size file, to get the starting width + $origSize = serendipity_getimagesize($addData); + + for ($i = 0; $i < count($this->thumbWidths); $i++) { + $thumbWidth = $this->thumbWidths[$i]; + if ($thumbWidth < $origSize[0]) { + $eventData[] = array( + 'thumbSize' => ['width' => $thumbWidth, 'height' => $origSize[1] * ($thumbWidth / $origSize[0])], + 'thumb' => $thumbWidth . 'W.' . $serendipity['thumbSuffix'] + ); + } + } + + break; + default: + return false; + + } + return true; + } else { + return false; + } + } + + /* Given an entry text, replace each image linked to the ML with an img element containing + * an srcset. + * */ + function _responsive_markup($text) + { + preg_match_all('@@', $text, $matches); + + foreach ($matches['id'] as $imgId) { + preg_match('@]+width=["\'](\d+)["\']@', $text, $matches); + if ($matches[1]) { + $srcset = $this->createSrcset($imgId, $matches[1]); + } else { + $srcset = $this->createSrcset($imgId); + } + + $callback = function($matches) use ($srcset) { + if (strpos($matches[1], "srcset") === false) { + // the image has not yet an srcset, at least at the position where we insert it normally + return "{$matches[1]} $srcset src="; + } else { + return "{$matches[1]} src="; + } + }; + + $text = preg_replace_callback("@(.*?)src=@", $callback, $text); + } + + return $text; + } + + /* Given an id for a image in the ML, create an srcset using smaller thumbnail images and their width. + * Don't worry over thumbnail creation here, that's done on image upload and thumbnail creation. + * */ + function createSrcset($id, $maxWidth = 20000) { + global $serendipity; + + $origImage = serendipity_fetchImageFromDatabase($id); + $imagePath = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $origImage['path'] . $origImage['realname']; + + $thumbnails = serendipity_getThumbnails($id); + + $srcset = "srcset=\"$imagePath {$origImage['dimensions_width']}w,"; + + for ($i = 0; $i < count($this->thumbWidths); $i++) { + $thumbWidth = $this->thumbWidths[$i]; + $matchedThumbnail = false; + foreach ($thumbnails as $thumbnail) { + if (strpos($thumbnail, $thumbWidth . 'W') !== false) { + $matchedThumbnail = $thumbnail; + break; + } + } + if ($matchedThumbnail) { + $thumbnailHttp = str_replace($serendipity['serendipityPath'], $serendipity['serendipityHTTPPath'], $matchedThumbnail); + $breakpoint = $this->breakpoints[$i]; + $srcset .= "{$thumbnailHttp} {$breakpoint}w,"; + } + } + $srcset .= '"'; + + + return $srcset; + } + +} + +/* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php index 7fce49d2..af349471 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php @@ -1,10 +1,11 @@ - diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php index e4930a63..840b9bff 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php @@ -1,5 +1,6 @@ - * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Aplica formato básico serendipity a la entrada de texto'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Encerrando entre asteriscos convierte el texto en negrita (*palabra*), el subrayado es hecho así: _palabra_.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php index d9105e64..c2631321 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php index 14cfb705..d7f7bdef 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php @@ -1,8 +1,6 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php index 3b8b4b0c..09ddc0bf 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -10,5 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'エントリテキストã«é©ç”¨ã™ã‚‹åŸºæœ¬çš„㪠serendipity マークアップ'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'アスタリスクã§å›²ã‚“ã ãƒžãƒ¼ã‚¯ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒœãƒ¼ãƒ«ãƒ‰ (*強調文字*)ã«ãªã‚Šã€ä¸‹ç·šã¯ _下線_ ã«ãªã‚Šã¾ã™ã€‚'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php index b33a9865..8010a733 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php @@ -1,9 +1,8 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '마í¬ì—…: 세렌디피티'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 ê¸€ì— ê¸°ë³¸ì ì¸ 세렌디피티 마í¬ì—…ì„ ì ìš©í•¨'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* ì‹ìœ¼ë¡œ 단어를 별표로 둘러싸면 진하게 표시ë˜ë©° ë°‘ì¤„ì„ ì¹˜ë ¤ë©´ _단어_ ì‹ìœ¼ë¡œ ì ìœ¼ë©´ ë©ë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '마í¬ì—…: 세렌디피티'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 ê¸€ì— ê¸°ë³¸ì ì¸ 세렌디피티 마í¬ì—…ì„ ì ìš©í•¨'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* ì‹ìœ¼ë¡œ 단어를 별표로 둘러싸면 진하게 표시ë˜ë©° ë°‘ì¤„ì„ ì¹˜ë ¤ë©´ _단어_ ì‹ìœ¼ë¡œ ì ìœ¼ë©´ ë©ë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php index 161344bd..d19ded41 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php index 28fec273..9b84247c 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Stosowanie podstawowych znaczników Serendipity do wprowadzonego tekstu'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'ZamkniÄ™cie tekstu w znakach gwiazdki spowoduje jego wytÅ‚uszczenie (*tekst*), podkreÅ›lenia sÄ… tworzone przez zastosowanie _tekst_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php index 2cdbb246..4afd234a 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php index d970935e..7c477f3b 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Applicera grundläggande serendipity markup pÃ¥ inläggstext'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Omslutande asterisker markerar text som fetstil (*ord*), understruken text görs med hjälp av _ord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php index 7075ca31..00194506 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php @@ -1,4 +1,4 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號åœä½çš„æ–‡ç« æœƒä»¥ç²—體顯示 (*word*),底線是 _word_。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號åœä½çš„æ–‡ç« æœƒä»¥ç²—體顯示 (*word*),底線是 _word_。'); + diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php index 62e6fa57..a2b851f7 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php @@ -5,3 +5,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '用星å·å›´ä½æ–‡ç« (例如 *word*)ä¼šä»¥ç²—ä½“æ ·å¼æ˜¾ç¤ºï¼Œè€Œç”¨ä¸‹åˆ’çº¿å›´ä½æ–‡ç« (例如 _word_)ä¼šä»¥å¸¦ä¸‹åˆ’çº¿çš„æ–¹å¼æ˜¾ç¤º'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php b/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php index 73ecb3ea..1c33ec14 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php @@ -1,10 +1,11 @@ - diff --git a/plugins/serendipity_event_s9ymarkup/lang_de.inc.php b/plugins/serendipity_event_s9ymarkup/lang_de.inc.php index f27143ca..c0778d78 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_de.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_de.inc.php @@ -1,5 +1,6 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Apply basic serendipity markup to entry text'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_es.inc.php b/plugins/serendipity_event_s9ymarkup/lang_es.inc.php index 5dccd86c..83c52619 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_es.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_es.inc.php @@ -1,6 +1,6 @@ - * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Aplica formato básico serendipity a la entrada de texto'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Encerrando entre asteriscos convierte el texto en negrita (*palabra*), el subrayado es hecho así: _palabra_.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php b/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php index d9105e64..c2631321 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_is.inc.php b/plugins/serendipity_event_s9ymarkup/lang_is.inc.php index bfca5d33..1dafae0b 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_is.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_is.inc.php @@ -1,8 +1,6 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php b/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php index 3b8b4b0c..09ddc0bf 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -10,5 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'エントリテキストã«é©ç”¨ã™ã‚‹åŸºæœ¬çš„㪠serendipity マークアップ'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'アスタリスクã§å›²ã‚“ã ãƒžãƒ¼ã‚¯ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒœãƒ¼ãƒ«ãƒ‰ (*強調文字*)ã«ãªã‚Šã€ä¸‹ç·šã¯ _下線_ ã«ãªã‚Šã¾ã™ã€‚'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php b/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php index b33a9865..8010a733 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php @@ -1,9 +1,8 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '마í¬ì—…: 세렌디피티'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 ê¸€ì— ê¸°ë³¸ì ì¸ 세렌디피티 마í¬ì—…ì„ ì ìš©í•¨'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* ì‹ìœ¼ë¡œ 단어를 별표로 둘러싸면 진하게 표시ë˜ë©° ë°‘ì¤„ì„ ì¹˜ë ¤ë©´ _단어_ ì‹ìœ¼ë¡œ ì ìœ¼ë©´ ë©ë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '마í¬ì—…: 세렌디피티'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 ê¸€ì— ê¸°ë³¸ì ì¸ 세렌디피티 마í¬ì—…ì„ ì ìš©í•¨'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* ì‹ìœ¼ë¡œ 단어를 별표로 둘러싸면 진하게 표시ë˜ë©° ë°‘ì¤„ì„ ì¹˜ë ¤ë©´ _단어_ ì‹ìœ¼ë¡œ ì ìœ¼ë©´ ë©ë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php b/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php index 161344bd..d19ded41 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php b/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php index f2c0fbac..2b9c3821 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Stosowanie podstawowych znaczników Serendipity do wprowadzonego tekstu'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Zamkniêcie tekstu w znakach gwiazdki spowoduje jego wyt³uszczenie (*tekst*), podkre¶lenia s± tworzone przez zastosowanie _tekst_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php b/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php index 8bfaeef6..040f8785 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_se.inc.php b/plugins/serendipity_event_s9ymarkup/lang_se.inc.php index 6c5593e1..1eb3eaf8 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_se.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_se.inc.php @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Applicera grundläggande serendipity markup på inläggstext'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Omslutande asterisker markerar text som fetstil (*ord*), understruken text görs med hjälp av _ord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php b/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php index 80e191cb..8d32e55d 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php @@ -1,4 +1,4 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號åœä½çš„æ–‡ç« æœƒä»¥ç²—體顯示 (*word*),底線是 _word_。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號åœä½çš„æ–‡ç« æœƒä»¥ç²—體顯示 (*word*),底線是 _word_。'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php b/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php index 62e6fa57..a2b851f7 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php @@ -5,3 +5,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '用星å·å›´ä½æ–‡ç« (例如 *word*)ä¼šä»¥ç²—ä½“æ ·å¼æ˜¾ç¤ºï¼Œè€Œç”¨ä¸‹åˆ’çº¿å›´ä½æ–‡ç« (例如 _word_)ä¼šä»¥å¸¦ä¸‹åˆ’çº¿çš„æ–¹å¼æ˜¾ç¤º'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php b/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php index 29285fb4..a46aeb86 100644 --- a/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php +++ b/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php @@ -1,5 +1,9 @@ add('author', 'Serendipity Team'); $propbag->add('version', '1.4'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('cachable_events', array('frontend_display' => true)); - $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true)); + $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true)); $propbag->add('groups', array('MARKUP')); $this->markup_elements = array( @@ -50,20 +54,22 @@ class serendipity_event_s9ymarkup extends serendipity_event $propbag->add('configuration', $conf_array); } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function introspect_config_item($name, &$propbag) { $propbag->add('type', 'boolean'); @@ -73,16 +79,17 @@ class serendipity_event_s9ymarkup extends serendipity_event return true; } - - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { - switch($event) { - case 'frontend_display': + switch($event) { + + case 'frontend_display': foreach ($this->markup_elements as $temp) { if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && @@ -91,26 +98,26 @@ class serendipity_event_s9ymarkup extends serendipity_event $eventData[$element] = $this->_s9y_markup($eventData[$element]); } } - return true; break; case 'frontend_comment': if (serendipity_db_bool($this->get_config('COMMENT', true))) { echo '
          ' . PLUGIN_EVENT_S9YMARKUP_TRANSFORM . '
          '; } - return true; break; default: return false; + } + return true; } else { return false; } } - - function _s9y_markup($text) { + function _s9y_markup($text) + { $text = str_replace('\_', chr(1), $text); $text = preg_replace('/#([[:alnum:]]+?)#/','&\1;', $text); $text = preg_replace('/\b\s_([\S ]+?)_\s\b/',' \1 ', $text); @@ -130,8 +137,8 @@ class serendipity_event_s9ymarkup extends serendipity_event $text = preg_replace('/([\\\])([*#_|^@%])/', '\2', $text); return $text; - } + } /* vim: set sts=4 ts=4 expandtab : */ diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php index c0977d82..95619285 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php @@ -1,4 +1,4 @@ -add('stackable', false); $propbag->add('author', 'Garvin Hicking, Sebastian Nohn, Grischa Brockhaus, Ian'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); - $propbag->add('version', '1.84'); + $propbag->add('version', '1.86.3'); $propbag->add('event_hooks', array( 'frontend_saveComment' => true, 'external_plugin' => true, @@ -100,6 +104,7 @@ var $filter_defaults; global $serendipity; switch($name) { + case 'disable_api_comments': $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_API_COMMENTS); @@ -110,7 +115,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_API_MODERATE, PLUGIN_EVENT_SPAMBLOCK_API_REJECT, NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'trackback_ipvalidation': @@ -241,7 +245,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_API_MODERATE, PLUGIN_EVENT_SPAMBLOCK_API_REJECT, NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'akismet': @@ -249,7 +252,6 @@ var $filter_defaults; $propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_AKISMET); $propbag->add('description', PLUGIN_EVENT_SPAMBLOCK_AKISMET_DESC); $propbag->add('default', ''); - break; case 'akismet_server': @@ -269,7 +271,6 @@ var $filter_defaults; ) )); $propbag->add('radio_per_row', '1'); - break; case 'akismet_filter': @@ -282,7 +283,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_API_MODERATE, PLUGIN_EVENT_SPAMBLOCK_API_REJECT, NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'contentfilter_urls': @@ -334,7 +334,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_FILE, PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_DB, PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'ipflood': @@ -412,17 +411,18 @@ var $filter_defaults; break; default: - return false; + return false; } - return true; } - function get_default_exclude_urls() { + function get_default_exclude_urls() + { return '^http://identi\.ca/notice/\d+$'; } - function htaccess_update($new_ip) { + function htaccess_update($new_ip) + { global $serendipity; serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}spamblock_htaccess (ip, timestamp) VALUES ('" . serendipity_db_escape_string($new_ip) . "', '" . time() . "')"); @@ -473,17 +473,19 @@ var $filter_defaults; return false; } - function akismetRequest($api_key, $data, &$ret, $action = 'comment-check', $eventData = null, $addData = null) { + function akismetRequest($api_key, $data, &$ret, $action = 'comment-check', $eventData = null, $addData = null) + { global $serendipity; $opt = array( - 'method' => 'POST', - 'http' => '1.1', 'timeout' => 20, - 'allowRedirects' => true, - 'maxRedirects' => 3, - 'readTimeout' => array(5,0), + 'follow_redirects' => true, + 'max_redirects' => 3, ); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } // Default server type to akismet, in case user has an older version of the plugin // where no server was set @@ -520,22 +522,26 @@ var $filter_defaults; // DEBUG //$this->log($this->logfile, $eventData['id'], 'AKISMET_SERVER', 'Using Akismet server at ' . $server, $addData); } - $req = new HTTP_Request( - 'http://' . $server . '/1.1/verify-key', - $opt + $req = new HTTP_Request2( + 'http://' . $server . '/1.1/verify-key', + HTTP_Request2::METHOD_POST, + $opt ); - $req->addPostData('key', $api_key); - $req->addPostData('blog', $serendipity['baseURL']); + $req->addPostParameter('key', $api_key); + $req->addPostParameter('blog', $serendipity['baseURL']); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Statuscode not 200, Akismet HTTP verification request failed.'); + } + $reqdata = $response->getBody(); + } catch (HTTP_Request2_Exception $e) { $ret['is_spam'] = false; $ret['message'] = 'API Verification Request failed'; $this->log($this->logfile, $eventData['id'], 'API_ERROR', 'Akismet HTTP verification request failed.', $addData); return; - } else { - // Fetch response - $reqdata = $req->getResponseBody(); } if (!preg_match('@valid@i', $reqdata)) { @@ -545,23 +551,27 @@ var $filter_defaults; return; } - $req = new HTTP_Request( + $req = new HTTP_Request2( 'http://' . $api_key . '.' . $server . '/1.1/' . $action, + HTTP_Request2::METHOD_POST, $opt ); foreach($data AS $key => $value) { - $req->addPostData($key, $value); + $req->addPostParameter($key, $value); } - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Statuscode not 200, Akismet HTTP request failed.'); + } + $reqdata = $response->getBody(); + } catch (HTTP_Request2_Exception $e) { $ret['is_spam'] = false; $ret['message'] = 'Akismet Request failed'; $this->log($this->logfile, $eventData['id'], 'API_ERROR', 'Akismet HTTP request failed.', $addData); return; - } else { - // Fetch response - $reqdata = $req->getResponseBody(); } if ($action == 'comment-check' && preg_match('@true@i', $reqdata)) { @@ -585,8 +595,8 @@ var $filter_defaults; } } - - function tellAboutComment($where, $api_key, $comment_id, $is_spam) { + function tellAboutComment($where, $api_key, $comment_id, $is_spam) + { global $serendipity; $comment = serendipity_db_query(" SELECT C.*, L.useragent as log_useragent, E.title as entry_title " . " FROM {$serendipity['dbPrefix']}comments C, {$serendipity['dbPrefix']}spamblocklog L , {$serendipity['dbPrefix']}entries E " @@ -595,7 +605,7 @@ var $filter_defaults; . " AND C.ip=L.ip AND C.body=L.body", true, 'assoc'); if (!is_array($comment)) return; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; if (function_exists('serendipity_request_start')) serendipity_request_start(); switch($where) { @@ -624,11 +634,12 @@ var $filter_defaults; if (function_exists('serendipity_request_end')) serendipity_request_end(); } - function &getBlacklist($where, $api_key, &$eventData, &$addData) { + function &getBlacklist($where, $api_key, &$eventData, &$addData) + { global $serendipity; $ret = false; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; if (function_exists('serendipity_request_start')) serendipity_request_start(); // this switch statement is a leftover from blogg.de support (i.e. there were more options than just one). Leaving it in place in case we get more options again in the future. @@ -661,7 +672,8 @@ var $filter_defaults; return $ret; } - function checkScheme() { + function checkScheme() + { global $serendipity; $dbversion = $this->get_config('dbversion', '1'); @@ -722,13 +734,15 @@ var $filter_defaults; return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } // This method will be called on "fatal" spam errors that are unlikely to occur accidentally by users. // Their IPs will be constantly blocked. - function IsHardcoreSpammer() { + function IsHardcoreSpammer() + { global $serendipity; if (serendipity_db_bool($this->get_config('automagic_htaccess'))) { @@ -737,7 +751,8 @@ var $filter_defaults; } // Checks whether the current author is contained in one of the gorups that need no spam checking - function inGroup() { + function inGroup() + { global $serendipity; $checkgroups = explode('^', $this->get_config('hide_for_authors')); @@ -762,11 +777,13 @@ var $filter_defaults; return false; } - function example() { + function example() + { return '

          ' . PLUGIN_EVENT_SPAMBLOCK_LOOK . $this->show_captcha() . '

          '; } - function show_captcha($use_gd = false) { + function show_captcha($use_gd = false) + { global $serendipity; if ($use_gd || (function_exists('imagettftext') && function_exists('imagejpeg'))) { @@ -798,19 +815,21 @@ var $filter_defaults; } } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $debug = true; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + $captchas_ttl = $this->get_config('captchas_ttl', 7); $_captchas = $this->get_config('captchas', 'yes'); $captchas = ($_captchas !== 'no' && ($_captchas === 'yes' || $_captchas === 'scramble' || serendipity_db_bool($_captchas))); - // Check if the entry is older than the allowed amount of time. Enforce kaptchas if that is true - // of if kaptchas are activated for every entry + // Check if the entry is older than the allowed amount of time. Enforce Captchas if that is true + // of if Captchas are activated for every entry $show_captcha = ($captchas && isset($eventData['timestamp']) && ($captchas_ttl < 1 || ($eventData['timestamp'] < (time() - ($captchas_ttl*60*60*24)))) ? true : false); // Plugins can override with custom captchas @@ -836,8 +855,9 @@ var $filter_defaults; } switch($event) { + case 'fetchcomments': - if (is_array($eventData) && !$_SESSION['serendipityAuthedUser'] && serendipity_db_bool($this->get_config('hide_email', false))) { + if (is_array($eventData) && !$_SESSION['serendipityAuthedUser'] && serendipity_db_bool($this->get_config('hide_email', 'false'))) { // Will force emails to be not displayed in comments and RSS feed for comments. Will not apply to logged in admins (so not in the backend as well) @reset($eventData); while(list($idx, $comment) = each($eventData)) { @@ -862,7 +882,7 @@ var $filter_defaults; $checkmail = $this->get_config('checkmail'); // Check CSRF [comments only, cannot be applied to trackbacks] - if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('csrf', true))) { + if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('csrf', 'true'))) { if (!serendipity_checkFormToken(false)) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_CSRF_REASON, $addData); $eventData = array('allow_comments' => false); @@ -912,7 +932,7 @@ var $filter_defaults; // already there #$eventData = array('allow_comments' => false); // already there #$serendipity['messagestack']['emails'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_BODY; return false; - } elseif (serendipity_db_bool($this->get_config('killswitch', false)) === true) { + } elseif (serendipity_db_bool($this->get_config('killswitch', 'false')) === true) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_REASON_KILLSWITCH, $addData); $eventData = array('allow_comments' => false); $serendipity['messagestack']['comments'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_KILLSWITCH; @@ -940,7 +960,7 @@ var $filter_defaults; } // Check for global emergency moderation - if (serendipity_db_bool($this->get_config('killswitch', false)) === true) { + if (serendipity_db_bool($this->get_config('killswitch', 'false')) === true) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_REASON_KILLSWITCH, $addData); $eventData = array('allow_comments' => false); $serendipity['messagestack']['comments'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_KILLSWITCH; @@ -1035,15 +1055,22 @@ var $filter_defaults; // Check Trackback URLs? if (($addData['type'] == 'TRACKBACK' || $addData['type'] == 'PINGBACK') && serendipity_db_bool($this->get_config('trackback_check_url'))) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; if (function_exists('serendipity_request_start')) serendipity_request_start(); - $req = new HTTP_Request($addData['url'], array('allowRedirects' => true, 'maxRedirects' => 5, 'readTimeout' => array(5,0))); + $options = array('follow_redirects' => true, 'max_redirects' => 5, 'timeout' => 10); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the funcitonality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($addData['url'], HTTP_Request2::METHOD_GET, $options); $is_valid = false; - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { - $is_valid = false; - } else { - $fdata = $req->getResponseBody(); + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not get origin url: status != 200'); + } + $fdata = $response->getBody(); // Check if the target page contains a link to our blog if (preg_match('@' . preg_quote($serendipity['baseURL'], '@') . '@i', $fdata)) { @@ -1051,7 +1078,10 @@ var $filter_defaults; } else { $is_valid = false; } + } catch (HTTP_Request2_Exception $e) { + $is_valid = false; } + if (function_exists('serendipity_request_end')) serendipity_request_end(); if ($is_valid === false) { @@ -1162,7 +1192,7 @@ var $filter_defaults; } // Check invalid email - if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('checkmail', false))) { + if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('checkmail', 'false'))) { if (!empty($addData['email']) && strstr($addData['email'], '@') === false) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_REASON_CHECKMAIL, $addData); $eventData = array('allow_comments' => false); @@ -1175,12 +1205,10 @@ var $filter_defaults; return false; } } - - return true; break; case 'frontend_comment': - if (serendipity_db_bool($this->get_config('hide_email', false))) { + if (serendipity_db_bool($this->get_config('hide_email', 'false'))) { echo '
          ' . PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL_NOTICE . '
          '; } @@ -1188,7 +1216,7 @@ var $filter_defaults; echo '
          ' . PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_INFO . '
          '; } - if (serendipity_db_bool($this->get_config('csrf', true))) { + if (serendipity_db_bool($this->get_config('csrf', 'true'))) { echo serendipity_setFormToken('form'); } @@ -1209,11 +1237,8 @@ var $filter_defaults; } echo ''; } - - return true; break; - case 'external_plugin': $parts = explode('_', (string)$eventData); if (!empty($parts[1])) { @@ -1303,7 +1328,6 @@ var $filter_defaults; echo file_get_contents($cap); } } - return true; break; case 'backend_comments_top': @@ -1346,8 +1370,7 @@ var $filter_defaults; $this->set_config('contentfilter_emails', implode(';', $items)); } - echo ' ' . PLUGIN_EVENT_SPAMBLOCK_CONFIG . ''; - return true; + echo ' ' . PLUGIN_EVENT_SPAMBLOCK_CONFIG . ''; break; case 'backend_view_comment': @@ -1359,35 +1382,31 @@ var $filter_defaults; $akismet_apikey = $this->get_config('akismet'); $akismet = $this->get_config('akismet_filter'); if (!empty($akismet_apikey)) { - $eventData['action_more'] .= ' ' . PLUGIN_EVENT_SPAMBLOCK_SPAM . ''; - $eventData['action_more'] .= ' ' . PLUGIN_EVENT_SPAMBLOCK_NOT_SPAM . ''; + $eventData['action_more'] .= ' ' . PLUGIN_EVENT_SPAMBLOCK_SPAM . ''; + $eventData['action_more'] .= ' ' . PLUGIN_EVENT_SPAMBLOCK_NOT_SPAM . ''; } - $eventData['action_author'] .= ' ' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . ''; + $eventData['action_author'] .= ' ' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . ''; if (!empty($eventData['url'])) { $url_is_filtered = $this->checkFilter('urls', $eventData['url']); - $eventData['action_url'] .= ' ' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . ''; + $eventData['action_url'] .= ' ' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . ''; } if (!empty($eventData['email'])) { $email_is_filtered = $this->checkFilter('emails', $eventData['email']); - $eventData['action_email'] .= ' ' . ($email_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL : PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL) . ''; + $eventData['action_email'] .= ' ' . ($email_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL : PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL) . ''; } - - return true; break; case 'backend_sidebar_admin_appearance': echo '
        • ' . PLUGIN_EVENT_SPAMBLOCK_TITLE . '
        • '; - return true; break; - default: return false; - break; } + return true; } else { return false; } @@ -1396,7 +1415,8 @@ var $filter_defaults; /** * wordfilter, email and additional link check moved to this function, to allow comment user to opt-in (verify_once), but reject all truly spam comments before. **/ - function wordfilter($logfile, &$eventData, $wordmatch, $addData, $ftc = false) { + function wordfilter($logfile, &$eventData, $wordmatch, $addData, $ftc = false) + { global $serendipity; // Check for word filtering @@ -1517,7 +1537,8 @@ var $filter_defaults; } // function wordfilter end - function &checkFilter($what, $match, $getItems = false) { + function &checkFilter($what, $match, $getItems = false) + { $items = explode(';', $this->get_config('contentfilter_' . $what, $this->filter_defaults[$what])); $filtered = false; @@ -1550,7 +1571,8 @@ var $filter_defaults; return $filtered; } - function getComment($key, $id) { + function getComment($key, $id) + { global $serendipity; $c = serendipity_db_query("SELECT $key FROM {$serendipity['dbPrefix']}comments WHERE id = '" . (int)$id . "'", true, 'assoc'); @@ -1561,7 +1583,8 @@ var $filter_defaults; return $c[$key]; } - function random_string($max_char, $min_char) { + function random_string($max_char, $min_char) + { $this->chars = array(2, 3, 4, 7, 9); // 1, 5, 6 and 8 may look like characters. $this->chars = array_merge($this->chars, array('A','B','C','D','E','F','H','J','K','L','M','N','P','Q','R','T','U','V','W','X','Y','Z')); // I, O, S may look like numbers @@ -1575,7 +1598,8 @@ var $filter_defaults; return $strings; } - function log($logfile, $id, $switch, $reason, $comment) { + function log($logfile, $id, $switch, $reason, $comment) + { global $serendipity; $method = $this->get_config('logtype'); @@ -1638,6 +1662,8 @@ var $filter_defaults; break; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/ChangeLog b/plugins/serendipity_event_spartacus/ChangeLog new file mode 100644 index 00000000..0703bbe9 --- /dev/null +++ b/plugins/serendipity_event_spartacus/ChangeLog @@ -0,0 +1,4 @@ +2.37.3: +------- + * Change mirror order (new default: github) + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'æˆåŠŸèŽ·å–相关数æ®'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (æ’ä»¶åº“è¿”å›žå¦‚ä¸‹é”™è¯¯ä»£ç  %s 。)
          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          无法从SPARTACUSæ’件库中获å–到数æ®ã€‚正在在 %s ä¸Šé¢æ£€æŸ¥æ’件库状æ€ä¿¡æ¯ã€‚

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          点击此处访问SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站, 并确认该网站是å¦åœ¨æ­£å¸¸è¿è¡Œä¸­ã€‚

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUSå°è¯•连接到Google,但是失败了(错误 %d: %s)。
          ä½ çš„æœåŠ¡å™¨ç¦æ­¢å¤–出连接(outgoing connections)。无法连接到SPARTACUSæ’件库,因此SPARTACUSæ— æ³•æ­£å¸¸å·¥ä½œä»¥ä¸‹è½½ã€æ›´æ–°æ’件。请è”系你的网站空间æœåŠ¡å•†ï¼Œè¦æ±‚他们å…许通过使用外出连接连接到其他网站。

          ä½ ä¾ç„¶å¯ä»¥ä»Žæœ¬åœ°ç›®å½•安装æ’件。åªè¦ä»ŽSPARTACUS网上æ’件库下载相关æ’件,将它解压缩并上传到你的Serendipityçš„æ’件目录中

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/é•œåƒ åœ°å€ (XML元数æ®(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/é•œåƒ åœ°å€ (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。ä¸è¦ä¿®æ”¹è¿™ä¸ªè®¾ç½®ï¼Œé™¤éžä½ çŸ¥é“你正在åšä»€ä¹ˆï¼Œæˆ–者你目å‰ä½¿ç”¨çš„下载点已ç»å¤±æ•ˆäº†ã€‚这个设置存在的主è¦ç›®çš„æ˜¯ä¸ºäº†å‘å‰å…¼å®¹ã€‚'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacusæ’件库下载所需文件,但是该æ’件库的è¿è¡ŒçŠ¶æ€æ˜¾ç¤ºè¯¥æ’件库è¿è¡Œæ­£å¸¸ã€‚è¿™æ„味ç€ä½ çš„网站空间æœåŠ¡å•†ä½¿ç”¨äº†åŸºäºŽè®¿é—®å†…å®¹çš„é˜²ç«å¢™ï¼Œé€šè¿‡mod_security或其他åå‘代ç†(reverse proxy)æ¥ç¦æ­¢ä»Žç½‘络上下载或获å–PHP代ç ã€‚你需è¦è¯·ä½ çš„空间æœåŠ¡å•†å…³é—­å®ƒï¼›å¦åˆ™çš„è¯ï¼Œä½ æ— æ³•使用Spartacusæ’件,从而ä¸å¾—䏿‰‹åŠ¨ä¸‹è½½ç›¸å…³æ–‡ä»¶ã€‚'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacusæ¥ä¸‹è½½æ’件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php index 4bad8ac3..09a7da8f 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -(On-line úložiÅ¡tÄ› vrátilo chybu %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistěte, zda odpovídá.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pÅ™ipojit ke Googlu, ale neúspěšnÄ› (chyba Ä.%d: %s).
          Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z SPARTACUS online úložiště, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.

          '); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'UmístÄ›ní souborů/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'UmístÄ›ní souborů/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobÅ™e nevíte, co dÄ›láte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako napÅ™. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplnÄ›né, nejsou provádÄ›ny žádné zmÄ›ny vlastníka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen pÅ™epsat staré soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoÅ™it nové adresáře.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umožňuje stáhnout a instalovat rozÅ¡iÅ™ující moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'KliknÄ›te zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevřít. Server Serendipity nebo SourceForge.net možná neběží - omlouváme se, zkuste to pozdÄ›ji.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevÅ™ení URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'PÅ™ijato %s bytů z výše uvedené URL. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'PÅ™ijato %s bytů z již existujícího souboru na VaÅ¡em serveru. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspěšnÄ› stažena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (On-line úložiště vrátilo chybu %s.)
          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistěte, zda odpovídá.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pÅ™ipojit ke Googlu, ale neúspěšnÄ› (chyba Ä.%d: %s).
          Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z SPARTACUS online úložiště, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.

          '); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'UmístÄ›ní souborů/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'UmístÄ›ní souborů/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobÅ™e nevíte, co dÄ›láte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako napÅ™. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplnÄ›né, nejsou provádÄ›ny žádné zmÄ›ny vlastníka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen pÅ™epsat staré soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoÅ™it nové adresáře.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozÅ¡iÅ™ujících modulů najednou na odkaz "upgrade" prostÅ™edním tlaÄítkem myÅ¡i. Upgrade se otevÅ™e v novém oknÄ›/nové záložce. Pamatujte, že automatická aktualizace vÅ¡ech rozÅ¡iÅ™ujících modulů je ÄasovÄ› nároÄná operace a může vést k pÅ™ekroÄení nastavených Äasových limitů na serveru a z toho důvodu k neúplnÄ› staženým souborům. Proto tato funkÄnost není zámÄ›rnÄ› snadno přístupná.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozÅ¡iÅ™ujících modulů najednou na odkaz "upgrade" prostÅ™edním tlaÄítkem myÅ¡i. Upgrade se otevÅ™e v novém oknÄ›/nové záložce. Pamatujte, že automatická aktualizace vÅ¡ech rozÅ¡iÅ™ujících modulů je ÄasovÄ› nároÄná operace a může vést k pÅ™ekroÄení nastavených Äasových limitů na serveru a z toho důvodu k neúplnÄ› staženým souborům. Proto tato funkÄnost není zámÄ›rnÄ› snadno přístupná.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního Å™eÅ¡ení...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiÅ¡tÄ› modulu SPARTACUS, nicménÄ› se povedlo spojit se s úložiÅ¡tÄ›m. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat pÅ™es web *.php soubory. BuÄ musíte VaÅ¡eho poskytovatele požádat o vypnutí přísuÅ¡ných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruÄnÄ›.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního Å™eÅ¡ení...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiÅ¡tÄ› modulu SPARTACUS, nicménÄ› se povedlo spojit se s úložiÅ¡tÄ›m. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat pÅ™es web *.php soubory. BuÄ musíte VaÅ¡eho poskytovatele požádat o vypnutí přísuÅ¡ných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruÄnÄ›.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozÅ¡iÅ™ujících modulů pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování Å¡ablon pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozÅ¡iÅ™ujících modulů pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování Å¡ablon pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návÅ¡tÄ›vníci %s si mohou zobrazit informace o verzích vÅ¡ech nainstalovaných plugin. Není Å¡patný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návÅ¡tÄ›vníci %s si mohou zobrazit informace o verzích vÅ¡ech nainstalovaných plugin. Není Å¡patný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: NepodaÅ™ilo se pÅ™ipojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvoÅ™it'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšnÄ› vytvoÅ™en.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: NepodaÅ™ilo se pÅ™ipojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvoÅ™it'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšnÄ› vytvoÅ™en.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů pÅ™es FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednodueÅ¡enÄ› Å™eÄeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do nÄ›j zapisovat. Ale pokud vytváříte adresář pomocí FTP úÄtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů pÅ™es FTP prakticky jedinou cestou, jak mít možnost úspěšnÄ› používat SPARTACUS a upload souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pÅ™ipojujete pÅ™es FTP, nemusíte se nutnÄ› pÅ™ipojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP pÅ™ihlaÅ¡uje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů pÅ™es FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednodueÅ¡enÄ› Å™eÄeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do nÄ›j zapisovat. Ale pokud vytváříte adresář pomocí FTP úÄtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů pÅ™es FTP prakticky jedinou cestou, jak mít možnost úspěšnÄ› používat SPARTACUS a upload souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pÅ™ipojujete pÅ™es FTP, nemusíte se nutnÄ› pÅ™ipojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP pÅ™ihlaÅ¡uje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'UmístÄ›ní zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co dÄ›láte, jste-li zkuÅ¡ený uživatel. Pokud jsou pÅ™ednastavené mirror servery vypnuté nebo nepracují správnÄ›, Serendipity se pokusí pÅ™ipojit k Vámi zadaným mirror serverům (tÅ™eba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umÄ›t zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plnÄ› zrcadlí vÅ¡echny soubory CVS úložiÅ¡tÄ› Serendipity. Lze zadat více zrcadel, oddÄ›lených "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'UmístÄ›ní zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co dÄ›láte, jste-li zkuÅ¡ený uživatel. Pokud jsou pÅ™ednastavené mirror servery vypnuté nebo nepracují správnÄ›, Serendipity se pokusí pÅ™ipojit k Vámi zadaným mirror serverům (tÅ™eba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umÄ›t zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plnÄ› zrcadlí vÅ¡echny soubory CVS úložiÅ¡tÄ› Serendipity. Lze zadat více zrcadel, oddÄ›lených "|".'); diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php index 915b6b5b..09a7da8f 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -(On-line úložiÅ¡tÄ› vrátilo chybu %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistěte, zda odpovídá.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pÅ™ipojit ke Googlu, ale neúspěšnÄ› (chyba Ä.%d: %s).
          Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z SPARTACUS online úložiště, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.

          '); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'UmístÄ›ní souborů/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'UmístÄ›ní souborů/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobÅ™e nevíte, co dÄ›láte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako napÅ™. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplnÄ›né, nejsou provádÄ›ny žádné zmÄ›ny vlastníka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen pÅ™epsat staré soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoÅ™it nové adresáře.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umožňuje stáhnout a instalovat rozÅ¡iÅ™ující moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'KliknÄ›te zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevřít. Server Serendipity nebo SourceForge.net možná neběží - omlouváme se, zkuste to pozdÄ›ji.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevÅ™ení URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'PÅ™ijato %s bytů z výše uvedené URL. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'PÅ™ijato %s bytů z již existujícího souboru na VaÅ¡em serveru. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspěšnÄ› stažena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (On-line úložiště vrátilo chybu %s.)
          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistěte, zda odpovídá.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pÅ™ipojit ke Googlu, ale neúspěšnÄ› (chyba Ä.%d: %s).
          Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z SPARTACUS online úložiště, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.

          '); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'UmístÄ›ní souborů/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'UmístÄ›ní souborů/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobÅ™e nevíte, co dÄ›láte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako napÅ™. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplnÄ›né, nejsou provádÄ›ny žádné zmÄ›ny vlastníka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen pÅ™epsat staré soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmiÄkové soustavÄ› (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne vÅ¡echny webové servery umožňují zmÄ›nu práv. NapÅ™. servery ěžící v safe_mode módu. MÄ›jte na pamÄ›ti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva Ätení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoÅ™it nové adresáře.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozÅ¡iÅ™ujících modulů najednou na odkaz "upgrade" prostÅ™edním tlaÄítkem myÅ¡i. Upgrade se otevÅ™e v novém oknÄ›/nové záložce. Pamatujte, že automatická aktualizace vÅ¡ech rozÅ¡iÅ™ujících modulů je ÄasovÄ› nároÄná operace a může vést k pÅ™ekroÄení nastavených Äasových limitů na serveru a z toho důvodu k neúplnÄ› staženým souborům. Proto tato funkÄnost není zámÄ›rnÄ› snadno přístupná.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozÅ¡iÅ™ujících modulů najednou na odkaz "upgrade" prostÅ™edním tlaÄítkem myÅ¡i. Upgrade se otevÅ™e v novém oknÄ›/nové záložce. Pamatujte, že automatická aktualizace vÅ¡ech rozÅ¡iÅ™ujících modulů je ÄasovÄ› nároÄná operace a může vést k pÅ™ekroÄení nastavených Äasových limitů na serveru a z toho důvodu k neúplnÄ› staženým souborům. Proto tato funkÄnost není zámÄ›rnÄ› snadno přístupná.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního Å™eÅ¡ení...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiÅ¡tÄ› modulu SPARTACUS, nicménÄ› se povedlo spojit se s úložiÅ¡tÄ›m. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat pÅ™es web *.php soubory. BuÄ musíte VaÅ¡eho poskytovatele požádat o vypnutí přísuÅ¡ných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruÄnÄ›.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního Å™eÅ¡ení...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiÅ¡tÄ› modulu SPARTACUS, nicménÄ› se povedlo spojit se s úložiÅ¡tÄ›m. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat pÅ™es web *.php soubory. BuÄ musíte VaÅ¡eho poskytovatele požádat o vypnutí přísuÅ¡ných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruÄnÄ›.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozÅ¡iÅ™ujících modulů pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování Å¡ablon pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozÅ¡iÅ™ujících modulů pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování Å¡ablon pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návÅ¡tÄ›vníci %s si mohou zobrazit informace o verzích vÅ¡ech nainstalovaných plugin. Není Å¡patný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návÅ¡tÄ›vníci %s si mohou zobrazit informace o verzích vÅ¡ech nainstalovaných plugin. Není Å¡patný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: NepodaÅ™ilo se pÅ™ipojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvoÅ™it'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšnÄ› vytvoÅ™en.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: NepodaÅ™ilo se pÅ™ipojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvoÅ™it'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšnÄ› vytvoÅ™en.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů pÅ™es FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednodueÅ¡enÄ› Å™eÄeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do nÄ›j zapisovat. Ale pokud vytváříte adresář pomocí FTP úÄtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů pÅ™es FTP prakticky jedinou cestou, jak mít možnost úspěšnÄ› používat SPARTACUS a upload souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pÅ™ipojujete pÅ™es FTP, nemusíte se nutnÄ› pÅ™ipojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP pÅ™ihlaÅ¡uje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů pÅ™es FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednodueÅ¡enÄ› Å™eÄeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do nÄ›j zapisovat. Ale pokud vytváříte adresář pomocí FTP úÄtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů pÅ™es FTP prakticky jedinou cestou, jak mít možnost úspěšnÄ› používat SPARTACUS a upload souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pÅ™ipojujete pÅ™es FTP, nemusíte se nutnÄ› pÅ™ipojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP pÅ™ihlaÅ¡uje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'UmístÄ›ní zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co dÄ›láte, jste-li zkuÅ¡ený uživatel. Pokud jsou pÅ™ednastavené mirror servery vypnuté nebo nepracují správnÄ›, Serendipity se pokusí pÅ™ipojit k Vámi zadaným mirror serverům (tÅ™eba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umÄ›t zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plnÄ› zrcadlí vÅ¡echny soubory CVS úložiÅ¡tÄ› Serendipity. Lze zadat více zrcadel, oddÄ›lených "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'UmístÄ›ní zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co dÄ›láte, jste-li zkuÅ¡ený uživatel. Pokud jsou pÅ™ednastavené mirror servery vypnuté nebo nepracují správnÄ›, Serendipity se pokusí pÅ™ipojit k Vámi zadaným mirror serverům (tÅ™eba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umÄ›t zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plnÄ› zrcadlí vÅ¡echny soubory CVS úložiÅ¡tÄ› Serendipity. Lze zadat více zrcadel, oddÄ›lených "|".'); diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php index 65c9806f..44b86b08 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -(Der Mirror-Speicherort antwortet mit Fehler %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Prüfe Verfügbarkeit der Quelle...

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Die Prüfung der Verfügbarkeit einer Spartacus-Quelle konnte nicht durchgeführt werden (HTTP-Code %s). Bitte probieren Sie es später wieder.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klicken Sie hier um die Spartacus-Verfügbarkeitsprüfung anzusehen und dessen Erreichbarkeit zu überprüfen.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).
          Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgeführt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.

          Plugins können nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von der SPARTACUS Webseite runter, entpacken es und laden es in ihr Serendipity "plugin"-Verzeichnis hoch.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. Möglicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen möglich sind. Sie können SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Prüfe Verfügbarkeit der Quelle...

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Die Prüfung der Verfügbarkeit einer Spartacus-Quelle konnte nicht durchgeführt werden (HTTP-Code %s). Bitte probieren Sie es später wieder.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klicken Sie hier um die Spartacus-Verfügbarkeitsprüfung anzusehen und dessen Erreichbarkeit zu überprüfen.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).
          Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgeführt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.

          Plugins können nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von der SPARTACUS Webseite herunter, entpacken es und laden es in ihr Serendipity "plugins"-Verzeichnis hoch.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. Möglicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen möglich sind. Sie können SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.

          '); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Eigene Mirror-Quelle'); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Diese Option ist nur für Experten gedacht. Falls keiner der voreingestellten Mirror-Server aufgrund von Downtime oder Problemen verfügbar ist, kann hier ein eigener Server-Name wie http://mirror.org/serendipity/ eingetragen werden. Dort müssten die XML-Dateien für Spartacus im Verzeichnis liegen, und Unterverzeichnisse wie additional_plugins und additional_themes existieren. Geben Sie nur Mirrors hier ein, denen Sie vertrauen, auf denen eine Kopie unseres CVS-Repositories gespeichert ist. Mehrere Mirrors können mit "|" getrennt eingegeben werden.'); @@ -45,16 +46,16 @@ @define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Spartacus verwenden, um Themes zu laden?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Fernabfrage für Versions-Informationen der Plugins zulassen?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Wenn aktiviert, können Besucher von %s Versions-Informationen über alle installierten Plugins abrufen. Es wird dringend empfohlen, diese URL mittels benutzerdefinierten .htaccess Regeln vor unauthorisiertem Zugriff zu schützen.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information der Plugins'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'gibt den letzten Teil der URI an, welche die Benutzer wissen müssen, um den Fernabruf der Versions-Informationen durchzuführen.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Gibt den letzten ("geheimen") Teil der URI an, welche die Benutzer wissen müssen, um den Fernabruf der Versions-Informationen durchzuführen.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'FTP Fehler: Kann nicht per FTP verbinden.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'FTP Fehler: Kann das Verzeichnis (%s) nicht anlegen.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'FTP Fehler: Kann die Verzeichnisrechte von (%s) nicht ändern.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Verzeichnis (%s) erfolgreich angelegt.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Lege Verzeichnis unter Verwendung von FTP an?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode läuft, gelten einige Einschränkungen. Das Ergebnis dieser Einschränkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nmutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten für Ihren Server müssen dazu ausgefüllt werden'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode läuft, gelten einige Einschränkungen. Das Ergebnis dieser Einschränkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten für Ihren Server müssen dazu ausgefüllt werden'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'FTP Serveradresse'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'FTP Benutzername'); @define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'FTP Passwort'); @define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP Serendipity Verzeichnis'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login über FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier möglch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login über FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier möglch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php index 20ce0625..f400be9e 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php @@ -1,6 +1,6 @@ - * EN-Revision: 690 */ @@ -23,4 +23,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permisos de los directorios descargados'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Aquí puedes ingresar los permisos de los directorios (FTP/Shell) descargados por Spartacus en modo octal (por ejemplo "0777"). Si lo dejas vacío, los permisos por defecto del sistema serán utilizados. Nota que no todos los servidores permiten definir/cambiar permisos. Presta atención que los permisos aplicados permiten la lectura y escritura por parte del usuario del webserver. Fuera de eso spartacus/Serendipity no puede sobreescribir directorios existentes.'); -?> diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php index 4a181c14..a9203d20 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php index 4c57174f..09cfab60 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php @@ -1,10 +1,11 @@ - * EN-Revision: 690 */ @@ -24,4 +24,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permissions downloaded directories'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Here you can enter the octal mode (like "0777") of the directory permissions for directories (FTP/Shell) downloaded by Spartacus. If empty, the default permission mask of the system are used. Note that not all servers allow changing/setting permissions. Pay attention that the applied permissions allow reading and writing for the webserver user. Else spartacus/Serendipity cannot overwrite existing directories.'); -?> diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php index 47e2b891..a023bbe4 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php @@ -1,17 +1,16 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 í”ŒëŸ¬ê·¸ì¸ ì ‘ê·¼ 보관소 ë„구 ë° ê°œì¸í™”/통합화 시스템) - 온ë¼ì¸ 보관소ì—서 플러그ì¸ì„ ë‹¤ìš´ë¡œë“œë°›ì„ ìˆ˜ 있게 함'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온ë¼ì¸ 보관소ì—서 새로운 %s(ì„)를 받으려면 여기를 누르십시오.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì†í•  수 없었습니다. 세렌디피티나 소스í¬ì§€ 서버가 ë‹¤ìš´ëœ ê²ƒ 같습니다. 죄송하지만 잠시 후 재시ë„하시기 ë°”ëžë‹ˆë‹¤.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì† ì‹œë„중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'ìœ„ì˜ ì£¼ì†Œì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'ì„œë²„ì— ì´ë¯¸ 존재하는 파ì¼ì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'ë°ì´í„°ë¥¼ 성공ì ìœ¼ë¡œ 받았습니다.'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파ì¼/미러 위치 (XML 메타ë°ì´í„°)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파ì¼/미러 위치 (파ì¼)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 ì •ë³´ê°€ ë°”ë€Œì—ˆì„ ê²½ìš°ê°€ 아니ë¼ë©´ ì´ ê°’ì„ ë°”ê¾¸ì§€ 마십시오. ì´ ì˜µì…˜ì€ ìƒìœ„ í˜¸í™˜ì„±ì„ ìœ„í•´ 존재합니다.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 í”ŒëŸ¬ê·¸ì¸ ì ‘ê·¼ 보관소 ë„구 ë° ê°œì¸í™”/통합화 시스템) - 온ë¼ì¸ 보관소ì—서 플러그ì¸ì„ ë‹¤ìš´ë¡œë“œë°›ì„ ìˆ˜ 있게 함'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온ë¼ì¸ 보관소ì—서 새로운 %s(ì„)를 받으려면 여기를 누르십시오.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì†í•  수 없었습니다. 세렌디피티나 소스í¬ì§€ 서버가 ë‹¤ìš´ëœ ê²ƒ 같습니다. 죄송하지만 잠시 후 재시ë„하시기 ë°”ëžë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì† ì‹œë„중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'ìœ„ì˜ ì£¼ì†Œì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'ì„œë²„ì— ì´ë¯¸ 존재하는 파ì¼ì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'ë°ì´í„°ë¥¼ 성공ì ìœ¼ë¡œ 받았습니다.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파ì¼/미러 위치 (XML 메타ë°ì´í„°)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파ì¼/미러 위치 (파ì¼)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 ì •ë³´ê°€ ë°”ë€Œì—ˆì„ ê²½ìš°ê°€ 아니ë¼ë©´ ì´ ê°’ì„ ë°”ê¾¸ì§€ 마십시오. ì´ ì˜µì…˜ì€ ìƒìœ„ í˜¸í™˜ì„±ì„ ìœ„í•´ 존재합니다.'); -?> diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php index 53f4a89a..656bd5e8 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -15,14 +15,14 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Pobrano %s bajtów z już istniejÄ…cego pliku na Twoim serwerze. ZapisujÄ™ plik jako %s...'); @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Pobieranie danych zakoÅ„czone sukcesem.'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (repozytorium zwróciło kod błędu %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nie mogę pobrać danych z repozytorium SPARTACUSa. Sprawdzam dostępność repozytorium.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Strona z informacją o dostępności repozytoriów dla SPARTACUSa zwróciła błąd (kod HTTP %s). To oznacza, że strona aktualnie nie funkcjonuje. Proszę spróbować ponownie później.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknij tutaj by zobaczyć stronę z informacją o dostępności repozytoriów dla SPARTACUSa i sprawdź, czy strona odpowiada.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS próbował połączyć się z Google i nie powiodła się ta operacja (błąd %d: %s).
          Twój serwer blokuje połączenia wychodzące. Your server is blocking outgoing connections. SPARTACUS nie będzie funkcjonował prawidłowo ponieważ nie może skontaktować się z repozytorium. Proszę, skontaktuj się z providerem i poproś o zezwolenie na połączenia wychodzące z serwera.

          Wtyczki mogą być oczywiście instalowane bezpośrednio z katalogów na serwerze. Po prostu pobierz wtyczkę z repozytorium SPARTACUSa, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS może połączyć się z Google ale nie może połączyć się z repozytorium. Jest możliwe, że Twój serwer blokuje pewne połączenia wychodzące albo że strona z repozytorium SPARTACUSa aktualnie nie działa. Skontaktuj się z firmą hostującą Twoją stronę i upewnij się, że połączenia wychodzące są dozwolone. Nie będziesz mógł używać SPARTACUSa dopóki Twój serwer nie będzie mógł kontaktować się z repozytorium SPARTACUSa.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nie mogę pobrać danych z repozytorium SPARTACUSa. Sprawdzam dostępność repozytorium.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Strona z informacją o dostępności repozytoriów dla SPARTACUSa zwróciła błąd (kod HTTP %s). To oznacza, że strona aktualnie nie funkcjonuje. Proszę spróbować ponownie później.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknij tutaj by zobaczyć stronę z informacją o dostępności repozytoriów dla SPARTACUSa i sprawdź, czy strona odpowiada.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS próbował połączyć się z Google i nie powiodła się ta operacja (błąd %d: %s).
          Twój serwer blokuje połączenia wychodzące. Your server is blocking outgoing connections. SPARTACUS nie będzie funkcjonował prawidłowo ponieważ nie może skontaktować się z repozytorium. Proszę, skontaktuj się z providerem i poproś o zezwolenie na połączenia wychodzące z serwera.

          Wtyczki mogą być oczywiście instalowane bezpośrednio z katalogów na serwerze. Po prostu pobierz wtyczkę z repozytorium SPARTACUSa, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS może połączyć się z Google ale nie może połączyć się z repozytorium. Jest możliwe, że Twój serwer blokuje pewne połączenia wychodzące albo że strona z repozytorium SPARTACUSa aktualnie nie działa. Skontaktuj się z firmą hostującą Twoją stronę i upewnij się, że połączenia wychodzące są dozwolone. Nie będziesz mógł używać SPARTACUSa dopóki Twój serwer nie będzie mógł kontaktować się z repozytorium SPARTACUSa.

          '); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Lokalizacja pliku/mirrora (metadane XML)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Lokalizacja pliku/mirrora (pliki)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizacjÄ™, z której bÄ™dÄ… pobierane dane. NIE zmieniaj tej wartoÅ›ci o ile dobrze nie wiesz, co robisz i o ile serwer jest dostÄ™pny. Opcja istnieje głównie dla kompatybilnoÅ›ci z przyszÅ‚ymi wersjami wtyczki.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizacjÄ™, z której bÄ™dÄ… pobierane dane. NIE zmieniaj tej wartoÅ›ci o ile dobrze nie wiesz, co robisz i o ile serwer jest dostÄ™pny. Opcja istnieje głównie dla kompatybilnoÅ›ci z przyszÅ‚ymi wersjami wtyczki.'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'WÅ‚aÅ›ciciel pobranych plików'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Tu możesz podać wÅ‚aÅ›ciciela (jak np. "nobody") plików pobieranych i zapisywanych przez Spartacusa. Pozostawienie pustego pola nie spowoduje zmian uprawnieÅ„ do plików.'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Upraweniania pobieranych plików'); @@ -33,4 +33,4 @@ @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Sprawdź czy sÄ… nowe wtyczki Panelu bocznego'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Sprawdź czy sÄ… nowe wtyczki ZdarzeÅ„'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Podpowiedź: Możesz uaktualnić kilka wtyczek jednoczeÅ›nie klikajÄ…c link uaktualnienia Å›rodkowym klawiszem myszy, tak by otworzyć ten link w nowym oknie lub nowym tabie (zakÅ‚adce) przeglÄ…darki. Zauważ, że uaktualnianie kilku wtyczek jednoczeÅ›nie mogÅ‚oby prowadzić do timeoutów i problemów z pobieraniem plików a w efekcie - nagromadzenia Å›mieci i potencjalnych problemów. Dlatego taka funkcjonalność nie zostaÅ‚a zaimplementowana rozmyÅ›lnie.'); -?> + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php index f868933d..cac414c4 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php index 554bf8f7..b23305e5 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php @@ -1,32 +1,32 @@ - # # http://www.jannis.to/programming/serendipity.html # # # # Translated by # # (c) 2004-2005 CapriSkye # -# http://open.38.com # +# http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - å…許你從 s9y 的線上存庫下載外掛'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y çš„å¤–æŽ›å­˜åº«å®‰è£æ–° %s'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ç¶²å€ %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有å•題 - è«‹ç¨å¾Œåœ¨è©¦ã€‚'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'æ‰“é–‹ç¶²å€ %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上é¢çš„ç¶²å€æŽ¥æ”¶ %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'å­˜å–資料完æˆã€‚'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/é¡åƒ ä½å€ (XML metadata)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/é¡åƒ ä½å€ (檔案)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '鏿“‡ä¸€å€‹ä¸‹è¼‰é»žã€‚ä¸è¦æ”¹è®Šé€™å€‹è¨­å®šå€¼åˆéžæ‚¨äº†è§£å®ƒçš„作用。這個é¸é …ä¸»è¦æ˜¯ç‚ºäº†ç›¸å®¹æ€§æ‰€è¨­è¨ˆã€‚'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'ä¸‹è¼‰æª”æ¡ˆçš„æ“æœ‰äºº'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ“æœ‰äºº (譬如 "nobody")ã€‚å¦‚æžœç©ºç™½ä¸æœƒåšä»»ä½•改變。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權é™'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權é™'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案的目錄 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - å…許你從 s9y 的線上存庫下載外掛'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y çš„å¤–æŽ›å­˜åº«å®‰è£æ–° %s'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ç¶²å€ %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有å•題 - è«‹ç¨å¾Œåœ¨è©¦ã€‚'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'æ‰“é–‹ç¶²å€ %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上é¢çš„ç¶²å€æŽ¥æ”¶ %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'å­˜å–資料完æˆã€‚'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/é¡åƒ ä½å€ (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/é¡åƒ ä½å€ (檔案)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '鏿“‡ä¸€å€‹ä¸‹è¼‰é»žã€‚ä¸è¦æ”¹è®Šé€™å€‹è¨­å®šå€¼åˆéžæ‚¨äº†è§£å®ƒçš„作用。這個é¸é …ä¸»è¦æ˜¯ç‚ºäº†ç›¸å®¹æ€§æ‰€è¨­è¨ˆã€‚'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'ä¸‹è¼‰æª”æ¡ˆçš„æ“æœ‰äºº'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ“æœ‰äºº (譬如 "nobody")ã€‚å¦‚æžœç©ºç™½ä¸æœƒåšä»»ä½•改變。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權é™'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權é™'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案的目錄 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'æˆåŠŸèŽ·å–相关数æ®'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (æ’ä»¶åº“è¿”å›žå¦‚ä¸‹é”™è¯¯ä»£ç  %s 。)
          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          无法从SPARTACUSæ’件库中获å–到数æ®ã€‚正在在 %s ä¸Šé¢æ£€æŸ¥æ’件库状æ€ä¿¡æ¯ã€‚

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          点击此处访问SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站, 并确认该网站是å¦åœ¨æ­£å¸¸è¿è¡Œä¸­ã€‚

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUSå°è¯•连接到Google,但是失败了(错误 %d: %s)。
          ä½ çš„æœåŠ¡å™¨ç¦æ­¢å¤–出连接(outgoing connections)。无法连接到SPARTACUSæ’件库,因此SPARTACUSæ— æ³•æ­£å¸¸å·¥ä½œä»¥ä¸‹è½½ã€æ›´æ–°æ’件。请è”系你的网站空间æœåŠ¡å•†ï¼Œè¦æ±‚他们å…许通过使用外出连接连接到其他网站。

          ä½ ä¾ç„¶å¯ä»¥ä»Žæœ¬åœ°ç›®å½•安装æ’件。åªè¦ä»ŽSPARTACUS网上æ’件库下载相关æ’件,将它解压缩并上传到你的Serendipityçš„æ’件目录中

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/é•œåƒ åœ°å€ (XML元数æ®(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/é•œåƒ åœ°å€ (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。ä¸è¦ä¿®æ”¹è¿™ä¸ªè®¾ç½®ï¼Œé™¤éžä½ çŸ¥é“你正在åšä»€ä¹ˆï¼Œæˆ–者你目å‰ä½¿ç”¨çš„下载点已ç»å¤±æ•ˆäº†ã€‚这个设置存在的主è¦ç›®çš„æ˜¯ä¸ºäº†å‘å‰å…¼å®¹ã€‚'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacusæ’件库下载所需文件,但是该æ’件库的è¿è¡ŒçŠ¶æ€æ˜¾ç¤ºè¯¥æ’件库è¿è¡Œæ­£å¸¸ã€‚è¿™æ„味ç€ä½ çš„网站空间æœåŠ¡å•†ä½¿ç”¨äº†åŸºäºŽè®¿é—®å†…å®¹çš„é˜²ç«å¢™ï¼Œé€šè¿‡mod_security或其他åå‘代ç†(reverse proxy)æ¥ç¦æ­¢ä»Žç½‘络上下载或获å–PHP代ç ã€‚你需è¦è¯·ä½ çš„空间æœåŠ¡å•†å…³é—­å®ƒï¼›å¦åˆ™çš„è¯ï¼Œä½ æ— æ³•使用Spartacusæ’件,从而ä¸å¾—䏿‰‹åŠ¨ä¸‹è½½ç›¸å…³æ–‡ä»¶ã€‚'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacusæ¥ä¸‹è½½æ’件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); + diff --git a/plugins/serendipity_event_spartacus/lang_cn.inc.php b/plugins/serendipity_event_spartacus/lang_cn.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/lang_cn.inc.php +++ b/plugins/serendipity_event_spartacus/lang_cn.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'æˆåŠŸèŽ·å–相关数æ®'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (æ’ä»¶åº“è¿”å›žå¦‚ä¸‹é”™è¯¯ä»£ç  %s 。)
          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          无法从SPARTACUSæ’件库中获å–到数æ®ã€‚正在在 %s ä¸Šé¢æ£€æŸ¥æ’件库状æ€ä¿¡æ¯ã€‚

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          点击此处访问SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站, 并确认该网站是å¦åœ¨æ­£å¸¸è¿è¡Œä¸­ã€‚

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUSå°è¯•连接到Google,但是失败了(错误 %d: %s)。
          ä½ çš„æœåŠ¡å™¨ç¦æ­¢å¤–出连接(outgoing connections)。无法连接到SPARTACUSæ’件库,因此SPARTACUSæ— æ³•æ­£å¸¸å·¥ä½œä»¥ä¸‹è½½ã€æ›´æ–°æ’件。请è”系你的网站空间æœåŠ¡å•†ï¼Œè¦æ±‚他们å…许通过使用外出连接连接到其他网站。

          ä½ ä¾ç„¶å¯ä»¥ä»Žæœ¬åœ°ç›®å½•安装æ’件。åªè¦ä»ŽSPARTACUS网上æ’件库下载相关æ’件,将它解压缩并上传到你的Serendipityçš„æ’件目录中

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/é•œåƒ åœ°å€ (XML元数æ®(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/é•œåƒ åœ°å€ (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。ä¸è¦ä¿®æ”¹è¿™ä¸ªè®¾ç½®ï¼Œé™¤éžä½ çŸ¥é“你正在åšä»€ä¹ˆï¼Œæˆ–者你目å‰ä½¿ç”¨çš„下载点已ç»å¤±æ•ˆäº†ã€‚这个设置存在的主è¦ç›®çš„æ˜¯ä¸ºäº†å‘å‰å…¼å®¹ã€‚'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacusæ’件库下载所需文件,但是该æ’件库的è¿è¡ŒçŠ¶æ€æ˜¾ç¤ºè¯¥æ’件库è¿è¡Œæ­£å¸¸ã€‚è¿™æ„味ç€ä½ çš„网站空间æœåŠ¡å•†ä½¿ç”¨äº†åŸºäºŽè®¿é—®å†…å®¹çš„é˜²ç«å¢™ï¼Œé€šè¿‡mod_security或其他åå‘代ç†(reverse proxy)æ¥ç¦æ­¢ä»Žç½‘络上下载或获å–PHP代ç ã€‚你需è¦è¯·ä½ çš„空间æœåŠ¡å•†å…³é—­å®ƒï¼›å¦åˆ™çš„è¯ï¼Œä½ æ— æ³•使用Spartacusæ’件,从而ä¸å¾—䏿‰‹åŠ¨ä¸‹è½½ç›¸å…³æ–‡ä»¶ã€‚'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacusæ¥ä¸‹è½½æ’件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); + diff --git a/plugins/serendipity_event_spartacus/lang_cs.inc.php b/plugins/serendipity_event_spartacus/lang_cs.inc.php index 8853ce20..ffd93b24 100644 --- a/plugins/serendipity_event_spartacus/lang_cs.inc.php +++ b/plugins/serendipity_event_spartacus/lang_cs.inc.php @@ -1,4 +1,4 @@ -(On-line úložištì vrátilo chybu %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo možno získat data z on-line úložištì modulu Spartacus. Zkouška dostupnosti úložištì na adrese %s.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To mùže znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím pozdìji.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknìte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistìte, zda odpovídá.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pøipojit ke Googlu, ale neúspìšnì (chyba è.%d: %s).
          Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemùže pøipojit do svého online úložištì. Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích pøipojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresáøù. Jednoduše stáhnìte nejnovìjší verzi pluginu z SPARTACUS online úložištì, rozbalte ho a napøíklad pomocí FTP nahrajte do adresáøe /plugins/ ve Vaší instalaci Serendipity.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podaøilo spojit s Googlem, ale nemùže se spojit s on-line úložištìm modulu SPARTACUS. Je možné, že Váš server blokuje nìkterá odchozí spojení, nebo je on-line úložištì mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, protože nemùže kontaktovat on-line úložištì.

          '); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístìní souborù/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístìní souborù/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMÌÒTE tuto hodnotu, pokud opravdu dobøe nevíte, co dìláte a jestli server orpavdu funguje. Tato volba je pøístupná pro teprve plánované funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborù'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde mùžete zadat (FTP/Shell) vlastníka souborù (jako napø. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplnìné, nejsou provádìny žádné zmìny vlastníka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Pøístupová práva stažených souborù.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde mùžete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožòují zmìnu práv. Napø. servery ìžící v safe_mode módu. Mìjte na pamìti, že práva musí umožnit webovému uživateli, pod kterým bìží PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen pøepsat staré soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Pøístupová práva stažených adresáøù'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde mùžete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro adresáøe (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožòují zmìnu práv. Napø. servery ìžící v safe_mode módu. Mìjte na pamìti, že práva musí umožnit webovému uživateli, pod kterým bìží PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoøit nové adresáøe.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umožòuje stáhnout a instalovat rozšiøující moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Kliknìte zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevøít. Server Serendipity nebo SourceForge.net možná nebìží - omlouváme se, zkuste to pozdìji.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevøení URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Pøijato %s bytù z výše uvedené URL. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Pøijato %s bytù z již existujícího souboru na Vašem serveru. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspìšnì stažena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (On-line úložištì vrátilo chybu %s.)
          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo možno získat data z on-line úložištì modulu Spartacus. Zkouška dostupnosti úložištì na adrese %s.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To mùže znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím pozdìji.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknìte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistìte, zda odpovídá.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pøipojit ke Googlu, ale neúspìšnì (chyba è.%d: %s).
          Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemùže pøipojit do svého online úložištì. Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích pøipojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresáøù. Jednoduše stáhnìte nejnovìjší verzi pluginu z SPARTACUS online úložištì, rozbalte ho a napøíklad pomocí FTP nahrajte do adresáøe /plugins/ ve Vaší instalaci Serendipity.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podaøilo spojit s Googlem, ale nemùže se spojit s on-line úložištìm modulu SPARTACUS. Je možné, že Váš server blokuje nìkterá odchozí spojení, nebo je on-line úložištì mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, protože nemùže kontaktovat on-line úložištì.

          '); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístìní souborù/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístìní souborù/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMÌÒTE tuto hodnotu, pokud opravdu dobøe nevíte, co dìláte a jestli server orpavdu funguje. Tato volba je pøístupná pro teprve plánované funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborù'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde mùžete zadat (FTP/Shell) vlastníka souborù (jako napø. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplnìné, nejsou provádìny žádné zmìny vlastníka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Pøístupová práva stažených souborù.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde mùžete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožòují zmìnu práv. Napø. servery ìžící v safe_mode módu. Mìjte na pamìti, že práva musí umožnit webovému uživateli, pod kterým bìží PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen pøepsat staré soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Pøístupová práva stažených adresáøù'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde mùžete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro adresáøe (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožòují zmìnu práv. Napø. servery ìžící v safe_mode módu. Mìjte na pamìti, že práva musí umožnit webovému uživateli, pod kterým bìží PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoøit nové adresáøe.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Mùžete upgradovat více rozšiøujících modulù najednou na odkaz "upgrade" prostøedním tlaèítkem myši. Upgrade se otevøe v novém oknì/nové záložce. Pamatujte, že automatická aktualizace všech rozšiøujících modulù je èasovì nároèná operace a mùže vést k pøekroèení nastavených èasových limitù na serveru a z toho dùvodu k neúplnì staženým souborùm. Proto tato funkènost není zámìrnì snadno pøístupná.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Mùžete upgradovat více rozšiøujících modulù najednou na odkaz "upgrade" prostøedním tlaèítkem myši. Upgrade se otevøe v novém oknì/nové záložce. Pamatujte, že automatická aktualizace všech rozšiøujících modulù je èasovì nároèná operace a mùže vést k pøekroèení nastavených èasových limitù na serveru a z toho dùvodu k neúplnì staženým souborùm. Proto tato funkènost není zámìrnì snadno pøístupná.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního øešení...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložištì modulu SPARTACUS, nicménì se povedlo spojit se s úložištìm. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožòuje stáhovat pøes web *.php soubory. Buï musíte Vašeho poskytovatele požádat o vypnutí pøísušných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruènì.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního øešení...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložištì modulu SPARTACUS, nicménì se povedlo spojit se s úložištìm. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožòuje stáhovat pøes web *.php soubory. Buï musíte Vašeho poskytovatele požádat o vypnutí pøísušných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruènì.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozšiøujících modulù pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování šablon pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozšiøujících modulù pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování šablon pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginù'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návštìvníci %s si mohou zobrazit informace o verzích všech nainstalovaných plugin. Není špatný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím pøístupùm.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému pøístupu k informacím o verzích pluginù'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginù.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginù'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návštìvníci %s si mohou zobrazit informace o verzích všech nainstalovaných plugin. Není špatný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím pøístupùm.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému pøístupu k informacím o verzích pluginù'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginù.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodaøilo se pøipojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresáø (%s) nelze vytvoøit'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáøe (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresáø (%s) byl úspìšnì vytvoøen.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodaøilo se pøipojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresáø (%s) nelze vytvoøit'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáøe (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresáø (%s) byl úspìšnì vytvoøen.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváøení adresáøù pøes FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám bìží PHP v "safe_mode", musíte se podøídit jistým omezením. Tato omezení mají zjednoduešenì øeèeno za výsledek, že pokud vytvoøíte adresáø obvyklou cestou, nelze do nìj zapisovat. Ale pokud vytváøíte adresáø pomocí FTP úètu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváøení adresáøù pøes FTP prakticky jedinou cestou, jak mít možnost úspìšnì používat SPARTACUS a upload souborù.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáøi Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pøipojujete pøes FTP, nemusíte se nutnì pøipojit do adresáøe Serendipity. Zde tedy musíte specifikovat cestu k adresáøi Srendipity od adresáøe, do kterého se FTP pøihlašuje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváøení adresáøù pøes FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám bìží PHP v "safe_mode", musíte se podøídit jistým omezením. Tato omezení mají zjednoduešenì øeèeno za výsledek, že pokud vytvoøíte adresáø obvyklou cestou, nelze do nìj zapisovat. Ale pokud vytváøíte adresáø pomocí FTP úètu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváøení adresáøù pøes FTP prakticky jedinou cestou, jak mít možnost úspìšnì používat SPARTACUS a upload souborù.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáøi Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pøipojujete pøes FTP, nemusíte se nutnì pøipojit do adresáøe Serendipity. Zde tedy musíte specifikovat cestu k adresáøi Srendipity od adresáøe, do kterého se FTP pøihlašuje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístìní zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co dìláte, jste-li zkušený uživatel. Pokud jsou pøednastavené mirror servery vypnuté nebo nepracují správnì, Serendipity se pokusí pøipojit k Vámi zadaným mirror serverùm (tøeba mùžete zadat http://mirror.org/serendipity/). Tyto servery musí umìt zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáøe "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým vìøíte a které plnì zrcadlí všechny soubory CVS úložištì Serendipity. Lze zadat více zrcadel, oddìlených "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístìní zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co dìláte, jste-li zkušený uživatel. Pokud jsou pøednastavené mirror servery vypnuté nebo nepracují správnì, Serendipity se pokusí pøipojit k Vámi zadaným mirror serverùm (tøeba mùžete zadat http://mirror.org/serendipity/). Tyto servery musí umìt zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáøe "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým vìøíte a které plnì zrcadlí všechny soubory CVS úložištì Serendipity. Lze zadat více zrcadel, oddìlených "|".'); diff --git a/plugins/serendipity_event_spartacus/lang_cz.inc.php b/plugins/serendipity_event_spartacus/lang_cz.inc.php index 5c607431..c202162f 100644 --- a/plugins/serendipity_event_spartacus/lang_cz.inc.php +++ b/plugins/serendipity_event_spartacus/lang_cz.inc.php @@ -1,4 +1,4 @@ -(On-line úlo¾i¹tì vrátilo chybu %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo mo¾no získat data z on-line úlo¾i¹tì modulu Spartacus. Zkou¹ka dostupnosti úlo¾i¹tì na adrese %s.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To mù¾e znamenat, ¾e je dignostická stránka mimo provoz. Zkuste to prosím pozdìji.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknìte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistìte, zda odpovídá.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pøipojit ke Googlu, ale neúspì¹nì (chyba è.%d: %s).
          Vá¹ server blokuje odchozí spojení. SPARTACUS nebude fungovat, proto¾e se nemù¾e pøipojit do svého online úlo¾i¹tì. Kontaktujte prosím svého poskytovatele webhostingu a po¾ádejte ho o povolení odchozích pøipojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresáøù. Jednodu¹e stáhnìte nejnovìj¹í verzi pluginu z SPARTACUS online úlo¾i¹tì, rozbalte ho a napøíklad pomocí FTP nahrajte do adresáøe /plugins/ ve Va¹í instalaci Serendipity.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podaøilo spojit s Googlem, ale nemù¾e se spojit s on-line úlo¾i¹tìm modulu SPARTACUS. Je mo¾né, ¾e Vá¹ server blokuje nìkterá odchozí spojení, nebo je on-line úlo¾i¹tì mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, ¾e nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, proto¾e nemù¾e kontaktovat on-line úlo¾i¹tì.

          '); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístìní souborù/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístìní souborù/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMÌÒTE tuto hodnotu, pokud opravdu dobøe nevíte, co dìláte a jestli server orpavdu funguje. Tato volba je pøístupná pro teprve plánované funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborù'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde mù¾ete zadat (FTP/Shell) vlastníka souborù (jako napø. "nobody") sta¾ených pomocí Spartacus pluginu. Pokud je nevyplnìné, nejsou provádìny ¾ádné zmìny vlastníka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Pøístupová práva sta¾ených souborù.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde mù¾ete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro soubory (FTP/Shell) sta¾ené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude pou¾ito standardní systémové nastavení. Pamatujte, ¾e ne v¹echny webové servery umo¾òují zmìnu práv. Napø. servery ì¾ící v safe_mode módu. Mìjte na pamìti, ¾e práva musí umo¾nit webovému u¾ivateli, pod kterým bì¾í PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen pøepsat staré soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Pøístupová práva sta¾ených adresáøù'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde mù¾ete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro adresáøe (FTP/Shell) sta¾ené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude pou¾ito standardní systémové nastavení. Pamatujte, ¾e ne v¹echny webové servery umo¾òují zmìnu práv. Napø. servery ì¾ící v safe_mode módu. Mìjte na pamìti, ¾e práva musí umo¾nit webovému u¾ivateli, pod kterým bì¾í PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoøit nové adresáøe.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umo¾òuje stáhnout a instalovat roz¹iøující moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Kliknìte zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevøít. Server Serendipity nebo SourceForge.net mo¾ná nebì¾í - omlouváme se, zkuste to pozdìji.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevøení URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Pøijato %s bytù z vý¹e uvedené URL. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Pøijato %s bytù z ji¾ existujícího souboru na Va¹em serveru. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspì¹nì sta¾ena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (On-line úlo¾i¹tì vrátilo chybu %s.)
          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nebylo mo¾no získat data z on-line úlo¾i¹tì modulu Spartacus. Zkou¹ka dostupnosti úlo¾i¹tì na adrese %s.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To mù¾e znamenat, ¾e je dignostická stránka mimo provoz. Zkuste to prosím pozdìji.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknìte zde pro zobrazení diagnstické stránky modulu Spartacus a zjistìte, zda odpovídá.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS se pokusil pøipojit ke Googlu, ale neúspì¹nì (chyba è.%d: %s).
          Vá¹ server blokuje odchozí spojení. SPARTACUS nebude fungovat, proto¾e se nemù¾e pøipojit do svého online úlo¾i¹tì. Kontaktujte prosím svého poskytovatele webhostingu a po¾ádejte ho o povolení odchozích pøipojení k jiným webovým stránkám.

          Zásuvné moduly lze instalovat z lokálních adresáøù. Jednodu¹e stáhnìte nejnovìj¹í verzi pluginu z SPARTACUS online úlo¾i¹tì, rozbalte ho a napøíklad pomocí FTP nahrajte do adresáøe /plugins/ ve Va¹í instalaci Serendipity.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          Modulu SPARTACUS se podaøilo spojit s Googlem, ale nemù¾e se spojit s on-line úlo¾i¹tìm modulu SPARTACUS. Je mo¾né, ¾e Vá¹ server blokuje nìkterá odchozí spojení, nebo je on-line úlo¾i¹tì mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, ¾e nemáte blokována odchozí spojení. SPARTACUS nebude fungovat, proto¾e nemù¾e kontaktovat on-line úlo¾i¹tì.

          '); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístìní souborù/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístìní souborù/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMÌÒTE tuto hodnotu, pokud opravdu dobøe nevíte, co dìláte a jestli server orpavdu funguje. Tato volba je pøístupná pro teprve plánované funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborù'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde mù¾ete zadat (FTP/Shell) vlastníka souborù (jako napø. "nobody") sta¾ených pomocí Spartacus pluginu. Pokud je nevyplnìné, nejsou provádìny ¾ádné zmìny vlastníka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Pøístupová práva sta¾ených souborù.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde mù¾ete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro soubory (FTP/Shell) sta¾ené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude pou¾ito standardní systémové nastavení. Pamatujte, ¾e ne v¹echny webové servery umo¾òují zmìnu práv. Napø. servery ì¾ící v safe_mode módu. Mìjte na pamìti, ¾e práva musí umo¾nit webovému u¾ivateli, pod kterým bì¾í PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen pøepsat staré soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Pøístupová práva sta¾ených adresáøù'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde mù¾ete zadat hodnotu pøístupových práv v osmièkové soustavì (jako "0777") pro adresáøe (FTP/Shell) sta¾ené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude pou¾ito standardní systémové nastavení. Pamatujte, ¾e ne v¹echny webové servery umo¾òují zmìnu práv. Napø. servery ì¾ící v safe_mode módu. Mìjte na pamìti, ¾e práva musí umo¾nit webovému u¾ivateli, pod kterým bì¾í PHP, práva ètení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvoøit nové adresáøe.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Mù¾ete upgradovat více roz¹iøujících modulù najednou na odkaz "upgrade" prostøedním tlaèítkem my¹i. Upgrade se otevøe v novém oknì/nové zálo¾ce. Pamatujte, ¾e automatická aktualizace v¹ech roz¹iøujících modulù je èasovì nároèná operace a mù¾e vést k pøekroèení nastavených èasových limitù na serveru a z toho dùvodu k neúplnì sta¾eným souborùm. Proto tato funkènost není zámìrnì snadno pøístupná.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Mù¾ete upgradovat více roz¹iøujících modulù najednou na odkaz "upgrade" prostøedním tlaèítkem my¹i. Upgrade se otevøe v novém oknì/nové zálo¾ce. Pamatujte, ¾e automatická aktualizace v¹ech roz¹iøujících modulù je èasovì nároèná operace a mù¾e vést k pøekroèení nastavených èasových limitù na serveru a z toho dùvodu k neúplnì sta¾eným souborùm. Proto tato funkènost není zámìrnì snadno pøístupná.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o pou¾ití knihovny cURL jako zálo¾ního øe¹ení...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo mo¾né stáhnout soubory z on-line úlo¾i¹tì modulu SPARTACUS, nicménì se povedlo spojit se s úlo¾i¹tìm. To znamená, ¾e Vá¹ poskytovatel nejspí¹e pou¾ívá obsahový filtr a neumo¾òuje stáhovat pøes web *.php soubory. Buï musíte Va¹eho poskytovatele po¾ádat o vypnutí pøísu¹ných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruènì.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o pou¾ití knihovny cURL jako zálo¾ního øe¹ení...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo mo¾né stáhnout soubory z on-line úlo¾i¹tì modulu SPARTACUS, nicménì se povedlo spojit se s úlo¾i¹tìm. To znamená, ¾e Vá¹ poskytovatel nejspí¹e pou¾ívá obsahový filtr a neumo¾òuje stáhovat pøes web *.php soubory. Buï musíte Va¹eho poskytovatele po¾ádat o vypnutí pøísu¹ných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ruènì.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování roz¹iøujících modulù pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování ¹ablon pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování roz¹iøujících modulù pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování ¹ablon pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlí¾ení informací o verzích pluginù'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, náv¹tìvníci %s si mohou zobrazit informace o verzích v¹ech nainstalovaných plugin. Není ¹patný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti ne¾ádoucím pøístupùm.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému pøístupu k informacím o verzích pluginù'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginù.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlí¾ení informací o verzích pluginù'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, náv¹tìvníci %s si mohou zobrazit informace o verzích v¹ech nainstalovaných plugin. Není ¹patný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti ne¾ádoucím pøístupùm.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému pøístupu k informacím o verzích pluginù'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginù.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodaøilo se pøipojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresáø (%s) nelze vytvoøit'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáøe (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresáø (%s) byl úspì¹nì vytvoøen.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodaøilo se pøipojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresáø (%s) nelze vytvoøit'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáøe (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresáø (%s) byl úspì¹nì vytvoøen.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Pou¾ít vytváøení adresáøù pøes FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám bì¾í PHP v "safe_mode", musíte se podøídit jistým omezením. Tato omezení mají zjednodue¹enì øeèeno za výsledek, ¾e pokud vytvoøíte adresáø obvyklou cestou, nelze do nìj zapisovat. Ale pokud vytváøíte adresáø pomocí FTP úètu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváøení adresáøù pøes FTP prakticky jedinou cestou, jak mít mo¾nost úspì¹nì pou¾ívat SPARTACUS a upload souborù.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'U¾ivatelské jméno k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáøi Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pøipojujete pøes FTP, nemusíte se nutnì pøipojit do adresáøe Serendipity. Zde tedy musíte specifikovat cestu k adresáøi Srendipity od adresáøe, do kterého se FTP pøihla¹uje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Pou¾ít vytváøení adresáøù pøes FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám bì¾í PHP v "safe_mode", musíte se podøídit jistým omezením. Tato omezení mají zjednodue¹enì øeèeno za výsledek, ¾e pokud vytvoøíte adresáø obvyklou cestou, nelze do nìj zapisovat. Ale pokud vytváøíte adresáø pomocí FTP úètu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváøení adresáøù pøes FTP prakticky jedinou cestou, jak mít mo¾nost úspì¹nì pou¾ívat SPARTACUS a upload souborù.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'U¾ivatelské jméno k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáøi Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru pøipojujete pøes FTP, nemusíte se nutnì pøipojit do adresáøe Serendipity. Zde tedy musíte specifikovat cestu k adresáøi Srendipity od adresáøe, do kterého se FTP pøihla¹uje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístìní zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu pou¾ívejte jen pokud opravdu víte, co dìláte, jste-li zku¹ený u¾ivatel. Pokud jsou pøednastavené mirror servery vypnuté nebo nepracují správnì, Serendipity se pokusí pøipojit k Vámi zadaným mirror serverùm (tøeba mù¾ete zadat http://mirror.org/serendipity/). Tyto servery musí umìt zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáøe "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým vìøíte a které plnì zrcadlí v¹echny soubory CVS úlo¾i¹tì Serendipity. Lze zadat více zrcadel, oddìlených "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístìní zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu pou¾ívejte jen pokud opravdu víte, co dìláte, jste-li zku¹ený u¾ivatel. Pokud jsou pøednastavené mirror servery vypnuté nebo nepracují správnì, Serendipity se pokusí pøipojit k Vámi zadaným mirror serverùm (tøeba mù¾ete zadat http://mirror.org/serendipity/). Tyto servery musí umìt zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáøe "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým vìøíte a které plnì zrcadlí v¹echny soubory CVS úlo¾i¹tì Serendipity. Lze zadat více zrcadel, oddìlených "|".'); diff --git a/plugins/serendipity_event_spartacus/lang_de.inc.php b/plugins/serendipity_event_spartacus/lang_de.inc.php index 1568e2af..e8c18dda 100644 --- a/plugins/serendipity_event_spartacus/lang_de.inc.php +++ b/plugins/serendipity_event_spartacus/lang_de.inc.php @@ -1,4 +1,4 @@ -(Der Mirror-Speicherort antwortet mit Fehler %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Prüfe Verfügbarkeit der Quelle...

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Die Prüfung der Verfügbarkeit einer Spartacus-Quelle konnte nicht durchgeführt werden (HTTP-Code %s). Bitte probieren Sie es später wieder.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klicken Sie hier um die Spartacus-Verfügbarkeitsprüfung anzusehen und dessen Erreichbarkeit zu überprüfen.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).
          Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgeführt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.

          Plugins können nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von der SPARTACUS Webseite runter, entpacken es und laden es in ihr Serendipity "plugin"-Verzeichnis hoch.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. Möglicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen möglich sind. Sie können SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Prüfe Verfügbarkeit der Quelle...

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Die Prüfung der Verfügbarkeit einer Spartacus-Quelle konnte nicht durchgeführt werden (HTTP-Code %s). Bitte probieren Sie es später wieder.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Klicken Sie hier um die Spartacus-Verfügbarkeitsprüfung anzusehen und dessen Erreichbarkeit zu überprüfen.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).
          Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgeführt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.

          Plugins können nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von der SPARTACUS Webseite herunter, entpacken es und laden es in ihr Serendipity "plugins"-Verzeichnis hoch.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. Möglicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen möglich sind. Sie können SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.

          '); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Eigene Mirror-Quelle'); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Diese Option ist nur für Experten gedacht. Falls keiner der voreingestellten Mirror-Server aufgrund von Downtime oder Problemen verfügbar ist, kann hier ein eigener Server-Name wie http://mirror.org/serendipity/ eingetragen werden. Dort müssten die XML-Dateien für Spartacus im Verzeichnis liegen, und Unterverzeichnisse wie additional_plugins und additional_themes existieren. Geben Sie nur Mirrors hier ein, denen Sie vertrauen, auf denen eine Kopie unseres CVS-Repositories gespeichert ist. Mehrere Mirrors können mit "|" getrennt eingegeben werden.'); @@ -45,16 +46,16 @@ @define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Spartacus verwenden, um Themes zu laden?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Fernabfrage für Versions-Informationen der Plugins zulassen?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Wenn aktiviert, können Besucher von %s Versions-Informationen über alle installierten Plugins abrufen. Es wird dringend empfohlen, diese URL mittels benutzerdefinierten .htaccess Regeln vor unauthorisiertem Zugriff zu schützen.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information der Plugins'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'gibt den letzten Teil der URI an, welche die Benutzer wissen müssen, um den Fernabruf der Versions-Informationen durchzuführen.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Gibt den letzten ("geheimen") Teil der URI an, welche die Benutzer wissen müssen, um den Fernabruf der Versions-Informationen durchzuführen.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'FTP Fehler: Kann nicht per FTP verbinden.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'FTP Fehler: Kann das Verzeichnis (%s) nicht anlegen.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'FTP Fehler: Kann die Verzeichnisrechte von (%s) nicht ändern.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Verzeichnis (%s) erfolgreich angelegt.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Lege Verzeichnis unter Verwendung von FTP an?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode läuft, gelten einige Einschränkungen. Das Ergebnis dieser Einschränkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nmutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten für Ihren Server müssen dazu ausgefüllt werden'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode läuft, gelten einige Einschränkungen. Das Ergebnis dieser Einschränkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten für Ihren Server müssen dazu ausgefüllt werden'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'FTP Serveradresse'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'FTP Benutzername'); @define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'FTP Passwort'); @define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP Serendipity Verzeichnis'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login über FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier möglch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login über FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier möglch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); diff --git a/plugins/serendipity_event_spartacus/lang_en.inc.php b/plugins/serendipity_event_spartacus/lang_en.inc.php index 42993a1d..fadd4873 100644 --- a/plugins/serendipity_event_spartacus/lang_en.inc.php +++ b/plugins/serendipity_event_spartacus/lang_en.inc.php @@ -1,7 +1,7 @@ * EN-Revision: Revision of lang_en.inc.php */ @@ -15,11 +15,11 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Fetched %s bytes from already existing file on your server. Saving file as %s...'); @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data successfully fetched.'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (The repository returned error code %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Unable to retrieve data from SPARTACUS repository. Checking for repository availability on %s.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          The SPARTACUS health site returned an error (HTTP code %s). This indicates that the SPARTACUS health site is down. Please try again later.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Click here to view the SPARTACUS health site and determine if it is responding.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS attempted to connect to Google and failed (error %d: %s).
          Your server is blocking outgoing connections. SPARTACUS will not function because it cannot contact the SPARTACUS repository. Please contact your website provider and ask them to allow outgoing connections to web sites.

          Plugins can still be installed from your local directories. Simply download the plugin from the SPARTACUS web repository, unzip it, and upload the files to your Serendipity plugin directory.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS can contact Google, but cannot contact the SPARATACUS repository. It is possible that your server is blocking some outgoing connections, or that the SPARTACUS health site is down. Please contact your website provider to ensure that outgoing connections are allowed. You will not be able to use SPARTACUS unless your server can contact the SPARTACUS repository.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Unable to retrieve data from SPARTACUS repository. Checking for repository availability on %s.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          The SPARTACUS health site returned an error (HTTP code %s). This indicates that the SPARTACUS health site is down. Please try again later.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Click here to view the SPARTACUS health site and determine if it is responding.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS attempted to connect to Google and failed (error %d: %s).
          Your server is blocking outgoing connections. SPARTACUS will not function because it cannot contact the SPARTACUS repository. Please contact your website provider and ask them to allow outgoing connections to web sites.

          Plugins can still be installed from your local directories. Simply download the plugin from the SPARTACUS web repository, unzip it, and upload the files to your Serendipity plugin directory.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS can contact Google, but cannot contact the SPARATACUS repository. It is possible that your server is blocking some outgoing connections, or that the SPARTACUS health site is down. Please contact your website provider to ensure that outgoing connections are allowed. You will not be able to use SPARTACUS unless your server can contact the SPARTACUS repository.

          '); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'File/Mirror location (XML metadata)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'File/Mirror location (files)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Choose a download location. Do NOT change this value unless you know what you are doing and if servers get oudated. This option is available mainly for forward compatibility.'); @@ -30,6 +30,7 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permissions downloaded directories'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Here you can enter the octal mode (like "0777") of the directory permissions for directories (FTP/Shell) downloaded by Spartacus. If empty, the default permission mask of the system are used. Note that not all servers allow changing/setting permissions. Pay attention that the applied permissions allow reading and writing for the webserver user. Else spartacus/Serendipity cannot overwrite existing directories.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK', 'Update plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Update sidebar plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Update event plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'You can upgrade multiple plugins at once by opening the update-link in a new tab (middle mouse button)'); diff --git a/plugins/serendipity_event_spartacus/lang_es.inc.php b/plugins/serendipity_event_spartacus/lang_es.inc.php index 27ea6dac..3316978a 100644 --- a/plugins/serendipity_event_spartacus/lang_es.inc.php +++ b/plugins/serendipity_event_spartacus/lang_es.inc.php @@ -1,6 +1,6 @@ - * EN-Revision: 690 */ @@ -23,4 +23,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permisos de los directorios descargados'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Aquí puedes ingresar los permisos de los directorios (FTP/Shell) descargados por Spartacus en modo octal (por ejemplo "0777"). Si lo dejas vacío, los permisos por defecto del sistema serán utilizados. Nota que no todos los servidores permiten definir/cambiar permisos. Presta atención que los permisos aplicados permiten la lectura y escritura por parte del usuario del webserver. Fuera de eso spartacus/Serendipity no puede sobreescribir directorios existentes.'); -?> diff --git a/plugins/serendipity_event_spartacus/lang_fr.inc.php b/plugins/serendipity_event_spartacus/lang_fr.inc.php index 652301e3..f7199fa5 100644 --- a/plugins/serendipity_event_spartacus/lang_fr.inc.php +++ b/plugins/serendipity_event_spartacus/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/lang_is.inc.php b/plugins/serendipity_event_spartacus/lang_is.inc.php index 2028e4ef..588566eb 100644 --- a/plugins/serendipity_event_spartacus/lang_is.inc.php +++ b/plugins/serendipity_event_spartacus/lang_is.inc.php @@ -1,10 +1,11 @@ - * EN-Revision: 1325 */ @@ -27,4 +27,4 @@ @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Check for new sidebar plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Check for new event plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Hint: You can upgrade multiple plugins at once by clicking the upgrade-link with your middle mouse button, so that it opens in a new window/tab of your browser. Note that upgrading all plugins automatically could lead to network timeouts and garbaged files, thus this functionality does not exist intentionally.'); -?> + diff --git a/plugins/serendipity_event_spartacus/lang_ko.inc.php b/plugins/serendipity_event_spartacus/lang_ko.inc.php index 47e2b891..a023bbe4 100644 --- a/plugins/serendipity_event_spartacus/lang_ko.inc.php +++ b/plugins/serendipity_event_spartacus/lang_ko.inc.php @@ -1,17 +1,16 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 í”ŒëŸ¬ê·¸ì¸ ì ‘ê·¼ 보관소 ë„구 ë° ê°œì¸í™”/통합화 시스템) - 온ë¼ì¸ 보관소ì—서 플러그ì¸ì„ ë‹¤ìš´ë¡œë“œë°›ì„ ìˆ˜ 있게 함'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온ë¼ì¸ 보관소ì—서 새로운 %s(ì„)를 받으려면 여기를 누르십시오.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì†í•  수 없었습니다. 세렌디피티나 소스í¬ì§€ 서버가 ë‹¤ìš´ëœ ê²ƒ 같습니다. 죄송하지만 잠시 후 재시ë„하시기 ë°”ëžë‹ˆë‹¤.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì† ì‹œë„중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'ìœ„ì˜ ì£¼ì†Œì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'ì„œë²„ì— ì´ë¯¸ 존재하는 파ì¼ì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'ë°ì´í„°ë¥¼ 성공ì ìœ¼ë¡œ 받았습니다.'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파ì¼/미러 위치 (XML 메타ë°ì´í„°)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파ì¼/미러 위치 (파ì¼)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 ì •ë³´ê°€ ë°”ë€Œì—ˆì„ ê²½ìš°ê°€ 아니ë¼ë©´ ì´ ê°’ì„ ë°”ê¾¸ì§€ 마십시오. ì´ ì˜µì…˜ì€ ìƒìœ„ í˜¸í™˜ì„±ì„ ìœ„í•´ 존재합니다.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 í”ŒëŸ¬ê·¸ì¸ ì ‘ê·¼ 보관소 ë„구 ë° ê°œì¸í™”/통합화 시스템) - 온ë¼ì¸ 보관소ì—서 플러그ì¸ì„ ë‹¤ìš´ë¡œë“œë°›ì„ ìˆ˜ 있게 함'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온ë¼ì¸ 보관소ì—서 새로운 %s(ì„)를 받으려면 여기를 누르십시오.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì†í•  수 없었습니다. 세렌디피티나 소스í¬ì§€ 서버가 ë‹¤ìš´ëœ ê²ƒ 같습니다. 죄송하지만 잠시 후 재시ë„하시기 ë°”ëžë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'ì¸í„°ë„· 주소 %s ì— ì ‘ì† ì‹œë„중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'ìœ„ì˜ ì£¼ì†Œì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'ì„œë²„ì— ì´ë¯¸ 존재하는 파ì¼ì—서 %s ë°”ì´íŠ¸ë¥¼ 받았습니다. 파ì¼ì„ %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'ë°ì´í„°ë¥¼ 성공ì ìœ¼ë¡œ 받았습니다.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파ì¼/미러 위치 (XML 메타ë°ì´í„°)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파ì¼/미러 위치 (파ì¼)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 ì •ë³´ê°€ ë°”ë€Œì—ˆì„ ê²½ìš°ê°€ 아니ë¼ë©´ ì´ ê°’ì„ ë°”ê¾¸ì§€ 마십시오. ì´ ì˜µì…˜ì€ ìƒìœ„ í˜¸í™˜ì„±ì„ ìœ„í•´ 존재합니다.'); -?> diff --git a/plugins/serendipity_event_spartacus/lang_pl.inc.php b/plugins/serendipity_event_spartacus/lang_pl.inc.php index 0d66c8b6..7cc06e60 100644 --- a/plugins/serendipity_event_spartacus/lang_pl.inc.php +++ b/plugins/serendipity_event_spartacus/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -15,14 +15,14 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Pobrano %s bajtów z ju¿ istniej±cego pliku na Twoim serwerze. Zapisujê plik jako %s...'); @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Pobieranie danych zakoñczone sukcesem.'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (repozytorium zwróci³o kod b³êdu %s.)
          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nie mogê pobraæ danych z repozytorium SPARTACUSa. Sprawdzam dostêpno¶æ repozytorium.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Strona z informacj± o dostêpno¶ci repozytoriów dla SPARTACUSa zwróci³a b³±d (kod HTTP %s). To oznacza, ¿e strona aktualnie nie funkcjonuje. Proszê spróbowaæ ponownie pó¼niej.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknij tutaj by zobaczyæ stronê z informacj± o dostêpno¶ci repozytoriów dla SPARTACUSa i sprawd¼, czy strona odpowiada.

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS próbowa³ po³±czyæ siê z Google i nie powiod³a siê ta operacja (b³±d %d: %s).
          Twój serwer blokuje po³±czenia wychodz±ce. Your server is blocking outgoing connections. SPARTACUS nie bêdzie funkcjonowa³ prawid³owo poniewa¿ nie mo¿e skontaktowaæ siê z repozytorium. Proszê, skontaktuj siê z providerem i popro¶ o zezwolenie na po³±czenia wychodz±ce z serwera.

          Wtyczki mog± byæ oczywi¶cie instalowane bezpo¶rednio z katalogów na serwerze. Po prostu pobierz wtyczkê z repozytorium SPARTACUSa, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS mo¿e po³±czyæ siê z Google ale nie mo¿e po³±czyæ siê z repozytorium. Jest mo¿liwe, ¿e Twój serwer blokuje pewne po³±czenia wychodz±ce albo ¿e strona z repozytorium SPARTACUSa aktualnie nie dzia³a. Skontaktuj siê z firm± hostuj±c± Twoj± stronê i upewnij siê, ¿e po³±czenia wychodz±ce s± dozwolone. Nie bêdziesz móg³ u¿ywaæ SPARTACUSa dopóki Twój serwer nie bêdzie móg³ kontaktowaæ siê z repozytorium SPARTACUSa.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          Nie mogê pobraæ danych z repozytorium SPARTACUSa. Sprawdzam dostêpno¶æ repozytorium.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          Strona z informacj± o dostêpno¶ci repozytoriów dla SPARTACUSa zwróci³a b³±d (kod HTTP %s). To oznacza, ¿e strona aktualnie nie funkcjonuje. Proszê spróbowaæ ponownie pó¼niej.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          Kliknij tutaj by zobaczyæ stronê z informacj± o dostêpno¶ci repozytoriów dla SPARTACUSa i sprawd¼, czy strona odpowiada.

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUS próbowa³ po³±czyæ siê z Google i nie powiod³a siê ta operacja (b³±d %d: %s).
          Twój serwer blokuje po³±czenia wychodz±ce. Your server is blocking outgoing connections. SPARTACUS nie bêdzie funkcjonowa³ prawid³owo poniewa¿ nie mo¿e skontaktowaæ siê z repozytorium. Proszê, skontaktuj siê z providerem i popro¶ o zezwolenie na po³±czenia wychodz±ce z serwera.

          Wtyczki mog± byæ oczywi¶cie instalowane bezpo¶rednio z katalogów na serwerze. Po prostu pobierz wtyczkê z repozytorium SPARTACUSa, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUS mo¿e po³±czyæ siê z Google ale nie mo¿e po³±czyæ siê z repozytorium. Jest mo¿liwe, ¿e Twój serwer blokuje pewne po³±czenia wychodz±ce albo ¿e strona z repozytorium SPARTACUSa aktualnie nie dzia³a. Skontaktuj siê z firm± hostuj±c± Twoj± stronê i upewnij siê, ¿e po³±czenia wychodz±ce s± dozwolone. Nie bêdziesz móg³ u¿ywaæ SPARTACUSa dopóki Twój serwer nie bêdzie móg³ kontaktowaæ siê z repozytorium SPARTACUSa.

          '); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Lokalizacja pliku/mirrora (metadane XML)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Lokalizacja pliku/mirrora (pliki)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizacjê, z której bêd± pobierane dane. NIE zmieniaj tej warto¶ci o ile dobrze nie wiesz, co robisz i o ile serwer jest dostêpny. Opcja istnieje g³ównie dla kompatybilno¶ci z przysz³ymi wersjami wtyczki.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizacjê, z której bêd± pobierane dane. NIE zmieniaj tej warto¶ci o ile dobrze nie wiesz, co robisz i o ile serwer jest dostêpny. Opcja istnieje g³ównie dla kompatybilno¶ci z przysz³ymi wersjami wtyczki.'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'W³a¶ciciel pobranych plików'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Tu mo¿esz podaæ w³a¶ciciela (jak np. "nobody") plików pobieranych i zapisywanych przez Spartacusa. Pozostawienie pustego pola nie spowoduje zmian uprawnieñ do plików.'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Upraweniania pobieranych plików'); @@ -33,4 +33,4 @@ @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Sprawd¼ czy s± nowe wtyczki Panelu bocznego'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Sprawd¼ czy s± nowe wtyczki Zdarzeñ'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Podpowied¼: Mo¿esz uaktualniæ kilka wtyczek jednocze¶nie klikaj±c link uaktualnienia ¶rodkowym klawiszem myszy, tak by otworzyæ ten link w nowym oknie lub nowym tabie (zak³adce) przegl±darki. Zauwa¿, ¿e uaktualnianie kilku wtyczek jednocze¶nie mog³oby prowadziæ do timeoutów i problemów z pobieraniem plików a w efekcie - nagromadzenia ¶mieci i potencjalnych problemów. Dlatego taka funkcjonalno¶æ nie zosta³a zaimplementowana rozmy¶lnie.'); -?> + diff --git a/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php b/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php index d43995c4..24239b75 100644 --- a/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/lang_tn.inc.php b/plugins/serendipity_event_spartacus/lang_tn.inc.php index 554bf8f7..68df2ead 100644 --- a/plugins/serendipity_event_spartacus/lang_tn.inc.php +++ b/plugins/serendipity_event_spartacus/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,21 +12,21 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - å…許你從 s9y 的線上存庫下載外掛'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y çš„å¤–æŽ›å­˜åº«å®‰è£æ–° %s'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ç¶²å€ %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有å•題 - è«‹ç¨å¾Œåœ¨è©¦ã€‚'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'æ‰“é–‹ç¶²å€ %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上é¢çš„ç¶²å€æŽ¥æ”¶ %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'å­˜å–資料完æˆã€‚'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/é¡åƒ ä½å€ (XML metadata)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/é¡åƒ ä½å€ (檔案)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '鏿“‡ä¸€å€‹ä¸‹è¼‰é»žã€‚ä¸è¦æ”¹è®Šé€™å€‹è¨­å®šå€¼åˆéžæ‚¨äº†è§£å®ƒçš„作用。這個é¸é …ä¸»è¦æ˜¯ç‚ºäº†ç›¸å®¹æ€§æ‰€è¨­è¨ˆã€‚'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'ä¸‹è¼‰æª”æ¡ˆçš„æ“æœ‰äºº'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ“æœ‰äºº (譬如 "nobody")ã€‚å¦‚æžœç©ºç™½ä¸æœƒåšä»»ä½•改變。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權é™'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權é™'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案的目錄 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - å…許你從 s9y 的線上存庫下載外掛'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y çš„å¤–æŽ›å­˜åº«å®‰è£æ–° %s'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'ç¶²å€ %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有å•題 - è«‹ç¨å¾Œåœ¨è©¦ã€‚'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'æ‰“é–‹ç¶²å€ %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上é¢çš„ç¶²å€æŽ¥æ”¶ %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個ä½å…ƒçµ„çš„è³‡æ–™ã€‚å„²å­˜æˆæª”案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'å­˜å–資料完æˆã€‚'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/é¡åƒ ä½å€ (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/é¡åƒ ä½å€ (檔案)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '鏿“‡ä¸€å€‹ä¸‹è¼‰é»žã€‚ä¸è¦æ”¹è®Šé€™å€‹è¨­å®šå€¼åˆéžæ‚¨äº†è§£å®ƒçš„作用。這個é¸é …ä¸»è¦æ˜¯ç‚ºäº†ç›¸å®¹æ€§æ‰€è¨­è¨ˆã€‚'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'ä¸‹è¼‰æª”æ¡ˆçš„æ“æœ‰äºº'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ“æœ‰äºº (譬如 "nobody")ã€‚å¦‚æžœç©ºç™½ä¸æœƒåšä»»ä½•改變。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權é™'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權é™'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡å¯ä»¥è¼¸å…¥ Spartacus 所下載的檔案的目錄 (FTP/Shell) æ¬Šé™ (譬如 "0777")。如果空白將會使用主機的é è¨­æ¬Šé™ã€‚è¨˜å¾—ä¸æ˜¯æ¯å€‹ä¸»æ©Ÿéƒ½å…許改變權é™ã€‚è¨˜å¾—å°‡æ¬Šé™æ”¹ç‚ºå¯è®€å–和寫入檔案,ä¸ç„¶ Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); + diff --git a/plugins/serendipity_event_spartacus/lang_zh.inc.php b/plugins/serendipity_event_spartacus/lang_zh.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/lang_zh.inc.php +++ b/plugins/serendipity_event_spartacus/lang_zh.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'æˆåŠŸèŽ·å–相关数æ®'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '
          (æ’ä»¶åº“è¿”å›žå¦‚ä¸‹é”™è¯¯ä»£ç  %s 。)
          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '

          无法从SPARTACUSæ’件库中获å–到数æ®ã€‚正在在 %s ä¸Šé¢æ£€æŸ¥æ’件库状æ€ä¿¡æ¯ã€‚

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '

          SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘ç«™è¿”å›žäº†ä¸€ä¸ªé”™è¯¯ä»£ç  (HTTPä»£ç  %s)。这æ„味ç€SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请ç¨åŽé‡æ–°å°è¯•。

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '

          点击此处访问SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站, 并确认该网站是å¦åœ¨æ­£å¸¸è¿è¡Œä¸­ã€‚

          '); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '

          SPARTACUSå°è¯•连接到Google,但是失败了(错误 %d: %s)。
          ä½ çš„æœåŠ¡å™¨ç¦æ­¢å¤–出连接(outgoing connections)。无法连接到SPARTACUSæ’件库,因此SPARTACUSæ— æ³•æ­£å¸¸å·¥ä½œä»¥ä¸‹è½½ã€æ›´æ–°æ’件。请è”系你的网站空间æœåŠ¡å•†ï¼Œè¦æ±‚他们å…许通过使用外出连接连接到其他网站。

          ä½ ä¾ç„¶å¯ä»¥ä»Žæœ¬åœ°ç›®å½•安装æ’件。åªè¦ä»ŽSPARTACUS网上æ’件库下载相关æ’件,将它解压缩并上传到你的Serendipityçš„æ’件目录中

          '); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '

          SPARTACUSå¯ä»¥è¿žæŽ¥åˆ°Google,但无法连接到SPARTACUSæ’件库。这å¯èƒ½æ˜¯å› ä¸ºä½ çš„æœåŠ¡å™¨ç¦æ­¢æŸäº›å¤–出连接(outgoing connections),或者SPARTACUSæ’件库è¿è¡Œçжæ€ç½‘站目å‰å¤„于瘫痪状æ€ã€‚请è”系你的网站空间æœåŠ¡å•†ï¼Œä»¥ç¡®è®¤æ­¤ç±»å¤–å‡ºè¿žæŽ¥æ˜¯å…许的。你无法使用SPARTACUSæ¥ä¸‹è½½ã€æ›´æ–°æ’件,除éžä½ çš„网站æœåŠ¡å™¨èƒ½å¤Ÿè¿žä¸ŠSPARTACUSæ’件库。

          '); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/é•œåƒ åœ°å€ (XML元数æ®(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/é•œåƒ åœ°å€ (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。ä¸è¦ä¿®æ”¹è¿™ä¸ªè®¾ç½®ï¼Œé™¤éžä½ çŸ¥é“你正在åšä»€ä¹ˆï¼Œæˆ–者你目å‰ä½¿ç”¨çš„下载点已ç»å¤±æ•ˆäº†ã€‚这个设置存在的主è¦ç›®çš„æ˜¯ä¸ºäº†å‘å‰å…¼å®¹ã€‚'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacusæ’件库下载所需文件,但是该æ’件库的è¿è¡ŒçŠ¶æ€æ˜¾ç¤ºè¯¥æ’件库è¿è¡Œæ­£å¸¸ã€‚è¿™æ„味ç€ä½ çš„网站空间æœåŠ¡å•†ä½¿ç”¨äº†åŸºäºŽè®¿é—®å†…å®¹çš„é˜²ç«å¢™ï¼Œé€šè¿‡mod_security或其他åå‘代ç†(reverse proxy)æ¥ç¦æ­¢ä»Žç½‘络上下载或获å–PHP代ç ã€‚你需è¦è¯·ä½ çš„空间æœåŠ¡å•†å…³é—­å®ƒï¼›å¦åˆ™çš„è¯ï¼Œä½ æ— æ³•使用Spartacusæ’件,从而ä¸å¾—䏿‰‹åŠ¨ä¸‹è½½ç›¸å…³æ–‡ä»¶ã€‚'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacusæ¥ä¸‹è½½æ’件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacusæ¥ä¸‹è½½ä¸»é¢˜ï¼Ÿ'); + diff --git a/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php b/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php index a6ac29f4..cc6ee16a 100644 --- a/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php +++ b/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php @@ -8,6 +8,10 @@ ***********/ +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_event_spartacus extends serendipity_event @@ -15,11 +19,6 @@ class serendipity_event_spartacus extends serendipity_event var $title = PLUGIN_EVENT_SPARTACUS_NAME; var $purgeCache = false; - function microtime_float() { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec + (float)$sec); - } - function introspect(&$propbag) { global $serendipity; @@ -28,36 +27,36 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('description', PLUGIN_EVENT_SPARTACUS_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '2.32'); + $propbag->add('version', '2.37.3'); $propbag->add('requirements', array( - 'serendipity' => '0.9', - 'smarty' => '2.6.7', - 'php' => '4.1.0' + 'serendipity' => '1.6', )); $propbag->add('event_hooks', array( - 'backend_plugins_fetchlist' => true, - 'backend_plugins_fetchplugin' => true, + 'backend_plugins_fetchlist' => true, + 'backend_plugins_fetchplugin' => true, - 'backend_templates_fetchlist' => true, - 'backend_templates_fetchtemplate' => true, + 'backend_templates_fetchlist' => true, + 'backend_templates_fetchtemplate' => true, - 'backend_pluginlisting_header' => true, - - 'external_plugin' => true, + 'backend_pluginlisting_header' => true, - 'backend_directory_create' => true, - 'cronjob' => true, + 'external_plugin' => true, + + 'backend_directory_create' => true, + 'cronjob' => true, )); $propbag->add('groups', array('BACKEND_FEATURES')); $propbag->add('configuration', array('enable_plugins', 'enable_themes', 'enable_remote', 'remote_url', 'cronjob', 'mirror_xml', 'mirror_files', 'custommirror', 'chown', 'chmod_files', 'chmod_dir', 'use_ftp', 'ftp_server', 'ftp_username', 'ftp_password', 'ftp_basedir')); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function cleanup() { + function cleanup() + { global $serendipity; // Purge DB cache @@ -77,20 +76,21 @@ class serendipity_event_spartacus extends serendipity_event } } - function &getMirrors($type = 'xml', $loc = false) { + function &getMirrors($type = 'xml', $loc = false) + { static $mirror = array( 'xml' => array( + 'github.com', 'Netmirror.org', - 's9y.org', - 'github.com' + 's9y.org' // 'openmirror.org' ), 'files' => array( + 'github.com', 'Netmirror.org', 'SourceForge.net', - 's9y.org', - 'github.com' + 's9y.org' // 'BerliOS.de (inactive)', // 'openmirror.org' ) @@ -98,26 +98,26 @@ class serendipity_event_spartacus extends serendipity_event static $http = array( 'xml' => array( - 'http://netmirror.org/mirror/serendipity/', - 'http://s9y.org/mirror/', 'https://raw.github.com/s9y/additional_plugins/master/', + 'http://netmirror.org/mirror/serendipity/', + 'http://s9y.org/mirror/' // 'http://openmirror.org/pub/s9y/', ), 'files' => array( + 'https://raw.github.com/s9y/', 'http://netmirror.org/mirror/serendipity/', 'http://php-blog.cvs.sourceforge.net/viewvc/php-blog/', - 'http://s9y.org/mirror/', - 'https://raw.github.com/s9y/', + 'http://s9y.org/mirror/' // 'http://svn.berlios.de/viewcvs/serendipity/', // 'http://openmirror.org/pub/s9y/', ), 'files_health' => array( + 'https://raw.github.com/' => 'https://raw.github.com/', 'http://netmirror.org/' => 'http://netmirror.org/mirror/serendipity/last.txt', 'http://php-blog.cvs.sourceforge.net/' => 'http://php-blog.cvs.sourceforge.net/viewvc/php-blog/serendipity/docs/LICENSE', - 'http://s9y.org/' => 'http://s9y.org/', - 'https://raw.github.com/' => 'https://raw.github.com/', + 'http://s9y.org/' => 'http://s9y.org/' // 'http://svn.berlios.de/' => 'http://svn.berlios.de/viewcvs/serendipity/', // 'http://openmirror.org/' => 'http://openmirror.org/pub/s9y/last.txt', ) @@ -130,7 +130,8 @@ class serendipity_event_spartacus extends serendipity_event } } - function introspect_config_item($name, &$propbag) { + function introspect_config_item($name, &$propbag) + { global $serendipity; switch($name) { @@ -142,7 +143,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', 'none'); $propbag->add('select_values', serendipity_event_cronjob::getValues()); } else { - $propbag->add('type', 'content'); + $propbag->add('type', 'content'); $propbag->add('default', PLUGIN_EVENT_SPARTACUS_CRONJOB); } break; @@ -231,7 +232,7 @@ class serendipity_event_spartacus extends serendipity_event } } break; - + case 'ftp_server': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -240,7 +241,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', ''); } break; - + case 'ftp_username': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -249,7 +250,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', ''); } break; - + case 'ftp_password': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -258,7 +259,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', ''); } break; - + case 'ftp_basedir': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -274,7 +275,8 @@ class serendipity_event_spartacus extends serendipity_event return true; } - function GetChildren(&$vals, &$i) { + function GetChildren(&$vals, &$i) + { $children = array(); $cnt = sizeof($vals); while (++$i < $cnt) { @@ -308,18 +310,20 @@ class serendipity_event_spartacus extends serendipity_event } // remove double slashes without breaking URL - protected function fixUrl($s) { + protected function fixUrl($s) + { return preg_replace('%([^:])([/]{2,})%', '\\1/', $s); } // Create recursive directories; begins at serendipity plugin root folder level - function rmkdir($dir, $sub = 'plugins') { + function rmkdir($dir, $sub = 'plugins') + { global $serendipity; if (serendipity_db_bool($this->get_config('use_ftp')) && $this->get_config('ftp_password') != '') { return $this->make_dir_via_ftp($dir); } - + $spaths = explode('/', $serendipity['serendipityPath'] . $sub . '/'); $paths = explode('/', $dir); @@ -342,7 +346,8 @@ class serendipity_event_spartacus extends serendipity_event } // Apply file permission settings. - function fileperm($stack, $is_dir) { + function fileperm($stack, $is_dir) + { $chmod_dir = intval($this->get_config('chmod_dir'), 8); $chmod_files = intval($this->get_config('chmod_files'), 8); $chown = $this->get_config('chown'); @@ -367,35 +372,37 @@ class serendipity_event_spartacus extends serendipity_event return true; } - function outputMSG($status, $msg) { + function outputMSG($status, $msg) + { global $serendipity; switch($status) { case 'notice': - echo ' '. $msg .'' . "\n"; + echo ' '. $msg .'' . "\n"; break; case 'error': - echo ' '. $msg .'' . "\n"; + echo ' '. $msg .'' . "\n"; if ($serendipity['ajax']) { // we need to set an actual error header so the ajax request can react to the error state header('HTTP/1.1 400'); } break; - default: case 'success': - echo ' '. $msg .'' . "\n"; + default: + echo ' '. $msg .'' . "\n"; break; } } - function &fetchfile($url, $target, $cacheTimeout = 0, $decode_utf8 = false, $sub = 'plugins') { + function &fetchfile($url, $target, $cacheTimeout = 0, $decode_utf8 = false, $sub = 'plugins') + { global $serendipity; static $error = false; // Fix double URL strings. $url = preg_replace('@http(s)?:/@i', 'http\1://', str_replace('//', '/', $url)); - + // --JAM: Get the URL's IP in the most error-free way possible $url_parts = @parse_url($url); $url_hostname = 'localhost'; @@ -408,19 +415,28 @@ class serendipity_event_spartacus extends serendipity_event $data = file_get_contents($target); if (is_object($serendipity['logger'])) $serendipity['logger']->debug(sprintf(PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE, strlen($data), $target)); } else { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } serendipity_plugin_api::hook_event('backend_http_request', $options, 'spartacus'); serendipity_request_start(); - $req = new HTTP_Request($url, $options); + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Statuscode not 200, Akismet HTTP verification request failed.'); + } + } catch (HTTP_Request2_Exception $e) { $resolved_url = $url . ' (IP ' . $url_ip . ')'; $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_FETCHERROR, $resolved_url)); //--JAM: START FIREWALL DETECTION - if ($req->getResponseCode()) { - $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR, $req->getResponseCode())); + if ($response->getStatus()) { + $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR, $response->getStatus())); } $check_health = true; if (function_exists('curl_init')) { @@ -457,9 +473,16 @@ class serendipity_event_spartacus extends serendipity_event $health_options = $options; serendipity_plugin_api::hook_event('backend_http_request', $health_options, 'spartacus_health'); - $health_req = new HTTP_Request($health_url, $health_options); - $health_result = $health_req->sendRequest(); - if (PEAR::isError($health_result)) { + $health_req = new HTTP_Request2($health_url, HTTP_Request2::METHOD_GET, $health_options); + try { + $health_result = $health_req->send(); + if ($health_result->getStatus() != '200') { + $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHERROR, $health_req->getResponseCode())); + $this->outputMSG('notice', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHLINK, $health_url)); + } else { + $this->outputMSG('error', PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED); + } + } catch (HTTP_Request2_Exception $e) { $fp = @fsockopen('www.google.com', 80, $errno, $errstr); if (!$fp) { $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED, $errno, $errstr)); @@ -468,12 +491,6 @@ class serendipity_event_spartacus extends serendipity_event $this->outputMSG('notice', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHLINK, $health_url)); fclose($fp); } - } else if ($health_req->getResponseCode() != '200') { - $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHERROR, $health_req->getResponseCode())); - $this->outputMSG('notice', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHLINK, $health_url)); - } else { - $this->outputMSG('error', PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED); - //--JAM: Parse response and display it. } //--JAM: END FIREWALL DETECTION if (file_exists($target) && filesize($target) > 0) { @@ -483,7 +500,7 @@ class serendipity_event_spartacus extends serendipity_event } else { // Fetch file if (!$data) { - $data = $req->getResponseBody(); + $data = $response->getBody(); } if (is_object($serendipity['logger'])) $serendipity['logger']->debug(sprintf(PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL, strlen($data), $target)); $tdir = dirname($target); @@ -517,7 +534,8 @@ class serendipity_event_spartacus extends serendipity_event return $data; } - function decode(&$data, $force = false) { + function decode(&$data, $force = false) + { // xml_parser_* functions to recoding from ISO-8859-1/UTF-8 if ($force === false && (LANG_CHARSET == 'ISO-8859-1' || LANG_CHARSET == 'UTF-8')) { return true; @@ -542,7 +560,8 @@ class serendipity_event_spartacus extends serendipity_event } } - function &fetchOnline($type, $no_cache = false) { + function &fetchOnline($type, $no_cache = false) + { global $serendipity; switch($type) { @@ -583,7 +602,7 @@ class serendipity_event_spartacus extends serendipity_event $url = $server . '/package_' . $url_type . $lang . '.xml'; $target = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/package_' . $url_type . $lang . '.xml'; - + $xml = $this->fetchfile($url, $target, $cacheTimeout, true); if (strlen($xml) > 0) { $valid = true; @@ -595,7 +614,7 @@ class serendipity_event_spartacus extends serendipity_event $url = $mirror . '/package_' . $url_type . $lang . '.xml'; $cacheTimeout = 60*60*12; // XML file is cached for half a day $target = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/package_' . $url_type . $lang . '.xml'; - + $xml = $this->fetchfile($url, $target, $cacheTimeout, true); } @@ -665,7 +684,8 @@ class serendipity_event_spartacus extends serendipity_event return $tree; } - function &getCachedPlugins(&$plugins, $type) { + function &getCachedPlugins(&$plugins, $type) + { global $serendipity; static $pluginlist = null; @@ -697,7 +717,8 @@ class serendipity_event_spartacus extends serendipity_event return $pluginlist; } - function checkPlugin(&$data, &$plugins, $type) { + function checkPlugin(&$data, &$plugins, $type) + { $installable = true; $upgradeLink = ''; if (in_array($data['class_name'], $plugins)) { @@ -725,7 +746,8 @@ class serendipity_event_spartacus extends serendipity_event return true; } - function &buildList(&$tree, $type) { + function &buildList(&$tree, $type) + { $plugins = serendipity_plugin_api::get_installed_plugins(); if ($tree === 'cached') { @@ -743,54 +765,54 @@ class serendipity_event_spartacus extends serendipity_event foreach($subtree['children'] AS $child => $childtree) { if (is_array($childtree) && isset($childtree['tag'])) { - switch($childtree['tag']) { - case 'name': - $pluginstack[$i]['plugin_class'] = - $pluginstack[$i]['plugin_file'] = - $pluginstack[$i]['class_name'] = - $pluginstack[$i]['true_name'] = $childtree['value']; - break; + switch($childtree['tag']) { + case 'name': + $pluginstack[$i]['plugin_class'] = + $pluginstack[$i]['plugin_file'] = + $pluginstack[$i]['class_name'] = + $pluginstack[$i]['true_name'] = $childtree['value']; + break; - case 'summary': - $pluginstack[$i]['name'] = $childtree['value']; - break; + case 'summary': + $pluginstack[$i]['name'] = $childtree['value']; + break; - case 'website': - $pluginstack[$i]['website'] = $childtree['value']; - break; + case 'website': + $pluginstack[$i]['website'] = $childtree['value']; + break; - case 'changelog': - $pluginstack[$i]['changelog'] = $childtree['value']; - break; + case 'changelog': + $pluginstack[$i]['changelog'] = $childtree['value']; + break; - case 'groups': - $pluginstack[$i]['groups'] = explode(',', $childtree['value']); - break; + case 'groups': + $pluginstack[$i]['groups'] = explode(',', $childtree['value']); + break; - case 'description': - $pluginstack[$i]['description'] = $childtree['value']; - break; + case 'description': + $pluginstack[$i]['description'] = $childtree['value']; + break; - case 'release': - $pluginstack[$i]['version'] = $childtree['children'][0]['value']; + case 'release': + $pluginstack[$i]['version'] = $childtree['children'][0]['value']; - $pluginstack[$i]['requirements'] = array( - 'serendipity' => '', - 'php' => '', - 'smarty' => '' - ); + $pluginstack[$i]['requirements'] = array( + 'serendipity' => '', + 'php' => '', + 'smarty' => '' + ); - foreach((array)$childtree['children'] AS $relInfo) { - if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { - $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + foreach((array)$childtree['children'] AS $relInfo) { + if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { + $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + } } - } - break; + break; - case 'maintainers': - $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; // I dig my PHP arrays ;-) - break; - } + case 'maintainers': + $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; // I dig my PHP arrays ;-) + break; + } } } @@ -807,13 +829,19 @@ class serendipity_event_spartacus extends serendipity_event return $pluginstack; } - function checkArray(&$tree) { + function checkArray(&$tree) + { if (!is_array($tree) || !is_array($tree[0]['children'])) { - echo "DEBUG: The XML file could not be successfully parsed. Download or caching error. Please try again later or switch your XML/File mirror location. You can also try to go to the plugin configuration of the Spartacus Plugin and simply click on 'Save' - this will purge all cached XML files and try to download it again.
          " . print_r($tree, true) . "

          \n"; + $msg = "DEBUG: The XML file could not be successfully parsed. Download or caching error. " . + "Please try again later or switch your XML/File mirror location. ". + "You can also try to go to the plugin configuration of the Spartacus Plugin and simply click on 'Save' - this will purge all cached XML files and try to download it again.\n". + '
          ' . print_r($tree, true) . "
          \n"; + echo ' '. $msg .'' . "\n"; } } - function &buildTemplateList(&$tree) { + function &buildTemplateList(&$tree) + { global $serendipity; $pluginstack = array(); $i = 0; @@ -844,50 +872,37 @@ class serendipity_event_spartacus extends serendipity_event foreach($subtree['children'] AS $child => $childtree) { if (is_array($childtree) && isset($childtree['tag'])) { - switch($childtree['tag']) { - case 'name': - $pluginstack[$i]['name'] = $childtree['value']; - break; + switch($childtree['tag']) { + case 'release': + $pluginstack[$i]['version'] = $childtree['children'][0]['value']; - case 'summary': - $pluginstack[$i]['summary'] = $childtree['value']; - break; + $pluginstack[$i]['requirements'] = array( + 'serendipity' => '', + 'php' => '', + 'smarty' => '' + ); - case 'template': - $pluginstack[$i]['template'] = $childtree['value']; - break; + foreach((array)$childtree['children'] AS $relInfo) { + if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { + $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + } - case 'description': - $pluginstack[$i]['description'] = $childtree['value']; - break; - - case 'release': - $pluginstack[$i]['version'] = $childtree['children'][0]['value']; - - $pluginstack[$i]['requirements'] = array( - 'serendipity' => '', - 'php' => '', - 'smarty' => '' - ); - - foreach((array)$childtree['children'] AS $relInfo) { - if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { - $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + if (isset($relInfo['tag']) && $relInfo['tag'] == 'date') { + $pluginstack[$i]['date'] = $relInfo['value']; + } } - if (isset($relInfo['tag']) && $relInfo['tag'] == 'date') { - $pluginstack[$i]['date'] = $relInfo['value']; - } + $pluginstack[$i]['require serendipity'] = $pluginstack[$i]['requirements']['serendipity']; + break; - } - - $pluginstack[$i]['require serendipity'] = $pluginstack[$i]['requirements']['serendipity']; - break; - - case 'maintainers': - $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; // I dig my PHP arrays ;-) - break; - } + case 'maintainers': + $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; + break; + default: + # Catches name, summary, template, description and recommended. Also a way to extend this later on + $pluginstack[$i][$childtree['tag']] = $childtree['value']; + break; + } } } @@ -898,7 +913,7 @@ class serendipity_event_spartacus extends serendipity_event if (file_exists($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname .'.jpg')) { $pluginstack[$i]['preview_fullsizeURL'] = $preview_fullsizeURL; } else { - if ( ! file_exists($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname)) { + if ( ! file_exists($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname)) { $file = @fopen($preview_fullsizeURL, 'r'); if ($file) { file_put_contents($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname .'.jpg', $file); @@ -909,9 +924,7 @@ class serendipity_event_spartacus extends serendipity_event } } } - - - + $pluginstack[$i]['customURI'] = '&serendipity[spartacus_fetch]=' . $plugname; $pluginstack[$i]['customIcon'] = '_spartacus'; @@ -924,7 +937,8 @@ class serendipity_event_spartacus extends serendipity_event return $pluginstack; } - function download(&$tree, $plugin_to_install, $sub = 'plugins') { + function download(&$tree, $plugin_to_install, $sub = 'plugins') + { global $serendipity; $gitloc = ''; @@ -992,8 +1006,8 @@ class serendipity_event_spartacus extends serendipity_event } if (count($files) == 0) { - echo "DEBUG: ERROR: XML tree did not contain requested plugin:
          \n"; - print_r($tree); + $msg = "DEBUG: ERROR: XML tree did not contain requested plugin:\n
          " . print_r($tree, true) . "
          \n"; + echo ' '. $msg .'' . "\n"; } $mirrors = $this->getMirrors('files', true); @@ -1004,7 +1018,7 @@ class serendipity_event_spartacus extends serendipity_event $servers = explode('|', $custom); $mirror = $servers[0]; } - + if (stristr($mirror, 'github.com')) { $gitloc = 'master/'; } @@ -1028,13 +1042,14 @@ class serendipity_event_spartacus extends serendipity_event } } - function make_dir_via_ftp($dir) { + function make_dir_via_ftp($dir) + { global $serendipity; - + if (!serendipity_db_bool($this->get_config('use_ftp'))) { return false; } - + $ftp_server = $this->get_config('ftp_server'); $ftp_user_name = $this->get_config('ftp_username'); $ftp_user_pass = $this->get_config('ftp_password'); @@ -1046,11 +1061,11 @@ class serendipity_event_spartacus extends serendipity_event } $dir = str_replace($serendipity['serendipityPath'],"",$dir); - + // set up basic connection and log in with username and password $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); - + // check connection if ((!$conn_id) || (!$login_result)) { $this->outputMSG('error',PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT); @@ -1058,8 +1073,8 @@ class serendipity_event_spartacus extends serendipity_event } else { $paths = preg_split('@/@', $basedir.$dir,-1,PREG_SPLIT_NO_EMPTY); foreach ($paths as $path) { - // trying to change directory, if not succesfull, it means - // the directory does not exist and we must create it + // trying to change directory, if not successful, it means + // the directory does not exist and we must create it if (!ftp_chdir($conn_id,$path)) { if (!ftp_mkdir($conn_id,$path)) { $this->outputMSG('error',PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR); @@ -1080,13 +1095,16 @@ class serendipity_event_spartacus extends serendipity_event } } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'cronjob': if ($this->get_config('cronjob') == $eventData) { serendipity_event_cronjob::log('Spartacus', 'plugin'); @@ -1099,25 +1117,25 @@ class serendipity_event_spartacus extends serendipity_event $avail['event'] = $this->buildList($this->fetchOnline('event'), 'event'); $avail['sidebar'] = $this->buildList($this->fetchOnline('sidebar'), 'sidebar'); #echo "XAVAIL:
          " . print_r($avail, true) . "
          "; - + $install['event'] = serendipity_plugin_api::enum_plugin_classes(true); $install['sidebar'] = serendipity_plugin_api::enum_plugin_classes(false); #echo "XINSTALL:
          " . print_r($install, true) . "
          "; - $mailtext = ''; + $mailtext = ''; foreach($meth AS $method) { foreach ($install[$method] as $class_data) { #echo "Probe " . $class_data['name']. "
          \n"; // DEBUG $pluginFile = serendipity_plugin_api::probePlugin($class_data['name'], $class_data['classname'], $class_data['pluginPath']); $plugin = serendipity_plugin_api::getPluginInfo($pluginFile, $class_data, $method); - + if (is_object($plugin)) { #echo "Non cached
          \n"; #echo "
          " . print_r($avail[$method][$class_data['name']], true) . "
          "; // Object is returned when a plugin could not be cached. $bag = new serendipity_property_bag; $plugin->introspect($bag); - + // If a foreign plugin is upgradable, keep the new version number. if (isset($avail[$method][$class_data['name']])) { $class_data['upgrade_version'] = $avail[$method][$class_data['name']]['upgrade_version']; @@ -1132,7 +1150,7 @@ class serendipity_event_spartacus extends serendipity_event $props = false; #echo "Error
          \n"; } - + if (is_array($props)) { #echo "
          " . print_r($props, true) . "
          \n"; if (version_compare($props['version'], $props['upgrade_version'], '<')) { @@ -1149,7 +1167,6 @@ class serendipity_event_spartacus extends serendipity_event echo nl2br($mailtext); } } - return true; break; case 'external_plugin': @@ -1166,34 +1183,34 @@ class serendipity_event_spartacus extends serendipity_event $avail['event'] = $this->buildList($this->fetchOnline('event'), 'event'); $avail['sidebar'] = $this->buildList($this->fetchOnline('sidebar'), 'sidebar'); - + $install['event'] = serendipity_plugin_api::enum_plugin_classes(true); $install['sidebar'] = serendipity_plugin_api::enum_plugin_classes(false); - + foreach($meth AS $method) { echo "LISTING: $method\n-------------------\n"; foreach ($install[$method] as $class_data) { $pluginFile = serendipity_plugin_api::probePlugin($class_data['name'], $class_data['classname'], $class_data['pluginPath']); $plugin = serendipity_plugin_api::getPluginInfo($pluginFile, $class_data, $method); - + if (is_object($plugin)) { // Object is returned when a plugin could not be cached. $bag = new serendipity_property_bag; $plugin->introspect($bag); - + // If a foreign plugin is upgradable, keep the new version number. if (isset($avail[$method][$class_data['name']])) { $class_data['upgrade_version'] = $avail[$method][$class_data['name']]['upgrade_version']; } $props = serendipity_plugin_api::setPluginInfo($plugin, $pluginFile, $bag, $class_data, 'local', $avail[$method]); - + } elseif (is_array($plugin)) { // Array is returned if a plugin could be fetched from info cache $props = $plugin; } else { $props = false; } - + if (is_array($props)) { #print_r($props); if (version_compare($props['version'], $props['upgrade_version'], '<')) { @@ -1207,27 +1224,26 @@ class serendipity_event_spartacus extends serendipity_event } } } - - return true; break; case 'backend_pluginlisting_header': if (serendipity_db_bool($this->get_config('enable_plugins'))) { echo '
          '; - echo ''. PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR .''; - echo ''. PLUGIN_EVENT_SPARTACUS_CHECK_EVENT .' '; + if (version_compare($serendipity['version'], '2.1-alpha3', '<')) { + echo ' '. PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR .''; + echo ' '. PLUGIN_EVENT_SPARTACUS_CHECK_EVENT .' '; + + } else { + echo ' '. PLUGIN_EVENT_SPARTACUS_CHECK .''; + } echo '
          '; } - - return true; break; case 'backend_templates_fetchlist': if (serendipity_db_bool($this->get_config('enable_themes'))) { $eventData = $this->buildTemplateList($this->fetchOnline('template', true), 'template'); } - - return true; break; case 'backend_templates_fetchtemplate': @@ -1240,8 +1256,6 @@ class serendipity_event_spartacus extends serendipity_event ); } } - - return false; break; case 'backend_plugins_fetchlist': @@ -1255,8 +1269,6 @@ class serendipity_event_spartacus extends serendipity_event 'baseURI' => '&serendipity[spartacus_fetch]=' . $type ); } - - return true; break; case 'backend_plugins_fetchplugin': @@ -1277,26 +1289,25 @@ class serendipity_event_spartacus extends serendipity_event } } } - - return false; break; - case 'backend_directory_create' : + case 'backend_directory_create': if (serendipity_db_bool($this->get_config('use_ftp')) && (!is_dir($eventData))) { return $this->make_dir_via_ftp($eventData); } - - return true; break; default: return false; - break; + } + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php index 260bf568..ab287455 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php @@ -1,11 +1,10 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php index 29e5c10f..262fb71c 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php @@ -2,3 +2,4 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '主题选择'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'å…è®¸è®¿å®¢å®žæ—¶å˜æ¢ä¸»é¢˜'); + diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php index 3e9a2162..89a05c4b 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php index 45b08c02..89a05c4b 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php index 3cf99103..28feacb9 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php @@ -1,4 +1,5 @@ - * EN-Revision: 690 */ @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Selector de plantillas'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permite que tus visitantes cambien de plantilla al vuelo'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php index d00e26a1..e1397f74 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php index 51365a1c..b4101d36 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆé¸æŠž'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '訪å•者ãŒã™ãã•ã¾ãƒ†ãƒ³ãƒ—レートを変更ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php index 04bd6d8c..06a71b04 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php @@ -1,8 +1,7 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 ì„ íƒ'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문ìžê°€ 즉ì„ì—서 í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있ë„ë¡ í•¨'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 ì„ íƒ'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문ìžê°€ 즉ì„ì—서 í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있ë„ë¡ í•¨'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php index f147b8a2..5121b3e4 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Wybór schematu'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Pozwala odwiedzajÄ…cym na wybór schematu (template) strony'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php index 9da59ce1..74183cd5 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php index 5f257fd6..6d2cc555 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Výber Å¡ablón'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umožnuje návÅ¡tevníkom zmeniÅ¥ Å¡ablónu (= vzhľad) podľa vlastného výberu'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php index c0ac59ec..3e4b9cea 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'ä½ˆæ™¯é¸æ“‡'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'å…許訪客改變佈景'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'ä½ˆæ™¯é¸æ“‡'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'å…許訪客改變佈景'); + diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php index 29e5c10f..262fb71c 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php @@ -2,3 +2,4 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '主题选择'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'å…è®¸è®¿å®¢å®žæ—¶å˜æ¢ä¸»é¢˜'); + diff --git a/plugins/serendipity_event_templatechooser/lang_bg.inc.php b/plugins/serendipity_event_templatechooser/lang_bg.inc.php index b74f183e..68457fef 100644 --- a/plugins/serendipity_event_templatechooser/lang_bg.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_bg.inc.php @@ -1,9 +1,10 @@ - diff --git a/plugins/serendipity_event_templatechooser/lang_cz.inc.php b/plugins/serendipity_event_templatechooser/lang_cz.inc.php index 15e82301..939d2252 100644 --- a/plugins/serendipity_event_templatechooser/lang_cz.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_event_templatechooser/lang_de.inc.php b/plugins/serendipity_event_templatechooser/lang_de.inc.php index 86c3f97e..e2c6a238 100644 --- a/plugins/serendipity_event_templatechooser/lang_de.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_de.inc.php @@ -1,4 +1,5 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Theme chooser'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Allows your visitors to change theme on the fly'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_es.inc.php b/plugins/serendipity_event_templatechooser/lang_es.inc.php index 267b4cdf..a5fe5bf9 100644 --- a/plugins/serendipity_event_templatechooser/lang_es.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_es.inc.php @@ -1,6 +1,6 @@ - * EN-Revision: 690 */ @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Selector de plantillas'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permite que tus visitantes cambien de plantilla al vuelo'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/lang_fr.inc.php b/plugins/serendipity_event_templatechooser/lang_fr.inc.php index 1b12f853..8691b816 100644 --- a/plugins/serendipity_event_templatechooser/lang_fr.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/lang_ja.inc.php b/plugins/serendipity_event_templatechooser/lang_ja.inc.php index 51365a1c..b4101d36 100644 --- a/plugins/serendipity_event_templatechooser/lang_ja.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆé¸æŠž'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '訪å•者ãŒã™ãã•ã¾ãƒ†ãƒ³ãƒ—レートを変更ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_ko.inc.php b/plugins/serendipity_event_templatechooser/lang_ko.inc.php index 04bd6d8c..06a71b04 100644 --- a/plugins/serendipity_event_templatechooser/lang_ko.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_ko.inc.php @@ -1,8 +1,7 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 ì„ íƒ'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문ìžê°€ 즉ì„ì—서 í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있ë„ë¡ í•¨'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 ì„ íƒ'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문ìžê°€ 즉ì„ì—서 í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있ë„ë¡ í•¨'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_pl.inc.php b/plugins/serendipity_event_templatechooser/lang_pl.inc.php index 1df523ef..881f6f7d 100644 --- a/plugins/serendipity_event_templatechooser/lang_pl.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Wybór schematu'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Pozwala odwiedzaj±cym na wybór schematu (template) strony'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php b/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php index 5589169c..d753c4e2 100644 --- a/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/lang_sk.inc.php b/plugins/serendipity_event_templatechooser/lang_sk.inc.php index 77509092..cfa661c1 100644 --- a/plugins/serendipity_event_templatechooser/lang_sk.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_sk.inc.php @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Výber ¹ablón'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umo¾nuje náv¹tevníkom zmeni» ¹ablónu (= vzhµad) podµa vlastného výberu'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_tn.inc.php b/plugins/serendipity_event_templatechooser/lang_tn.inc.php index c0ac59ec..3e4b9cea 100644 --- a/plugins/serendipity_event_templatechooser/lang_tn.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'ä½ˆæ™¯é¸æ“‡'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'å…許訪客改變佈景'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'ä½ˆæ™¯é¸æ“‡'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'å…許訪客改變佈景'); + diff --git a/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php b/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php index e92a5c1e..7de2cc24 100644 --- a/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php +++ b/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php @@ -1,4 +1,8 @@ -add('description', PLUGIN_EVENT_TEMPLATECHOOSER_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.6'); + $propbag->add('version', '1.7'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -29,83 +33,88 @@ class serendipity_event_templatechooser extends serendipity_event $this->dependencies = array('serendipity_plugin_templatedropdown' => 'remove'); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { - case 'frontend_configure': - if (defined('IN_serendipity_admin') && IN_serendipity_admin) { - // Admin shall not have switchable themes. - return true; - } - - if (isset($serendipity['COOKIE']['user_template']) && !isset($_REQUEST['user_template'])) { - $_REQUEST['user_template'] = $serendipity['COOKIE']['user_template']; - } - if (isset($_REQUEST['user_template']) && (in_array($_REQUEST['user_template'], serendipity_fetchTemplates())) ) { - - # Specific themes can be blacklisted for viewing. Enter the names of those, one per line. - $blacklisted = $has_blacklist = false; + case 'frontend_configure': + if (defined('IN_serendipity_admin') && IN_serendipity_admin) { + // Admin shall not have switchable themes. + return true; + } - if (file_exists(dirname(__FILE__) . '/blacklist.txt')) { - $_blacklist = explode("\n", file_get_contents(dirname(__FILE__) . '/blacklist.txt')); - $blacklist = array(); - $has_blacklist = true; - foreach($_blacklist AS $idx => $blackline) { - $blackline = trim($blackline); - if (empty($blackline)) continue; - if ($blackline[0] == '#') continue; - $blacklist[$blackline] = true; - if (preg_match('/' . preg_quote($blackline) . '$/i', $_REQUEST['user_template'])) { - header('X-Theme-Blacklisted: ' . urlencode($blackline)); - $blacklisted = true; + if (isset($serendipity['COOKIE']['user_template']) && !isset($_REQUEST['user_template'])) { + $_REQUEST['user_template'] = $serendipity['COOKIE']['user_template']; + } + + if (isset($_REQUEST['user_template']) && (in_array($_REQUEST['user_template'], serendipity_fetchTemplates())) ) { + + # Specific themes can be blacklisted for viewing. Enter the names of those, one per line. + $blacklisted = $has_blacklist = false; + + if (file_exists(dirname(__FILE__) . '/blacklist.txt')) { + $_blacklist = explode("\n", file_get_contents(dirname(__FILE__) . '/blacklist.txt')); + $blacklist = array(); + $has_blacklist = true; + foreach($_blacklist AS $idx => $blackline) { + $blackline = trim($blackline); + if (empty($blackline)) continue; + if ($blackline[0] == '#') continue; + $blacklist[$blackline] = true; + if (preg_match('/' . preg_quote($blackline) . '$/i', $_REQUEST['user_template'])) { + header('X-Theme-Blacklisted: ' . urlencode($blackline)); + $blacklisted = true; + } } } + + if (!$blacklisted) { + $_SESSION['serendipityUseTemplate'] = $_REQUEST['user_template']; + # When blacklisting occurs, the cookie to remember template selection will be removed by closing the browser. + serendipity_setCookie('user_template', $_REQUEST['user_template'], false, ($has_blacklist ? 0 : false)); + } } - - if (!$blacklisted) { - $_SESSION['serendipityUseTemplate'] = $_REQUEST['user_template']; - # When blacklisting occurs, the cookie to remember template selection will be removed by closing the browser. - serendipity_setCookie('user_template', $_REQUEST['user_template'], false, ($has_blacklist ? 0 : false)); + + // If the requested template is the same as the current default template, + // we will not set this variable. This is important so that templates/plugins + // which detect serendipityUseTemplate can use reasonable defaults in case + // template configuration options do not exist. Guess nobody understands + // this explanation anyways, and who reads this stuff, heh? + if ($_SESSION['serendipityUseTemplate'] == $eventData['template']) { + unset($_SESSION['serendipityUseTemplate']); } - } - // If the requested template is the same as the current default template, - // we will not set this variable. This is important so that templates/plugins - // which detect serendipityUseTemplate can use reasonable defaults in case - // template configuration options do not exist. Guess nobody understands - // this explanation anyways, and who reads this stuff, heh? - if ($_SESSION['serendipityUseTemplate'] == $eventData['template']) { - unset($_SESSION['serendipityUseTemplate']); - } + if (isset($_SESSION['serendipityUseTemplate']) ) { + $templateInfo = serendipity_fetchTemplateInfo($_SESSION['serendipityUseTemplate']); + $eventData['template'] = $_SESSION['serendipityUseTemplate']; + // NOTE: Bulletproof uses diverse options, but since they are not configured by default, we cannot output fallback templates using bulletproof. So we need to use "default" for now. + $eventData['template_engine'] = isset($templateInfo['engine']) ? $templateInfo['engine'] : 'default'; + $serendipity['smarty_vars']['head_link_stylesheet'] = $serendipity['baseURL'] . 'serendipity.css.php?switch=' . $_REQUEST['user_template']; + } + break; - if (isset($_SESSION['serendipityUseTemplate']) ) { - $templateInfo = serendipity_fetchTemplateInfo($_SESSION['serendipityUseTemplate']); - $eventData['template'] = $_SESSION['serendipityUseTemplate']; - // NOTE: Bulletproof uses diverse options, but since they are not configured by default, we cannot output fallback templates using bulletproof. So we need to use "default" for now. - $eventData['template_engine'] = isset($templateInfo['engine']) ? $templateInfo['engine'] : 'default'; - $serendipity['smarty_vars']['head_link_stylesheet'] = $serendipity['baseURL'] . 'serendipity.css.php?switch=' . $_REQUEST['user_template']; - } + default: + return false; - return true; - break; - - default: - return false; } - + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php index cedb316d..f838f017 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php @@ -1,4 +1,4 @@ -prepare($lite, $noimage, $rel); $this->url_schemes = $this->unrestricted_url_schemes; - // Use of the $encode flag is discouraged. Calling textileEncode() is prefered. + // Use of the $encode flag is discouraged. Calling textileEncode() is preferred. if ($encode) { return $this->textileEncode($text); } @@ -2721,7 +2721,7 @@ class Textile /** - * Perfoms typographical glyph replacements within the input textile text. + * Performs typographical glyph replacements within the input textile text. * The source text is split across HTML-like tags in order to avoid attempting glyph * replacements within tags. * diff --git a/plugins/serendipity_event_textile/lang_bg.inc.php b/plugins/serendipity_event_textile/lang_bg.inc.php index b4a75df5..43425d53 100644 --- a/plugins/serendipity_event_textile/lang_bg.inc.php +++ b/plugins/serendipity_event_textile/lang_bg.inc.php @@ -1,4 +1,4 @@ -add('description', PLUGIN_EVENT_TEXTILE_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team', 'Lars Strojny'); - $propbag->add('version', '1.8.2'); + $propbag->add('version', '1.8.3'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '5.2.0' )); @@ -63,26 +67,31 @@ class serendipity_event_textile extends serendipity_event } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function example() { + function example() + { return '

          '.PLUGIN_EVENT_TEXTILE_EXAMPLE_NOTE.'

          '; } function introspect_config_item($name, &$propbag) { switch($name) { + case 'textile_version': $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_EVENT_TEXTILE_VERSION); @@ -92,7 +101,6 @@ class serendipity_event_textile extends serendipity_event 'desc' => array('1.0', '2.0', '3.0'), )); $propbag->add('default', 3); - return true; break; case 'textile_doctype': @@ -100,7 +108,6 @@ class serendipity_event_textile extends serendipity_event $propbag->add('name', PLUGIN_EVENT_TEXTILE_DOCTYPE); $propbag->add('description', PLUGIN_EVENT_TEXTILE_DOCTYPE_DESC); $propbag->add('default', 'false'); - return true; break; case 'textile_restrict_comments': @@ -108,7 +115,6 @@ class serendipity_event_textile extends serendipity_event $propbag->add('name', PLUGIN_EVENT_TEXTILE_RESTRICTCOMMENTS); $propbag->add('description', PLUGIN_EVENT_TEXTILE_RESTRICTCOMMENTS_DESC); $propbag->add('default', 'true'); - return true; break; case 'unescape': @@ -116,113 +122,115 @@ class serendipity_event_textile extends serendipity_event $propbag->add('name', PLUGIN_EVENT_TEXTILE_UNESCAPE); $propbag->add('description', PLUGIN_EVENT_TEXTILE_UNESCAPE_DESC); $propbag->add('default', 'false'); - return true; + break; + + default: + $propbag->add('type', 'boolean'); + $propbag->add('name', constant($name)); + $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); + $propbag->add('default', 'true'); break; } - $propbag->add('type', 'boolean'); - $propbag->add('name', constant($name)); - $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); - $propbag->add('default', 'true'); return true; } - - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { - case 'frontend_display': - $preserve_tags = &$bag->get('preserve_tags'); + case 'frontend_display': - foreach ($this->markup_elements as $temp) { - if (serendipity_db_bool($this->get_config($temp['name'], true))) { - if ($eventData['properties']['ep_disable_markup_' . $this->instance] || - isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { - continue; - } - $element = $temp['element']; + $preserve_tags = &$bag->get('preserve_tags'); - /* find all the tags and store them in $blocks */ - - $blocks = array(); - foreach($preserve_tags as $tag) { - if (preg_match_all('/(<'.$tag.'[^>]?>.*<\/'.$tag.'>)/msU', $eventData[$element], $matches )) { - foreach($matches[1] as $match) { - $blocks[] = $match; - } + foreach ($this->markup_elements as $temp) { + if (serendipity_db_bool($this->get_config($temp['name'], 'true'))) { + if ($eventData['properties']['ep_disable_markup_' . $this->instance] || + isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { + continue; } - } + $element = $temp['element']; - /* replace all the blocks with some code */ + /* find all the tags and store them in $blocks */ - foreach($blocks as $id=>$block) { - $eventData[$element] = str_replace($block, '@BLOCK::'.$id.'@', $eventData[$element]); - } - - /* textile it */ - - if (serendipity_db_bool($this->get_config('unescape'))) { - $eventData[$element] = str_replace('"', '"', $eventData[$element]); - } - $eventData[$element] = $this->textile($eventData[$element]); - - /* each block will now be "BLOCK::2" - * so look for those place holders and replace - * them with the original blocks */ - - if (preg_match_all('/BLOCK::(\d+)<\/code>/', $eventData[$element], $matches )) { - foreach($matches[1] as $key=>$match) { - $eventData[$element] = str_replace($matches[0][$key], $blocks[$match], $eventData[$element]); - } - } - - /* post-process each block */ - - foreach($preserve_tags as $tag) { - $method = '_process_tag_' . $tag; - if (method_exists($this,$method)) { - if (preg_match_all('/<'.$tag.'[^>]?>(.*)<\/'.$tag.'>/msU', $eventData[$element], $matches )) { - foreach($matches[1] as $key=>$match) { - $eventData[$element] = str_replace($matches[0][$key], $this->$method($match), $eventData[$element]); + $blocks = array(); + foreach($preserve_tags as $tag) { + if (preg_match_all('/(<'.$tag.'[^>]?>.*<\/'.$tag.'>)/msU', $eventData[$element], $matches )) { + foreach($matches[1] as $match) { + $blocks[] = $match; } } } + + /* replace all the blocks with some code */ + + foreach($blocks as $id=>$block) { + $eventData[$element] = str_replace($block, '@BLOCK::'.$id.'@', $eventData[$element]); + } + + /* textile it */ + + if (serendipity_db_bool($this->get_config('unescape'))) { + $eventData[$element] = str_replace('"', '"', $eventData[$element]); + } + $eventData[$element] = $this->textile($eventData[$element]); + + /* each block will now be "BLOCK::2" + * so look for those place holders and replace + * them with the original blocks */ + + if (preg_match_all('/BLOCK::(\d+)<\/code>/', $eventData[$element], $matches )) { + foreach($matches[1] as $key=>$match) { + $eventData[$element] = str_replace($matches[0][$key], $blocks[$match], $eventData[$element]); + } + } + + /* post-process each block */ + + foreach($preserve_tags as $tag) { + $method = '_process_tag_' . $tag; + if (method_exists($this,$method)) { + if (preg_match_all('/<'.$tag.'[^>]?>(.*)<\/'.$tag.'>/msU', $eventData[$element], $matches )) { + foreach($matches[1] as $key=>$match) { + $eventData[$element] = str_replace($matches[0][$key], $this->$method($match), $eventData[$element]); + } + } + } + } + + /* end textile processing */ + } - - /* end textile processing */ - } - } - return true; + break; case 'frontend_comment': - if (serendipity_db_bool($this->get_config('COMMENT', true))) { + if (serendipity_db_bool($this->get_config('COMMENT', 'true'))) { $url = $this->get_config('textile_version') == 1 ? 'http://www.textism.com/tools/textile/' : 'http://txstyle.org/article/43/a-short-introduction'; echo '
          ' . sprintf(PLUGIN_EVENT_TEXTILE_TRANSFORM, $url) . '
          '; } - return true; break; default: return false; + } - + return true; } else { - return false; - } - } - function _process_tag_php($text) { + function _process_tag_php($text) + { $code = ""; @@ -261,15 +269,18 @@ class serendipity_event_textile extends serendipity_event } - function _process_tag_output($text) { + function _process_tag_output($text) + { return '

          ' . $text . '

          '; } - function _process_tag_name($text) { + function _process_tag_name($text) + { return ''; } - function textile($string) { + function textile($string) + { switch($this->get_config('textile_version')) { case 3: if (version_compare(PHP_VERSION, '5.3.0') >= 0) { @@ -295,6 +306,8 @@ class serendipity_event_textile extends serendipity_event break; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php index dbb30303..adc0a865 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php @@ -1,13 +1,14 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Übliche XHTML-Fehler beseitigen'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert übliche Fehler, die beim XHTML-Markup der Einträge gemacht werden können'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Übliche XHTML-Fehler beseitigen'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert übliche Fehler, die beim XHTML-Markup der Einträge gemacht werden können'); // Next lines were translated on 2009/06/03 @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', 'kodiere XML-geparste Daten?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu führen, dass schon vorher gülitg kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu führen, dass schon vorher gültig kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'säubere UTF-8 kodierte Sonderzeichen?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Wenn aktiviert, werden HTML Sonderzeichen, die von UTF-8 Zeichen abstammen, in der Ausgabe konvertiert und nicht doppelt kodiert.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Youtube Player Quelltext säubern?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ungültigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ungültigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php index b99e0518..26417ce7 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php index f3c01361..3cc99c08 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'UTF-8 エントリを掃除ã—ã¾ã™ã‹?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'If enabled, HTML entities derived from UTF-8 characters will be properly converted and not double-encoded in your output.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php index 6f7d007f..10130274 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php @@ -1,8 +1,7 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'ì¼ë°˜ì ì¸ XHTML ì—러 수정'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글ì—서 ìžì£¼ ë°œìƒí•˜ëŠ” XHTML 마í¬ì—… 문제를 수정합니다. 블로그가 XHTML ê·œê²©ì„ ë”°ë¥´ê²Œ í•˜ëŠ”ë° ë„ì›€ì„ ì¤ë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'ì¼ë°˜ì ì¸ XHTML ì—러 수정'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글ì—서 ìžì£¼ ë°œìƒí•˜ëŠ” XHTML 마í¬ì—… 문제를 수정합니다. 블로그가 XHTML ê·œê²©ì„ ë”°ë¥´ê²Œ í•˜ëŠ”ë° ë„ì›€ì„ ì¤ë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php index d38feaf3..3db1d0df 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'CzyÅ›cić znaki UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Po włączeniu tej opcji znaki pochodzÄ…ce z kodowania UTF-8 zostanÄ… odpowiednio przekonwertowane i pokazane.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php index 5d1d4523..1d5acfb8 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php index 9e273edb..228d44f4 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,10 +12,10 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML éŒ¯èª¤ï¼Œç‚ºäº†èƒ½è®“æ‚¨çš„æ–‡ç« é€šéŽ XHTML 查驗。'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML è§£æžçš„資料?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML è§£æžçš„æ–¹æ³•來ä¿è­‰ XHTML 能通éŽé©—證。這個功能å¯èƒ½æœƒè½‰æ›å·²æ­£ç¢ºçš„語法,所以這個外掛會在解æžå®Œç•¢å¾Œæ‰é€²è¡Œç·¨ç¢¼ã€‚如果é‡åˆ°ç·¨ç¢¼çš„錯誤,請ä¸è¦ä½¿ç”¨é€™å€‹åŠŸèƒ½ã€‚'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉æ›å’Œè¼¸å‡ºã€‚'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML éŒ¯èª¤ï¼Œç‚ºäº†èƒ½è®“æ‚¨çš„æ–‡ç« é€šéŽ XHTML 查驗。'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML è§£æžçš„資料?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML è§£æžçš„æ–¹æ³•來ä¿è­‰ XHTML 能通éŽé©—證。這個功能å¯èƒ½æœƒè½‰æ›å·²æ­£ç¢ºçš„語法,所以這個外掛會在解æžå®Œç•¢å¾Œæ‰é€²è¡Œç·¨ç¢¼ã€‚如果é‡åˆ°ç·¨ç¢¼çš„錯誤,請ä¸è¦ä½¿ç”¨é€™å€‹åŠŸèƒ½ã€‚'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉æ›å’Œè¼¸å‡ºã€‚'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php index ec5d2ff1..72074531 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php @@ -6,3 +6,4 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '该æ’件使用一ç§XMLè§£æžæ‰‹æ®µæ¥ç¡®ä¿ä½ çš„代ç èƒ½é€šè¿‡XHTML验è¯ã€‚在进行XMLè§£æžæ—¶ï¼Œä¼šå°†çŽ°æœ‰çš„ç¬¦åˆXHTMLåè®®çš„æ–‡ç« è½¬æ¢æˆåŽŸå§‹(unescaped)文章,éšåŽåœ¨å®ŒæˆXMLè§£æžåŽå¯¹æ‰€æœ‰æ–‡ç« è¿›è¡Œç¼–ç æ“作。如果在使用中å‘现有é‡å¤è¿›è¡Œç¼–ç æ“作的现象,需将此设置关闭。'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清ç†UTF-8æ ¼å¼çš„æ ‡ç­¾'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果å¯ç”¨è¯¥è®¾ç½®çš„è¯ï¼Œé‚£äº›ä»ŽUTF-8字符串中演绎出æ¥çš„HTML标签将能被正确地转æ¢ï¼Œè€Œä¸ä¼šè¢«é‡å¤è¿›è¡Œç¼–ç ã€‚'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php index bb7a8398..8494f73d 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php @@ -1,13 +1,14 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Übliche XHTML-Fehler beseitigen'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert übliche Fehler, die beim XHTML-Markup der Einträge gemacht werden können'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Übliche XHTML-Fehler beseitigen'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert übliche Fehler, die beim XHTML-Markup der Einträge gemacht werden können'); // Next lines were translated on 2009/06/03 @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', 'kodiere XML-geparste Daten?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu führen, dass schon vorher gülitg kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu führen, dass schon vorher gültig kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'säubere UTF-8 kodierte Sonderzeichen?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Wenn aktiviert, werden HTML Sonderzeichen, die von UTF-8 Zeichen abstammen, in der Ausgabe konvertiert und nicht doppelt kodiert.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Youtube Player Quelltext säubern?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ungültigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ungültigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php index 31af3ac8..76c6a24f 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -15,4 +15,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Cleanup Youtube player code?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'If enabled, the by default XHTML invalid youtube object tags will get stripped of the embed part. Browser will still properly playback the video.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php index 8ce46f49..95b3665a 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '¿Limpiar las entidades UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Si lo activas, las entidades HTML derivadas de caracteres UTF-8 se convertirán correctamente y no habrá doble codificación en tu salida.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php index 6fde1479..2df6ee08 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php index f3c01361..3cc99c08 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'UTF-8 エントリを掃除ã—ã¾ã™ã‹?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'If enabled, HTML entities derived from UTF-8 characters will be properly converted and not double-encoded in your output.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php index 6f7d007f..10130274 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php @@ -1,8 +1,7 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'ì¼ë°˜ì ì¸ XHTML ì—러 수정'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글ì—서 ìžì£¼ ë°œìƒí•˜ëŠ” XHTML 마í¬ì—… 문제를 수정합니다. 블로그가 XHTML ê·œê²©ì„ ë”°ë¥´ê²Œ í•˜ëŠ”ë° ë„ì›€ì„ ì¤ë‹ˆë‹¤.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'ì¼ë°˜ì ì¸ XHTML ì—러 수정'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글ì—서 ìžì£¼ ë°œìƒí•˜ëŠ” XHTML 마í¬ì—… 문제를 수정합니다. 블로그가 XHTML ê·œê²©ì„ ë”°ë¥´ê²Œ í•˜ëŠ”ë° ë„ì›€ì„ ì¤ë‹ˆë‹¤.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php index e0780fd2..31633c43 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Czy¶ciæ znaki UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Po w³±czeniu tej opcji znaki pochodz±ce z kodowania UTF-8 zostan± odpowiednio przekonwertowane i pokazane.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php index e3428a91..726c8b16 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php index 9e273edb..228d44f4 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,10 +12,10 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML éŒ¯èª¤ï¼Œç‚ºäº†èƒ½è®“æ‚¨çš„æ–‡ç« é€šéŽ XHTML 查驗。'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML è§£æžçš„資料?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML è§£æžçš„æ–¹æ³•來ä¿è­‰ XHTML 能通éŽé©—證。這個功能å¯èƒ½æœƒè½‰æ›å·²æ­£ç¢ºçš„語法,所以這個外掛會在解æžå®Œç•¢å¾Œæ‰é€²è¡Œç·¨ç¢¼ã€‚如果é‡åˆ°ç·¨ç¢¼çš„錯誤,請ä¸è¦ä½¿ç”¨é€™å€‹åŠŸèƒ½ã€‚'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉æ›å’Œè¼¸å‡ºã€‚'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML éŒ¯èª¤ï¼Œç‚ºäº†èƒ½è®“æ‚¨çš„æ–‡ç« é€šéŽ XHTML 查驗。'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML è§£æžçš„資料?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML è§£æžçš„æ–¹æ³•來ä¿è­‰ XHTML 能通éŽé©—證。這個功能å¯èƒ½æœƒè½‰æ›å·²æ­£ç¢ºçš„語法,所以這個外掛會在解æžå®Œç•¢å¾Œæ‰é€²è¡Œç·¨ç¢¼ã€‚如果é‡åˆ°ç·¨ç¢¼çš„錯誤,請ä¸è¦ä½¿ç”¨é€™å€‹åŠŸèƒ½ã€‚'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉æ›å’Œè¼¸å‡ºã€‚'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php b/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php index ceedf5e5..3246e150 100644 --- a/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php +++ b/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php @@ -1,4 +1,8 @@ -add('description', PLUGIN_EVENT_XHTMLCLEANUP_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.7'); + $propbag->add('version', '1.8'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -58,16 +62,19 @@ class serendipity_event_xhtmlcleanup extends serendipity_event $propbag->add('configuration', $conf_array); } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } @@ -98,12 +105,14 @@ class serendipity_event_xhtmlcleanup extends serendipity_event return true; } - function fixUTFEntity(&$string) { + function fixUTFEntity(&$string) + { $string = preg_replace('/&#(x[a-f0-9]{1,4}|[0-9]{1,5});/', '&#$1;', $string); return true; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; static $convert_fields = array( 'fullBody', @@ -113,26 +122,27 @@ class serendipity_event_xhtmlcleanup extends serendipity_event ); static $youtube = null; if ($youtube === null) { - $youtube = serendipity_db_bool($this->get_config('youtube')); + $youtube = serendipity_db_bool($this->get_config('youtube', 'false')); } $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'backend_view_comment': - if (serendipity_db_bool($this->get_config('utf8_parse'))) { + if (serendipity_db_bool($this->get_config('utf8_parse', 'true'))) { foreach($convert_fields AS $convert_field) { $this->fixUTFEntity($eventData[$convert_field]); } } - return true; break; case 'frontend_display': - $this->cleanup_parse = serendipity_db_bool($this->get_config('xhtml_parse')); + $this->cleanup_parse = serendipity_db_bool($this->get_config('xhtml_parse', 'true')); foreach ($this->markup_elements as $temp) { - if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && + if (serendipity_db_bool($this->get_config($temp['name'], 'true')) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && !isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { $element = $temp['element']; @@ -150,37 +160,36 @@ class serendipity_event_xhtmlcleanup extends serendipity_event } } - if (serendipity_db_bool($this->get_config('utf8_parse'))) { + if (serendipity_db_bool($this->get_config('utf8_parse', 'true'))) { $this->fixUTFEntity($eventData['author']); $this->fixUTFEntity($eventData['comment']); } - - return true; break; case 'frontend_display:html:per_entry': - if (serendipity_db_bool($this->get_config('utf8_parse'))) { + if (serendipity_db_bool($this->get_config('utf8_parse', 'true'))) { $this->fixUTFEntity($eventData['author']); $this->fixUTFEntity($eventData['title']); } - - return true; break; default: return false; - } + } + return true; } else { return false; } } - function youtubify(&$text) { + function youtubify(&$text) + { $text = preg_replace_callback('@(.*)@imsU', array($this, 'youtubify_regex'), $text); } - - function youtubify_regex($matches) { + + function youtubify_regex($matches) + { if (!preg_match('@@imsU', $matches[2], $m); $movie = $m[1]; - + if (empty($movie)) { preg_match('@@imsU', $matches[2], $m); $movie = $m[1]; @@ -201,7 +210,7 @@ class serendipity_event_xhtmlcleanup extends serendipity_event $appendix = str_replace('', '', $appendix); $out = '' - . '' + . '' . $appendix . ''; $out .= "\n\n\n\n"; @@ -209,7 +218,8 @@ class serendipity_event_xhtmlcleanup extends serendipity_event } // Takes an input tag and search for ommitted attributes. Expects a single tag (array, index 0) - function clean_tag($data) { + function clean_tag($data) + { // Restore tags from preg_replace_callback buffer, as those can't be passed in the function header $tag = &$this->cleanup_tag; $checkfor = &$this->cleanup_checkfor; @@ -221,7 +231,7 @@ class serendipity_event_xhtmlcleanup extends serendipity_event case 'utf-8': $p = xml_parser_create(LANG_CHARSET); break; - + default: $p = xml_parser_create(''); } @@ -252,9 +262,12 @@ class serendipity_event_xhtmlcleanup extends serendipity_event return $data[0]; } - function clean_htmlspecialchars($given, $quote_style = ENT_QUOTES) { + function clean_htmlspecialchars($given, $quote_style = ENT_QUOTES) + { return '<' . $given[1] . $given[2] . $given[3] . '=' . $given[4] . serendipity_specialchars(serendipity_entity_decode($given[5], $quote_style), $quote_style) . $given[6]; } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php b/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php index 330491be..fa2dc0ca 100644 --- a/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php +++ b/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php @@ -1,6 +1,11 @@ add('description', BROWSE_ARCHIVES); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('configuration', array('title', 'frequency', 'count', 'show_count', 'hide_zero_count')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -17,6 +22,7 @@ class serendipity_plugin_archives extends serendipity_plugin { function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); @@ -68,7 +74,7 @@ class serendipity_plugin_archives extends serendipity_plugin { $ts = mktime(0, 0, 0, date('m'), 1); $add_query = ''; - + $category_set = isset($serendipity['GET']['category']); if ($category_set) { $base_query = 'C' . (int)$serendipity['GET']['category']; @@ -76,18 +82,18 @@ class serendipity_plugin_archives extends serendipity_plugin { } $max_x = $this->get_config('count', 3); - $show_count = serendipity_db_bool($this->get_config('show_count', false)); - $hide_zero_count = serendipity_db_bool($this->get_config('hide_zero_count', false)); + $show_count = serendipity_db_bool($this->get_config('show_count', 'false')); + $hide_zero_count = serendipity_db_bool($this->get_config('hide_zero_count', 'false')); $freq = $this->get_config('frequency', 'months'); echo '
            ' . "\n"; - + if ($serendipity['dbType'] == 'sqlite' || $serendipity['dbType'] == 'sqlite3' || $serendipity['dbType'] == 'sqlite3oo') { $dist_sql = 'count(e.id) AS orderkey'; } else { $dist_sql = 'count(DISTINCT e.id) AS orderkey'; } - + for($x = 0; $x < $max_x; $x++) { $current_ts = $ts; switch($freq) { @@ -177,20 +183,21 @@ class serendipity_plugin_archives extends serendipity_plugin { if (empty($ec['orderkey'])) { $ec['orderkey'] = '0'; } - $hidden_by_zero_count = $hide_zero_count && ( $ec['orderkey'] == '0'); + $hidden_by_zero_count = $hide_zero_count && ( $ec['orderkey'] == '0'); $html_count .= ' (' . $ec['orderkey'] . ')'; } } if (!$hidden_by_zero_count) { - echo '
          • ' . $ts_title . $html_count . '
          • ' . "\n"; + echo '
          • ' . $ts_title . $html_count . '
          • ' . "\n"; } } - echo '
          • ' . RECENT . '
          • ' . "\n"; - echo '
          • ' . OLDER . '
          • '. "\n"; + echo '
          • ' . RECENT . '
          • ' . "\n"; + echo '
          • ' . OLDER . '
          • '. "\n"; echo '
          ' . "\n"; } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php b/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php index 7bd80947..76269394 100644 --- a/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php +++ b/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php @@ -1,16 +1,22 @@ add('name', AUTHORS); $propbag->add('description', AUTHOR_PLUGIN_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.1'); + $propbag->add('version', '2.2'); $propbag->add('configuration', array('image', 'allow_select', 'title', 'showartcount', 'mincount')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -18,7 +24,9 @@ class serendipity_plugin_authors extends serendipity_plugin { function introspect_config_item($name, &$propbag) { global $serendipity; + switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); @@ -37,7 +45,7 @@ class serendipity_plugin_authors extends serendipity_plugin { $propbag->add('type', 'boolean'); $propbag->add('name', AUTHORS_SHOW_ARTICLE_COUNT); $propbag->add('description', AUTHORS_SHOW_ARTICLE_COUNT_DESC); - $propbag->add('default', false); + $propbag->add('default', 'false'); break; case 'mincount': @@ -53,21 +61,22 @@ class serendipity_plugin_authors extends serendipity_plugin { return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title', $this->title); $sort = $this->get_config('sort_order'); if ($sort == 'none') { - $sort = ''; + $sort = ''; } else { $sort .= ' ' . $this->get_config('sort_method'); } - $is_count = serendipity_db_bool($this->get_config('showartcount')); - $mincount = (int)$this->get_config('mincount'); - $authors = serendipity_fetchUsers(null, 'hidden', $is_count); - $html = ''; + $is_count = serendipity_db_bool($this->get_config('showartcount', 'false')); + $mincount = (int)$this->get_config('mincount'); + $authors = serendipity_fetchUsers(null, 'hidden', $is_count); + $html = ''; $image = $this->get_config('image', serendipity_getTemplateFile('img/xml.gif')); $image = (($image == "'none'" || $image == 'none') ? '' : $image); @@ -89,9 +98,9 @@ class serendipity_plugin_authors extends serendipity_plugin { $html .= '
        • '; if ( !empty($image) ) { - $html .= 'XML '; + $html .= ' XML '; } - $html .= ''. serendipity_specialchars($auth['realname']) . $entrycount . ''; + $html .= ' '. serendipity_specialchars($auth['realname']) . $entrycount . ''; $html .= '
        • ' . "\n"; } } @@ -99,7 +108,7 @@ class serendipity_plugin_authors extends serendipity_plugin { $html .= '' . "\n"; $html .= sprintf( - '', + ''."\n", $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'], ALL_AUTHORS, diff --git a/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php b/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php index 9cad1e70..2318b699 100644 --- a/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php +++ b/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php @@ -1,6 +1,11 @@ add('configuration', array('beginningOfWeek', 'enableExtEvents', 'category')); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.2'); $propbag->add('groups', array('FRONTEND_VIEWS')); } function introspect_config_item($name, &$propbag) { switch($name) { + case 'beginningOfWeek': $options = array(); for ( $i = 1; $i <= 7; $i++ ) { @@ -138,7 +144,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { // Calculate first timestamp of the month list ($firstgy, $firstgm, $firstgd ) = p2g ( $year, $month, 1); - $firstts = mktime (0, 0, 0, $firstgm, $firstgd, $firstgy); + $firstts = mktime(0, 0, 0, $firstgm, $firstgd, $firstgy); // Calculate first persian day, week day name $firstDayWeekDay = date('w', $firstts); @@ -207,7 +213,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { } else { $catid = false; } - + if ($catid) { $base_query = 'C' . $catid; $add_query = '/' . $base_query; @@ -262,7 +268,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { } // end switch $externalevents = array(); - if (serendipity_db_bool($this->get_config('enableExtEvents', false))) { + if (serendipity_db_bool($this->get_config('enableExtEvents', 'false'))) { serendipity_plugin_api::hook_event('frontend_calendar', $externalevents, array('Month' => $month, 'Year' => $year, 'TS' => $ts, 'EndTS' => $endts)); } @@ -346,6 +352,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { echo serendipity_smarty_fetch('CALENDAR', 'plugin_calendar.tpl'); } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php b/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php index 63043b3e..df511ae5 100644 --- a/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php +++ b/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php @@ -1,6 +1,11 @@ add('description', CATEGORY_PLUGIN_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.04'); + $propbag->add('version', '2.05'); $propbag->add('configuration', array('title', 'authorid', 'parent_base', 'hide_parent', 'image', 'sort_order', 'sort_method', 'allow_select', 'hide_parallel', 'show_count', 'show_all', 'smarty')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -18,7 +23,9 @@ class serendipity_plugin_categories extends serendipity_plugin { function introspect_config_item($name, &$propbag) { global $serendipity; + switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); @@ -128,8 +135,8 @@ class serendipity_plugin_categories extends serendipity_plugin { case 'show_all': $propbag->add('type', 'boolean'); - $propbag->add('name', CATEGORY_PLUGIN_SHOWALL); # i18n - $propbag->add('description', CATEGORY_PLUGIN_SHOWALL_DESC); # i18n + $propbag->add('name', CATEGORY_PLUGIN_SHOWALL); + $propbag->add('description', CATEGORY_PLUGIN_SHOWALL_DESC); $propbag->add('default', false); break; @@ -139,11 +146,12 @@ class serendipity_plugin_categories extends serendipity_plugin { return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title'); - $smarty = serendipity_db_bool($this->get_config('smarty', false)); + $smarty = serendipity_db_bool($this->get_config('smarty', 'false')); $which_category = $this->get_config('authorid'); $sort = $this->get_config('sort_order'); @@ -152,7 +160,7 @@ class serendipity_plugin_categories extends serendipity_plugin { } else { $sort .= ' ' . $this->get_config('sort_method'); } - $is_form = serendipity_db_bool($this->get_config('allow_select', false)); + $is_form = serendipity_db_bool($this->get_config('allow_select', 'false')); if ($which_category === "login") { $which_category = (int)$serendipity['authorid']; if ($which_category === 0) { @@ -164,17 +172,17 @@ class serendipity_plugin_categories extends serendipity_plugin { $cat_count = array(); if (serendipity_db_bool($this->get_config('show_count'))) { - $cat_sql = "SELECT c.categoryid, c.category_name, count(e.id) as postings - FROM {$serendipity['dbPrefix']}entrycat ec, - {$serendipity['dbPrefix']}category c, - {$serendipity['dbPrefix']}entries e - WHERE ec.categoryid = c.categoryid - AND ec.entryid = e.id - AND e.isdraft = 'false' - " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND e.timestamp <= " . serendipity_db_time() : '') . " - GROUP BY c.categoryid, c.category_name - ORDER BY postings DESC"; - $category_rows = serendipity_db_query($cat_sql); + $cat_sql = "SELECT c.categoryid, c.category_name, count(e.id) as postings + FROM {$serendipity['dbPrefix']}entrycat ec, + {$serendipity['dbPrefix']}category c, + {$serendipity['dbPrefix']}entries e + WHERE ec.categoryid = c.categoryid + AND ec.entryid = e.id + AND e.isdraft = 'false' + " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND e.timestamp <= " . serendipity_db_time() : '') . " + GROUP BY c.categoryid, c.category_name + ORDER BY postings DESC"; + $category_rows = serendipity_db_query($cat_sql); if (is_array($category_rows)) { foreach($category_rows AS $cat) { $cat_count[$cat['categoryid']] = $cat['postings']; @@ -183,14 +191,14 @@ class serendipity_plugin_categories extends serendipity_plugin { } - $html = ''; + $html = ''; if (!$smarty && $is_form) { $html .= '
          -
          '; +
          '."\n"; } if (!$smarty) { - $html .= '
            '; + $html .= '
              '."\n"; } $image = $this->get_config('image', serendipity_getTemplateFile('img/xml.gif')); @@ -275,16 +283,16 @@ class serendipity_plugin_categories extends serendipity_plugin { } if (!$smarty) { - $html .= '
            '; + $html .= "
          \n"; } if (!$smarty && $is_form) { - $html .= '
          '; + $html .= '
          '."\n"; } - if (!$smarty && serendipity_db_bool($this->get_config('show_all', false))) { + if (!$smarty && serendipity_db_bool($this->get_config('show_all', 'false'))) { $html .= sprintf( - '', + ''."\n", $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?frontpage', ALL_CATEGORIES, @@ -293,7 +301,7 @@ class serendipity_plugin_categories extends serendipity_plugin { } if (!$smarty && $is_form) { - $html .= '
          '; + $html .= "
          \n\n"; } if (!$smarty) { @@ -309,6 +317,7 @@ class serendipity_plugin_categories extends serendipity_plugin { echo serendipity_smarty_fetch('CATEGORIES', 'plugin_categories.tpl'); } } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php index 3969912a..49e9f6cb 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php @@ -1,18 +1,18 @@ - + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php index c766cd2a..15e23335 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ - + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php index 7342750d..2306b16f 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php @@ -1,20 +1,21 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); +@define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); - @define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); +@define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); \ No newline at end of file +@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php index 5a718bcd..2d229490 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '¿Cuántos comentarios deben ser mostrados? (Por defecto: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s acerca%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anon'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php index 5f93e4b4..4b74b5fa 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php index 3b2efeca..0788683f 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php @@ -1,12 +1,11 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php index f508d220..57a8a43e 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 1381 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'ã©ã‚Œãらã„ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’表示ã—ã¾ã™ã‹? (デフォルト: 15)'); @define('PLUGIN_COMMENTS_ABOUT', 'コメント: %s
          %s'); @define('PLUGIN_COMMENTS_ANONYMOUS', '匿å'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php index b56378b0..1ba73938 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php @@ -1,14 +1,13 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_COMMENTS_BLAHBLAH', 'ìµœê·¼ì— ë‹¬ë¦° ë§ê¸€ì„ 보여줌'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'ìžë™ 줄바꿈'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'ë§ê¸€ 당 최대 ê¸€ìž ìˆ˜'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'ê° ë§ê¸€ì— 대해 최대 몇 글ìžë¥¼ 보여주겠습니까? (기본값: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '최대 ë§ê¸€ 수'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 ê°œì˜ ë§ê¸€ì„ 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s ë‹˜ì´ %s ì— ëŒ€í•´'); +@define('PLUGIN_COMMENTS_BLAHBLAH', 'ìµœê·¼ì— ë‹¬ë¦° ë§ê¸€ì„ 보여줌'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'ìžë™ 줄바꿈'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'ë§ê¸€ 당 최대 ê¸€ìž ìˆ˜'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'ê° ë§ê¸€ì— 대해 최대 몇 글ìžë¥¼ 보여주겠습니까? (기본값: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '최대 ë§ê¸€ 수'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 ê°œì˜ ë§ê¸€ì„ 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s ë‹˜ì´ %s ì— ëŒ€í•´'); -?> diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php index 9e443376..e9f0c2a1 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Jak wiele komentarzy bÄ™dzie pokazywanych. (Standardowo: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s do wpisu%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonim'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php index d50f9f1a..b4eec867 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php index 9e05d185..2f8d080d 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php @@ -16,4 +16,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'PridaÅ¥ URL adresu autorov do'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php index ccc95a3f..4d1e362c 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,12 +12,12 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); - @define('PLUGIN_COMMENTS_WORDWRAP', '自動æ›è¡Œ'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'æ¯å€‹è¿´éŸ¿è¦é¡¯ç¤ºå¤šå°‘個字?(é è¨­ï¼š120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數é‡'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個迴響?(é è¨­ï¼š15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); -?> \ No newline at end of file +@define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); +@define('PLUGIN_COMMENTS_WORDWRAP', '自動æ›è¡Œ'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'æ¯å€‹è¿´éŸ¿è¦é¡¯ç¤ºå¤šå°‘個字?(é è¨­ï¼š120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數é‡'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個迴響?(é è¨­ï¼š15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php index e0d4283d..c2688a31 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ - * First public version: lang_tr.inc.php */ @@ -15,4 +15,3 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Kaç adet görüþ gösterilsin? (Öntanýmlý: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s hakkýnda%s'); -?> diff --git a/plugins/serendipity_plugin_comments/lang_bg.inc.php b/plugins/serendipity_plugin_comments/lang_bg.inc.php index a02258de..350ace82 100644 --- a/plugins/serendipity_plugin_comments/lang_bg.inc.php +++ b/plugins/serendipity_plugin_comments/lang_bg.inc.php @@ -1,18 +1,18 @@ - + diff --git a/plugins/serendipity_plugin_comments/lang_cz.inc.php b/plugins/serendipity_plugin_comments/lang_cz.inc.php index 25845729..f4a527a8 100644 --- a/plugins/serendipity_plugin_comments/lang_cz.inc.php +++ b/plugins/serendipity_plugin_comments/lang_cz.inc.php @@ -1,4 +1,4 @@ - + diff --git a/plugins/serendipity_plugin_comments/lang_de.inc.php b/plugins/serendipity_plugin_comments/lang_de.inc.php index 5bead7e7..516722ca 100644 --- a/plugins/serendipity_plugin_comments/lang_de.inc.php +++ b/plugins/serendipity_plugin_comments/lang_de.inc.php @@ -1,20 +1,21 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); +@define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); - @define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); +@define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); \ No newline at end of file +@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); + diff --git a/plugins/serendipity_plugin_comments/lang_en.inc.php b/plugins/serendipity_plugin_comments/lang_en.inc.php index 16ebc243..37b279ee 100644 --- a/plugins/serendipity_plugin_comments/lang_en.inc.php +++ b/plugins/serendipity_plugin_comments/lang_en.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_comments/lang_es.inc.php b/plugins/serendipity_plugin_comments/lang_es.inc.php index 4fa4f6ba..95a55a1e 100644 --- a/plugins/serendipity_plugin_comments/lang_es.inc.php +++ b/plugins/serendipity_plugin_comments/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '¿Cuántos comentarios deben ser mostrados? (Por defecto: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s acerca%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anon'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_fr.inc.php b/plugins/serendipity_plugin_comments/lang_fr.inc.php index 29d8117f..619836b1 100644 --- a/plugins/serendipity_plugin_comments/lang_fr.inc.php +++ b/plugins/serendipity_plugin_comments/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/lang_is.inc.php b/plugins/serendipity_plugin_comments/lang_is.inc.php index ae1f97ef..9bb73d44 100644 --- a/plugins/serendipity_plugin_comments/lang_is.inc.php +++ b/plugins/serendipity_plugin_comments/lang_is.inc.php @@ -1,12 +1,11 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/lang_ja.inc.php b/plugins/serendipity_plugin_comments/lang_ja.inc.php index f508d220..57a8a43e 100644 --- a/plugins/serendipity_plugin_comments/lang_ja.inc.php +++ b/plugins/serendipity_plugin_comments/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 1381 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'ã©ã‚Œãらã„ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’表示ã—ã¾ã™ã‹? (デフォルト: 15)'); @define('PLUGIN_COMMENTS_ABOUT', 'コメント: %s
          %s'); @define('PLUGIN_COMMENTS_ANONYMOUS', '匿å'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_ko.inc.php b/plugins/serendipity_plugin_comments/lang_ko.inc.php index b56378b0..1ba73938 100644 --- a/plugins/serendipity_plugin_comments/lang_ko.inc.php +++ b/plugins/serendipity_plugin_comments/lang_ko.inc.php @@ -1,14 +1,13 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_COMMENTS_BLAHBLAH', 'ìµœê·¼ì— ë‹¬ë¦° ë§ê¸€ì„ 보여줌'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'ìžë™ 줄바꿈'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'ë§ê¸€ 당 최대 ê¸€ìž ìˆ˜'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'ê° ë§ê¸€ì— 대해 최대 몇 글ìžë¥¼ 보여주겠습니까? (기본값: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '최대 ë§ê¸€ 수'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 ê°œì˜ ë§ê¸€ì„ 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s ë‹˜ì´ %s ì— ëŒ€í•´'); +@define('PLUGIN_COMMENTS_BLAHBLAH', 'ìµœê·¼ì— ë‹¬ë¦° ë§ê¸€ì„ 보여줌'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'ìžë™ 줄바꿈'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'ë§ê¸€ 당 최대 ê¸€ìž ìˆ˜'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'ê° ë§ê¸€ì— 대해 최대 몇 글ìžë¥¼ 보여주겠습니까? (기본값: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '최대 ë§ê¸€ 수'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 ê°œì˜ ë§ê¸€ì„ 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s ë‹˜ì´ %s ì— ëŒ€í•´'); -?> diff --git a/plugins/serendipity_plugin_comments/lang_pl.inc.php b/plugins/serendipity_plugin_comments/lang_pl.inc.php index 9653ab02..a92906ae 100644 --- a/plugins/serendipity_plugin_comments/lang_pl.inc.php +++ b/plugins/serendipity_plugin_comments/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Jak wiele komentarzy bêdzie pokazywanych. (Standardowo: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s do wpisu%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonim'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php b/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php index 1136b481..77586e08 100644 --- a/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/lang_sk.inc.php b/plugins/serendipity_plugin_comments/lang_sk.inc.php index d9777cde..9925bf86 100644 --- a/plugins/serendipity_plugin_comments/lang_sk.inc.php +++ b/plugins/serendipity_plugin_comments/lang_sk.inc.php @@ -16,4 +16,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'Prida» URL adresu autorov do'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_tn.inc.php b/plugins/serendipity_plugin_comments/lang_tn.inc.php index ccc95a3f..4d1e362c 100644 --- a/plugins/serendipity_plugin_comments/lang_tn.inc.php +++ b/plugins/serendipity_plugin_comments/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,12 +12,12 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); - @define('PLUGIN_COMMENTS_WORDWRAP', '自動æ›è¡Œ'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'æ¯å€‹è¿´éŸ¿è¦é¡¯ç¤ºå¤šå°‘個字?(é è¨­ï¼š120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數é‡'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個迴響?(é è¨­ï¼š15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); -?> \ No newline at end of file +@define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); +@define('PLUGIN_COMMENTS_WORDWRAP', '自動æ›è¡Œ'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'æ¯å€‹è¿´éŸ¿è¦é¡¯ç¤ºå¤šå°‘個字?(é è¨­ï¼š120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數é‡'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個迴響?(é è¨­ï¼š15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); + diff --git a/plugins/serendipity_plugin_comments/lang_tr.inc.php b/plugins/serendipity_plugin_comments/lang_tr.inc.php index 41626b95..c8fa1096 100644 --- a/plugins/serendipity_plugin_comments/lang_tr.inc.php +++ b/plugins/serendipity_plugin_comments/lang_tr.inc.php @@ -1,7 +1,7 @@ - * First public version: lang_tr.inc.php */ @@ -15,4 +15,3 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Kaç adet görüþ gösterilsin? (Öntanýmlý: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s hakkýnda%s'); -?> diff --git a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php index 24a8b605..03a651b6 100644 --- a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php +++ b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php @@ -1,4 +1,8 @@ -add('description', PLUGIN_COMMENTS_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Garvin Hicking, Tadashi Jokagi, Judebert, G. Brockhaus'); - $propbag->add('version', '1.14'); + $propbag->add('version', '1.15'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -37,6 +41,7 @@ class serendipity_plugin_comments extends serendipity_plugin function introspect_config_item($name, &$propbag) { switch($name) { + case 'authorid': $authors = array('all' => ALL_AUTHORS, 'login' => CURRENT_AUTHOR); /* @@ -118,7 +123,7 @@ class serendipity_plugin_comments extends serendipity_plugin break; default: - return false; + return false; } return true; } @@ -154,14 +159,13 @@ class serendipity_plugin_comments extends serendipity_plugin } elseif ($this->get_config('viewmode') == 'trackbacks') { $viewtype .= ' AND (co.type = \'TRACKBACK\' OR co.type = \'PINGBACK\')'; } - + $cond = array(); $cond['and'] = ' AND e.isdraft = \'false\' '; if ($this->get_config('authorid') == 'login') { serendipity_ACL_SQL($cond, true); serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('source' => 'entries')); } - $q = 'SELECT co.body AS comment, co.timestamp AS stamp, @@ -186,7 +190,7 @@ class serendipity_plugin_comments extends serendipity_plugin LIMIT ' . $max_entries; $sql = serendipity_db_query($q); // echo $q; - + if ($sql && is_array($sql)) { foreach($sql AS $key => $row) { if (function_exists('mb_strimwidth')) { @@ -199,20 +203,20 @@ class serendipity_plugin_comments extends serendipity_plugin $comment .= ' [...]'; } } - + $showurls = $this->get_config('showurls','trackbacks'); $isTrackBack = $row['comment_type'] == 'TRACKBACK' || $row['comment_type'] == 'PINGBACK'; - + if ($row['comment_url'] != '' && ( ($isTrackBack && ($showurls =='trackbacks' || $showurls =='all') || !$isTrackBack && ($showurls =='comments' || $showurls =='all')))) { - - /* Fix invalid cases in protocoll part */ + + /* Fix invalid cases in protocol part */ $row['comment_url'] = preg_replace('@^http://@i','http://', $row['comment_url']); $row['comment_url'] = preg_replace('@^https://@i','https://', $row['comment_url']); - - if (substr($row['comment_url'], 0, 7) != 'http://' && + + if (substr($row['comment_url'], 0, 7) != 'http://' && substr($row['comment_url'], 0, 8) != 'https://') { - $row['comment_url'] = 'http://' . $row['comment_url']; - } + $row['comment_url'] = 'http://' . $row['comment_url']; + } $user = '' . serendipity_specialchars(strip_tags($row['user'])) . ''; } else { $user = serendipity_specialchars(strip_tags($row['user'])); @@ -265,6 +269,8 @@ class serendipity_plugin_comments extends serendipity_plugin } } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php index fdad3666..be29f02f 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php @@ -1,7 +1,7 @@ - diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php index 61c1305a..b2b98077 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php index 3fba1d96..55be7c93 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ - * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Muestra una notificación creative commons en la barra lateral.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php index bfc2af0f..d9d9f7cd 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php index 8b543c77..b5628a9a 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 692 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'クリエイティブコモンズ'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'サイドãƒãƒ¼ã«ã‚¯ãƒªã‚¨ã‚¤ãƒ†ã‚£ãƒ–コモンズを告示ã—ã¾ã™ã€‚'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php index 079114c8..ab49a928 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php @@ -1,8 +1,7 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'ì˜†ì¤„ì— í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 안내 표시를 함'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'ì˜†ì¤„ì— í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 안내 표시를 함'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php index 96ccb836..bbc61414 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'WyÅ›wietl informacjÄ™ o licencji Creative Commons w Panelu Bocznym.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php index d8c5cb86..28b85ea6 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php index 41d8dacd..6a1d26a7 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC çš„æŽˆæ¬Šæ¢æ¬¾ã€‚'); -?> \ No newline at end of file +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC çš„æŽˆæ¬Šæ¢æ¬¾ã€‚'); + diff --git a/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php b/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php index 6fee9267..3be770ef 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php @@ -1,7 +1,7 @@ - diff --git a/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php b/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php index da8f939e..9d3a427c 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_creativecommons/lang_de.inc.php b/plugins/serendipity_plugin_creativecommons/lang_de.inc.php index 3fba1d96..55be7c93 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_de.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_de.inc.php @@ -1,4 +1,4 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Display a creative commons notification in the sidebar.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_es.inc.php b/plugins/serendipity_plugin_creativecommons/lang_es.inc.php index e55ab7f1..9ee58b1a 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_es.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Muestra una notificación creative commons en la barra lateral.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php b/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php index eb956962..220ea1fc 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php b/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php index 8b543c77..b5628a9a 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 692 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'クリエイティブコモンズ'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'サイドãƒãƒ¼ã«ã‚¯ãƒªã‚¨ã‚¤ãƒ†ã‚£ãƒ–コモンズを告示ã—ã¾ã™ã€‚'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php b/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php index 079114c8..ab49a928 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php @@ -1,8 +1,7 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'ì˜†ì¤„ì— í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 안내 표시를 함'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'ì˜†ì¤„ì— í¬ë¦¬ì—ì´í‹°ë¸Œ 커먼스 안내 표시를 함'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php b/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php index 55fedc9a..c87c2f90 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Wy¶wietl informacjê o licencji Creative Commons w Panelu Bocznym.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php b/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php index f9b25574..34567abb 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php b/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php index 41d8dacd..6a1d26a7 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC çš„æŽˆæ¬Šæ¢æ¬¾ã€‚'); -?> \ No newline at end of file +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC æŽˆæ¬Šæ¢æ¬¾'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC çš„æŽˆæ¬Šæ¢æ¬¾ã€‚'); + diff --git a/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php b/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php index b64204bf..16aa8efd 100644 --- a/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php +++ b/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php @@ -1,8 +1,13 @@ -add('description', PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -28,17 +33,22 @@ class serendipity_plugin_creativecommons extends serendipity_plugin { function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); $propbag->add('description', TITLE); $propbag->add('default', ''); break; + + default: + return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title', $this->title); @@ -47,7 +57,8 @@ class serendipity_plugin_creativecommons extends serendipity_plugin { serendipity_plugin_api::hook_event('frontend_display:html_layout', $eventData); echo $eventData['display_dat']; } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php index 097944d8..cb08319f 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php @@ -1,20 +1,20 @@ - diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php index daf3f1af..9e8f53de 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php index e076dbf8..60d4bd0b 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php index b9c85dc0..bf1356b8 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php @@ -1,15 +1,15 @@ - * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Fecha'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Número de enlaces'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php index 945dc346..8a177204 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php index 0397e50d..f6853aad 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日付'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'ãƒªãƒ³ã‚¯ã®æ•°'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php index 70e84c38..f96d3812 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php @@ -1,19 +1,18 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_ENTRYLINKS_NAME', 'ê¸€ì— ìžˆëŠ” ë§í¬'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 ì•ˆì— ë‚˜íƒ€ë‚œ 모든 ë§í¬ë¥¼ 보여줌'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', 'ë§í¬ë¥¼ 새 ì°½ì— ë³´ì—¬ì£¼ê¸°'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'ë§í¬ë¥¼ 누르면 새 ì°½ì— ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: 현재 ì°½)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', '참고 ë§í¬'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', 'ìžë™ 줄바꿈'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 ë§í¬ 수'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 ê°œì˜ ì°¸ê³  ë§í¬ë¥¼ 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 ë§í¬ 순서'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'ì–´ë–¤ ë°©ì‹ìœ¼ë¡œ 참고 ë§í¬ì˜ 순서를 정하겠습니까? (기본값: ë§í¬ì˜ 수)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'ë‚ ì§œ'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'ë§í¬ì˜ 수'); +@define('PLUGIN_ENTRYLINKS_NAME', 'ê¸€ì— ìžˆëŠ” ë§í¬'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 ì•ˆì— ë‚˜íƒ€ë‚œ 모든 ë§í¬ë¥¼ 보여줌'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', 'ë§í¬ë¥¼ 새 ì°½ì— ë³´ì—¬ì£¼ê¸°'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'ë§í¬ë¥¼ 누르면 새 ì°½ì— ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: 현재 ì°½)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', '참고 ë§í¬'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', 'ìžë™ 줄바꿈'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 ë§í¬ 수'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 ê°œì˜ ì°¸ê³  ë§í¬ë¥¼ 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 ë§í¬ 순서'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'ì–´ë–¤ ë°©ì‹ìœ¼ë¡œ 참고 ë§í¬ì˜ 순서를 정하겠습니까? (기본값: ë§í¬ì˜ 수)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'ë‚ ì§œ'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'ë§í¬ì˜ 수'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php index 2aa830db..1b293282 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Data'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Ilość linków'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php index 5780902d..558879bb 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php index 0649c96e..9b9c99c8 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Dátum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Poradie v texte'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php index 7f9246b9..a38ace56 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,16 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_ENTRYLINKS_NAME', '文章連çµ'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出ç¾çš„連çµ'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連çµè¦è·³å‡ºæ–°è¦–窗嗎?(é è¨­ï¼šä¸»è¦–窗)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', 'åƒç…§é€£çµ'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', 'åƒç…§é€£çµæ•¸é‡'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個åƒç…§é€£çµï¼Ÿ(é è¨­ï¼š15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '排åºåƒç…§é€£çµ'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'è¦æ€Žæ¨£æŽ’åºåƒç…§é€£çµï¼Ÿ(é è¨­ï¼šé€£çµæ•¸é‡)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'é€£çµæ•¸é‡'); -?> \ No newline at end of file +@define('PLUGIN_ENTRYLINKS_NAME', '文章連çµ'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出ç¾çš„連çµ'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連çµè¦è·³å‡ºæ–°è¦–窗嗎?(é è¨­ï¼šä¸»è¦–窗)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', 'åƒç…§é€£çµ'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', 'åƒç…§é€£çµæ•¸é‡'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個åƒç…§é€£çµï¼Ÿ(é è¨­ï¼š15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '排åºåƒç…§é€£çµ'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'è¦æ€Žæ¨£æŽ’åºåƒç…§é€£çµï¼Ÿ(é è¨­ï¼šé€£çµæ•¸é‡)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'é€£çµæ•¸é‡'); diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php index dd82b473..e1e6d46d 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ - * First public version: lang_tr.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Tarih'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Web BaÄŸlantılarının sayısı'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php index 94abff87..97dd979a 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php b/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php index 3ec986bd..3fb6a020 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_entrylinks/lang_da.inc.php b/plugins/serendipity_plugin_entrylinks/lang_da.inc.php index c1bf1900..858b91fd 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_da.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_da.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_entrylinks/lang_de.inc.php b/plugins/serendipity_plugin_entrylinks/lang_de.inc.php index 68046bf8..70bd8366 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_de.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_de.inc.php @@ -1,15 +1,15 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Date'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Number of links'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_es.inc.php b/plugins/serendipity_plugin_entrylinks/lang_es.inc.php index 90fcf353..b01d3f84 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_es.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Fecha'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Número de enlaces'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php b/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php index 4f02c285..b767d570 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php b/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php index 0397e50d..f6853aad 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日付'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'ãƒªãƒ³ã‚¯ã®æ•°'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php b/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php index 70e84c38..f96d3812 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php @@ -1,19 +1,18 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_ENTRYLINKS_NAME', 'ê¸€ì— ìžˆëŠ” ë§í¬'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 ì•ˆì— ë‚˜íƒ€ë‚œ 모든 ë§í¬ë¥¼ 보여줌'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', 'ë§í¬ë¥¼ 새 ì°½ì— ë³´ì—¬ì£¼ê¸°'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'ë§í¬ë¥¼ 누르면 새 ì°½ì— ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: 현재 ì°½)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', '참고 ë§í¬'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', 'ìžë™ 줄바꿈'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 ë§í¬ 수'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 ê°œì˜ ì°¸ê³  ë§í¬ë¥¼ 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 ë§í¬ 순서'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'ì–´ë–¤ ë°©ì‹ìœ¼ë¡œ 참고 ë§í¬ì˜ 순서를 정하겠습니까? (기본값: ë§í¬ì˜ 수)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'ë‚ ì§œ'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'ë§í¬ì˜ 수'); +@define('PLUGIN_ENTRYLINKS_NAME', 'ê¸€ì— ìžˆëŠ” ë§í¬'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 ì•ˆì— ë‚˜íƒ€ë‚œ 모든 ë§í¬ë¥¼ 보여줌'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', 'ë§í¬ë¥¼ 새 ì°½ì— ë³´ì—¬ì£¼ê¸°'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'ë§í¬ë¥¼ 누르면 새 ì°½ì— ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: 현재 ì°½)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', '참고 ë§í¬'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', 'ìžë™ 줄바꿈'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 ê¸€ìž í›„ì— ìžë™ ì¤„ë°”ê¿ˆì„ í•˜ê² ìŠµë‹ˆê¹Œ? (기본값: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 ë§í¬ 수'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 ê°œì˜ ì°¸ê³  ë§í¬ë¥¼ 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 ë§í¬ 순서'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'ì–´ë–¤ ë°©ì‹ìœ¼ë¡œ 참고 ë§í¬ì˜ 순서를 정하겠습니까? (기본값: ë§í¬ì˜ 수)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'ë‚ ì§œ'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'ë§í¬ì˜ 수'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php b/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php index 60f32d5c..725e4102 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Data'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Ilo¶æ linków'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php b/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php index 5bfdf5ee..10fb1684 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php b/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php index 333d9128..8df5d04e 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Dátum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Poradie v texte'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php b/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php index 7f9246b9..a38ace56 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,16 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_ENTRYLINKS_NAME', '文章連çµ'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出ç¾çš„連çµ'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連çµè¦è·³å‡ºæ–°è¦–窗嗎?(é è¨­ï¼šä¸»è¦–窗)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', 'åƒç…§é€£çµ'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', 'åƒç…§é€£çµæ•¸é‡'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個åƒç…§é€£çµï¼Ÿ(é è¨­ï¼š15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '排åºåƒç…§é€£çµ'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'è¦æ€Žæ¨£æŽ’åºåƒç…§é€£çµï¼Ÿ(é è¨­ï¼šé€£çµæ•¸é‡)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'é€£çµæ•¸é‡'); -?> \ No newline at end of file +@define('PLUGIN_ENTRYLINKS_NAME', '文章連çµ'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出ç¾çš„連çµ'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連çµè¦è·³å‡ºæ–°è¦–窗嗎?(é è¨­ï¼šä¸»è¦–窗)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', 'åƒç…§é€£çµ'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'è¦å¤šå°‘字之後自動æ›è¡Œï¼Ÿ(é è¨­ï¼š30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', 'åƒç…§é€£çµæ•¸é‡'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘個åƒç…§é€£çµï¼Ÿ(é è¨­ï¼š15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '排åºåƒç…§é€£çµ'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'è¦æ€Žæ¨£æŽ’åºåƒç…§é€£çµï¼Ÿ(é è¨­ï¼šé€£çµæ•¸é‡)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'é€£çµæ•¸é‡'); diff --git a/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php b/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php index 0e822c3d..f900e3d7 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php @@ -1,7 +1,7 @@ - * First public version: lang_tr.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Tarih'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Web Baðlantýlarýnýn sayýsý'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php b/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php index 94abff87..97dd979a 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php @@ -1,4 +1,4 @@ -add('description', PLUGIN_ENTRYLINKS_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.02'); + $propbag->add('version', '1.03'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -29,66 +33,67 @@ class serendipity_plugin_entrylinks extends serendipity_plugin function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': - $propbag->add('type', 'string'); - $propbag->add('name', TITLE); - $propbag->add('description', TITLE); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', TITLE); + $propbag->add('description', TITLE); + $propbag->add('default', ''); break; case 'newwin': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_ENTRYLINKS_NEWWIN); - $propbag->add('description', PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH); - $propbag->add('default', 'false'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_ENTRYLINKS_NEWWIN); + $propbag->add('description', PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH); + $propbag->add('default', 'false'); break; case 'markup': - $propbag->add('type', 'boolean'); - $propbag->add('name', DO_MARKUP); - $propbag->add('description', DO_MARKUP_DESCRIPTION); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', DO_MARKUP); + $propbag->add('description', DO_MARKUP_DESCRIPTION); + $propbag->add('default', 'true'); break; case 'show_exits': - $propbag->add('type', 'boolean'); - $propbag->add('name', TOP_EXITS); - $propbag->add('description', SHOWS_TOP_EXIT); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', TOP_EXITS); + $propbag->add('description', SHOWS_TOP_EXIT); + $propbag->add('default', 'true'); break; case 'show_referers': - $propbag->add('type', 'boolean'); - $propbag->add('name', TOP_REFERRER); - $propbag->add('description', SHOWS_TOP_SITES); - $propbag->add('default', ''); + $propbag->add('type', 'boolean'); + $propbag->add('name', TOP_REFERRER); + $propbag->add('description', SHOWS_TOP_SITES); + $propbag->add('default', 'true'); break; case 'maxref': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_ENTRYLINKS_MAXREF); - $propbag->add('description', PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH); - $propbag->add('default', 15); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_ENTRYLINKS_MAXREF); + $propbag->add('description', PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH); + $propbag->add('default', 15); break; case 'wordwrap': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_ENTRYLINKS_WORDWRAP); - $propbag->add('description', PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH); - $propbag->add('default', 30); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_ENTRYLINKS_WORDWRAP); + $propbag->add('description', PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH); + $propbag->add('default', 30); break; case 'orderby': $select = array('day' => PLUGIN_ENTRYLINKS_ORDERBY_DAY, 'fullcount' => PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT); - $propbag->add('type', 'select'); - $propbag->add('name', PLUGIN_ENTRYLINKS_ORDERBY); - $propbag->add('description', PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH); - $propbag->add('select_values', $select); - $propbag->add('default', 'fullcount'); + $propbag->add('type', 'select'); + $propbag->add('name', PLUGIN_ENTRYLINKS_ORDERBY); + $propbag->add('description', PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH); + $propbag->add('select_values', $select); + $propbag->add('default', 'fullcount'); break; default: - return false; + return false; } return true; } @@ -105,20 +110,18 @@ class serendipity_plugin_entrylinks extends serendipity_plugin $id = serendipity_db_escape_string($serendipity['GET']['id']); } + $counter = array(); $target = ''; - $newwin = $this->get_config('newwin', 'false'); + $newwin = serendipity_db_bool($this->get_config('newwin', 'false')); $wordwrap = $this->get_config('wordwrap', 30); $maxref = $this->get_config('maxref', 15); $orderby = $this->get_config('orderby', 'fullcount'); - if ($newwin == 'true') { + if ($newwin) { $target = ' target="_blank" '; } - - $counter = array(); - - if ($this->get_config('show_exits', 'true') == 'true') { + if (serendipity_db_bool($this->get_config('show_exits', 'true'))) { $exits = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}exits WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query"); if (is_array($exits)) { foreach($exits AS $key => $row) { @@ -151,7 +154,7 @@ class serendipity_plugin_entrylinks extends serendipity_plugin } $links .= ''; - if ($this->get_config('markup', 'true') == 'true') { + if (serendipity_db_bool($this->get_config('markup', 'true'))) { $entry = array('html_nugget' => $links, 'entry_id' => $id); serendipity_plugin_api::hook_event('frontend_display', $entry); echo $entry['html_nugget']; @@ -160,10 +163,10 @@ class serendipity_plugin_entrylinks extends serendipity_plugin } } - if ($this->get_config('show_referers', 'true') == 'true') { - $ref = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}referrers WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query ORDER BY $orderby DESC LIMIT $maxref"); + if (serendipity_db_bool($this->get_config('show_referers', 'true'))) { + $ref = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}referrers WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query ORDER BY $orderby DESC LIMIT $maxref"); if (is_array($ref)) { - echo PLUGIN_ENTRYLINKS_REFERERS . '\n"; } } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php index d3c94c95..4ee3503c 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php @@ -1,12 +1,12 @@ - diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php index ddada540..59ba2e63 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php index ad904cee..41b5bdbb 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Selecciona la extensión de evento cuya salida debe ser mostrada'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Ingresa el título para este elemento de la barra lateral (déjalo vacío para heredarlo de la extensión)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php index 64bc0325..242bb10e 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php index 957e4f3a..0a01a390 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Select the event plugin for which the output should be displayed'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Enter the title for this sidebar item (leave empty for inheritance by event plugin)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php index d133e552..ff51e1a6 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php @@ -1,11 +1,10 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_WRAPPER_NAME', 'ì´ë²¤íЏ 출력 í‹€'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '특정 ì´ë²¤íЏ 플러그ì¸ì—서 ë°ì´í„°ë¥¼ 모아서 보여줌'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 ì´ë²¤íЏ 플러그ì¸'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 ë°ì´í„°ê°€ 나올 ì´ë²¤íЏ 플러그ì¸ì„ ì„ íƒ'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 ì•„ì´í…œì— í‘œì‹œë  ì œëª© (ì´ë²¤íЏ 플러그ì¸ì˜ ì œëª©ì„ ê·¸ëŒ€ë¡œ 따르려면 비워둠)'); +@define('PLUGIN_EVENT_WRAPPER_NAME', 'ì´ë²¤íЏ 출력 í‹€'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '특정 ì´ë²¤íЏ 플러그ì¸ì—서 ë°ì´í„°ë¥¼ 모아서 보여줌'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 ì´ë²¤íЏ 플러그ì¸'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 ë°ì´í„°ê°€ 나올 ì´ë²¤íЏ 플러그ì¸ì„ ì„ íƒ'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 ì•„ì´í…œì— í‘œì‹œë  ì œëª© (ì´ë²¤íЏ 플러그ì¸ì˜ ì œëª©ì„ ê·¸ëŒ€ë¡œ 따르려면 비워둠)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php index 4fce4150..70e31c65 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -10,6 +10,5 @@ @define('PLUGIN_EVENT_WRAPPER_DESC', 'Pokazuje dane zebrane z kilku Wtyczek ZdarzeÅ„'); @define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'ŹródÅ‚owa Wtyczka Zdarzenia'); @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Wybierz wtyczkÄ™, której dane majÄ… być pokazane'); -@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowadź tytuÅ‚ pozycji wyÅ›wietlonej w Panelu Bocznym Enter (zostaw puste by pozostawić nazwÄ™ wtyczki, z której dane bÄ™dÄ… pobierane)'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowadź tytuÅ‚ pozycji wyÅ›wietlonej w Panelu Bocznym Enter (zostaw puste by pozostawić nazwÄ™ wtyczki, z której dane bÄ™dÄ… pobierane)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php index 24421766..568cf6de 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php index c763ede7..c6e658ea 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,9 +12,9 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '顯示æŸå€‹äº‹ä»¶å¤–掛的輸出資料'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來æºå¤–掛'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '鏿“‡è¦é¡¯ç¤ºè¼¸å‡ºè³‡æ–™çš„事件外掛'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在å´åˆ—顯示的標題 (輸入空白如果è¦ç”¨ä¾†æºå¤–掛的å稱)'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '顯示æŸå€‹äº‹ä»¶å¤–掛的輸出資料'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來æºå¤–掛'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '鏿“‡è¦é¡¯ç¤ºè¼¸å‡ºè³‡æ–™çš„事件外掛'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在å´åˆ—顯示的標題 (輸入空白如果è¦ç”¨ä¾†æºå¤–掛的å稱)'); + diff --git a/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php index 20092b13..17eb846c 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php @@ -1,12 +1,12 @@ - diff --git a/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php index caa2f0e8..e9e17877 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php @@ -1,4 +1,4 @@ - diff --git a/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php index f9611942..03c36a3a 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Select the event plugin for which the output should be displayed'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Enter the title for this sidebar item (leave empty for inheritance by event plugin)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php index abaaf60b..976c265a 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Selecciona la extensión de evento cuya salida debe ser mostrada'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Ingresa el título para este elemento de la barra lateral (déjalo vacío para heredarlo de la extensión)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php index 319e79ad..a9cdc642 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php index 957e4f3a..0a01a390 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Select the event plugin for which the output should be displayed'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Enter the title for this sidebar item (leave empty for inheritance by event plugin)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php index d133e552..ff51e1a6 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php @@ -1,11 +1,10 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_WRAPPER_NAME', 'ì´ë²¤íЏ 출력 í‹€'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '특정 ì´ë²¤íЏ 플러그ì¸ì—서 ë°ì´í„°ë¥¼ 모아서 보여줌'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 ì´ë²¤íЏ 플러그ì¸'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 ë°ì´í„°ê°€ 나올 ì´ë²¤íЏ 플러그ì¸ì„ ì„ íƒ'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 ì•„ì´í…œì— í‘œì‹œë  ì œëª© (ì´ë²¤íЏ 플러그ì¸ì˜ ì œëª©ì„ ê·¸ëŒ€ë¡œ 따르려면 비워둠)'); +@define('PLUGIN_EVENT_WRAPPER_NAME', 'ì´ë²¤íЏ 출력 í‹€'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '특정 ì´ë²¤íЏ 플러그ì¸ì—서 ë°ì´í„°ë¥¼ 모아서 보여줌'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 ì´ë²¤íЏ 플러그ì¸'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 ë°ì´í„°ê°€ 나올 ì´ë²¤íЏ 플러그ì¸ì„ ì„ íƒ'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 ì•„ì´í…œì— í‘œì‹œë  ì œëª© (ì´ë²¤íЏ 플러그ì¸ì˜ ì œëª©ì„ ê·¸ëŒ€ë¡œ 따르려면 비워둠)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php index 95e957bf..76e5e482 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -10,6 +10,5 @@ @define('PLUGIN_EVENT_WRAPPER_DESC', 'Pokazuje dane zebrane z kilku Wtyczek Zdarzeñ'); @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '¬ród³owa Wtyczka Zdarzenia'); @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Wybierz wtyczkê, której dane maj± byæ pokazane'); -@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowad¼ tytu³ pozycji wy¶wietlonej w Panelu Bocznym Enter (zostaw puste by pozostawiæ nazwê wtyczki, z której dane bêd± pobierane)'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowad¼ tytu³ pozycji wy¶wietlonej w Panelu Bocznym Enter (zostaw puste by pozostawiæ nazwê wtyczki, z której dane bêd± pobierane)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php index 50101f42..a1594bb0 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php index c763ede7..c6e658ea 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,9 +12,9 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '顯示æŸå€‹äº‹ä»¶å¤–掛的輸出資料'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來æºå¤–掛'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '鏿“‡è¦é¡¯ç¤ºè¼¸å‡ºè³‡æ–™çš„事件外掛'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在å´åˆ—顯示的標題 (輸入空白如果è¦ç”¨ä¾†æºå¤–掛的å稱)'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '顯示æŸå€‹äº‹ä»¶å¤–掛的輸出資料'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來æºå¤–掛'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '鏿“‡è¦é¡¯ç¤ºè¼¸å‡ºè³‡æ–™çš„事件外掛'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在å´åˆ—顯示的標題 (輸入空白如果è¦ç”¨ä¾†æºå¤–掛的å稱)'); + diff --git a/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php b/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php index ed146b02..4bf56390 100644 --- a/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php +++ b/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php @@ -1,10 +1,14 @@ -add('description', PLUGIN_EVENT_WRAPPER_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -30,6 +34,7 @@ var $rewrite_from, $rewrite_to; global $serendipity; switch($name) { + case 'event_plugin': $plugins = serendipity_plugin_api::get_event_plugins(); $select = array(); @@ -55,14 +60,14 @@ var $rewrite_from, $rewrite_to; break; default: - return false; + return false; } return true; } function generate_content(&$title) { - $plug = $this->get_config('event_plugin', 'false'); + $plug = $this->get_config('event_plugin', 'false');// mixed! if ($plug == 'false') { return; } @@ -79,6 +84,7 @@ var $rewrite_from, $rewrite_to; $title = $faketitle; } } + } /* vim: set sts=4 ts=4 expandtab : */ diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php index 91016c31..284a5f8a 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php @@ -1,32 +1,33 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_HISTORY_NAME', 'Geschichte'); - @define('PLUGIN_HISTORY_DESC', 'Zeigt Einträge eines einstellbaren Alters an.'); - @define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Einträge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_AGE', 'Höchstalter'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','Höchstalter der Einträge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Einträge sollen maximal angezeigt werden?'); - @define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Einträge'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur Überschriften, sondern ganze Einträge anzeigen.'); - @define('PLUGIN_HISTORY_INTRO', 'Intro'); - @define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Einträgen angezeigt werden soll'); - @define('PLUGIN_HISTORY_OUTRO', 'Outro'); - @define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Einträgen angezeigt werden soll'); - @define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); - @define('PLUGIN_HISTORY_MAXLENGTH', 'Überschriftenlänge'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die Überschriften abgeschnitten werden (0 für garnicht)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen möchten, wählen Sie \'Anderer\' aus und füllen die unteren beiden Felder.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Einträge vom selben Datum des letzten Jahres an.'); - @define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); - @define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); - @define('PLUGIN_HISTORY_MYSELF', 'Anderer'); +@define('PLUGIN_HISTORY_NAME', 'Geschichte'); +@define('PLUGIN_HISTORY_DESC', 'Zeigt Einträge eines einstellbaren Alters an.'); +@define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Einträge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_AGE', 'Höchstalter'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','Höchstalter der Einträge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Einträge sollen maximal angezeigt werden?'); +@define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Einträge'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur Überschriften, sondern ganze Einträge anzeigen.'); +@define('PLUGIN_HISTORY_INTRO', 'Intro'); +@define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Einträgen angezeigt werden soll'); +@define('PLUGIN_HISTORY_OUTRO', 'Outro'); +@define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Einträgen angezeigt werden soll'); +@define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); +@define('PLUGIN_HISTORY_MAXLENGTH', 'Überschriftenlänge'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die Überschriften abgeschnitten werden (0 für garnicht)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen möchten, wählen Sie \'Anderer\' aus und füllen die unteren beiden Felder.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Einträge vom selben Datum des letzten Jahres an.'); +@define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); +@define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); +@define('PLUGIN_HISTORY_MYSELF', 'Anderer'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); \ No newline at end of file +@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php index 5f7bef28..5b852dac 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -31,4 +31,3 @@ @define('PLUGIN_HISTORY_OYA', 'Hace un año'); @define('PLUGIN_HISTORY_MYSELF', 'Yo definiré uno'); -?> diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php index 77c0ba34..78d4cbe4 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php index 51cfe810..9df6d140 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 1381 */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', '1 å¹´å‰'); @define('PLUGIN_HISTORY_MYSELF', 'I\'ll define one'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '著者ã®åå‰ã‚’表示ã™ã‚‹'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php index bee68673..9283984b 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php @@ -1,30 +1,29 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_HISTORY_NAME', 'ì˜¤ëž˜ëœ ê¸€'); - @define('PLUGIN_HISTORY_DESC', '설정한 ê¸°ê°„ì— ë§žì¶° 오래 ì „ì— ì¼ë˜ ê¸€ì„ ë³´ì—¬ì¤Œ'); - @define('PLUGIN_HISTORY_MIN_AGE', '최소 나ì´'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', 'ê¸€ì˜ ìµœì†Œ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); - @define('PLUGIN_HISTORY_MAX_AGE', '최대 나ì´'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','ê¸€ì˜ ìµœëŒ€ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 ê¸€ì˜ ìˆ˜'); - @define('PLUGIN_HISTORY_SHOWFULL', '글 ì „ì²´ 보기'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 ë§í¬í•˜ì§€ ë§ê³  글 ì „ì²´ ë‚´ìš©ì„ ë³´ì—¬ì¤Œ'); - @define('PLUGIN_HISTORY_INTRO', '소갯ë§'); - @define('PLUGIN_HISTORY_INTRO_DESC', '\'작년ì—는 ì´ëŸ° 걸 ì ì—ˆì£ :\' ì‹ì˜ 간단한 소갯ë§'); - @define('PLUGIN_HISTORY_OUTRO', '맺ìŒë§'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' ì‹ì˜ 간단한 맺ìŒë§'); - @define('PLUGIN_HISTORY_DISPLAYDATE', 'ë‚ ì§œ 보기'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'ê¸€ì´ ìž‘ì„±ëœ ë‚ ì§œë¥¼ 표시하겠습니까?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '제목 길ì´'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 ê¸€ìž í›„ ì œëª©ì„ ìƒëžµí•˜ê² ìŠµë‹ˆê¹Œ(0ì„ ìž…ë ¥í•˜ë©´ ëª¨ë‘ ì¶œë ¥)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 ì •í•´ì§„ 기간 대신 ì§ì ‘ ê¸°ê°„ì„ ì •í•˜ê³  ì‹¶ì„ ê²½ìš° \'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥\'ì„ ì„ íƒí•˜ê³  ë‘ ê°œì˜ ì„¤ì •ì„ ì¡°ì ˆí•˜ì‹­ì‹œì˜¤.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1ë…„ ì „ ê¸€ì„ ë³´ì—¬ì¤Œ'); - @define('PLUGIN_HISTORY_CUSTOMAGE', 'ê¸°ê°„ì„ ì§ì ‘ 정합니다'); - @define('PLUGIN_HISTORY_OYA', '1ë…„ ì „'); - @define('PLUGIN_HISTORY_MYSELF', 'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥'); +@define('PLUGIN_HISTORY_NAME', 'ì˜¤ëž˜ëœ ê¸€'); +@define('PLUGIN_HISTORY_DESC', '설정한 ê¸°ê°„ì— ë§žì¶° 오래 ì „ì— ì¼ë˜ ê¸€ì„ ë³´ì—¬ì¤Œ'); +@define('PLUGIN_HISTORY_MIN_AGE', '최소 나ì´'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', 'ê¸€ì˜ ìµœì†Œ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); +@define('PLUGIN_HISTORY_MAX_AGE', '최대 나ì´'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','ê¸€ì˜ ìµœëŒ€ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 ê¸€ì˜ ìˆ˜'); +@define('PLUGIN_HISTORY_SHOWFULL', '글 ì „ì²´ 보기'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 ë§í¬í•˜ì§€ ë§ê³  글 ì „ì²´ ë‚´ìš©ì„ ë³´ì—¬ì¤Œ'); +@define('PLUGIN_HISTORY_INTRO', '소갯ë§'); +@define('PLUGIN_HISTORY_INTRO_DESC', '\'작년ì—는 ì´ëŸ° 걸 ì ì—ˆì£ :\' ì‹ì˜ 간단한 소갯ë§'); +@define('PLUGIN_HISTORY_OUTRO', '맺ìŒë§'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' ì‹ì˜ 간단한 맺ìŒë§'); +@define('PLUGIN_HISTORY_DISPLAYDATE', 'ë‚ ì§œ 보기'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'ê¸€ì´ ìž‘ì„±ëœ ë‚ ì§œë¥¼ 표시하겠습니까?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '제목 길ì´'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 ê¸€ìž í›„ ì œëª©ì„ ìƒëžµí•˜ê² ìŠµë‹ˆê¹Œ(0ì„ ìž…ë ¥í•˜ë©´ ëª¨ë‘ ì¶œë ¥)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 ì •í•´ì§„ 기간 대신 ì§ì ‘ ê¸°ê°„ì„ ì •í•˜ê³  ì‹¶ì„ ê²½ìš° \'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥\'ì„ ì„ íƒí•˜ê³  ë‘ ê°œì˜ ì„¤ì •ì„ ì¡°ì ˆí•˜ì‹­ì‹œì˜¤.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1ë…„ ì „ ê¸€ì„ ë³´ì—¬ì¤Œ'); +@define('PLUGIN_HISTORY_CUSTOMAGE', 'ê¸°ê°„ì„ ì§ì ‘ 정합니다'); +@define('PLUGIN_HISTORY_OYA', '1ë…„ ì „'); +@define('PLUGIN_HISTORY_MYSELF', 'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥'); -?> diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php index a7b0ca4d..199ae8fc 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Sprzed roku'); @define('PLUGIN_HISTORY_MYSELF', 'ZdefiniujÄ™ samodzielnie'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Pokaż imiÄ™/nazwÄ™ autora'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php index b560b9d1..edd39c90 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php index c7559379..394f8c0f 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Pred rokom'); @define('PLUGIN_HISTORY_MYSELF', 'Nastavím sám'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'ZobraziÅ¥ meno autora'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php index 603cce98..13c33223 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,28 +12,28 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_HISTORY_NAME', 'æ­·å²'); - @define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); - @define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數é‡'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數é‡'); - @define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或åªé¡¯ç¤ºå®ƒçš„æ¨™é¡Œã€‚'); - @define('PLUGIN_HISTORY_INTRO', '介紹'); - @define('PLUGIN_HISTORY_INTRO_DESC', 'ç°¡å–®çš„ä»‹ç´¹åƒ \'䏀年剿ˆ‘說:\'。'); - @define('PLUGIN_HISTORY_OUTRO', 'çµå°¾'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的çµå°¾åƒ \'ä¸éŒ¯å°å§ï¼Ÿ\'。'); - @define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'å…許多少個標題的文字後切斷?(0 如果ä¸åˆ‡æ–·)'); - @define('PLUGIN_HISTORY_SPECIALAGE', 'é å®šæ—¥æœŸï¼Ÿ'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你ä¸ç”¨é å®šçš„æ—¥æœŸï¼Œè¦ç”¨è‡ªè¨‚çš„æ—¥æœŸï¼Œè«‹é¸æ“‡ \'自訂\' 然後æä¾›ä¸‹é¢çš„兩個設定。'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); - @define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); - @define('PLUGIN_HISTORY_OYA', '一年å‰'); - @define('PLUGIN_HISTORY_MYSELF', '自訂'); -?> \ No newline at end of file +@define('PLUGIN_HISTORY_NAME', 'æ­·å²'); +@define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); +@define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數é‡'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數é‡'); +@define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或åªé¡¯ç¤ºå®ƒçš„æ¨™é¡Œã€‚'); +@define('PLUGIN_HISTORY_INTRO', '介紹'); +@define('PLUGIN_HISTORY_INTRO_DESC', 'ç°¡å–®çš„ä»‹ç´¹åƒ \'䏀年剿ˆ‘說:\'。'); +@define('PLUGIN_HISTORY_OUTRO', 'çµå°¾'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的çµå°¾åƒ \'ä¸éŒ¯å°å§ï¼Ÿ\'。'); +@define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'å…許多少個標題的文字後切斷?(0 如果ä¸åˆ‡æ–·)'); +@define('PLUGIN_HISTORY_SPECIALAGE', 'é å®šæ—¥æœŸï¼Ÿ'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你ä¸ç”¨é å®šçš„æ—¥æœŸï¼Œè¦ç”¨è‡ªè¨‚çš„æ—¥æœŸï¼Œè«‹é¸æ“‡ \'自訂\' 然後æä¾›ä¸‹é¢çš„兩個設定。'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); +@define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); +@define('PLUGIN_HISTORY_OYA', '一年å‰'); +@define('PLUGIN_HISTORY_MYSELF', '自訂'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php index fadd9c64..2b972627 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php @@ -25,3 +25,4 @@ @define('PLUGIN_HISTORY_OYA', '显示æ°å¥½å‘布已满一年的文章'); @define('PLUGIN_HISTORY_MYSELF', '自己设定日期时间段'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '显示作者姓å'); + diff --git a/plugins/serendipity_plugin_history/lang_bg.inc.php b/plugins/serendipity_plugin_history/lang_bg.inc.php index 9a0b1253..706e32c1 100644 --- a/plugins/serendipity_plugin_history/lang_bg.inc.php +++ b/plugins/serendipity_plugin_history/lang_bg.inc.php @@ -1,32 +1,33 @@ - * @translated 2009/06/03 */ - @define('PLUGIN_HISTORY_NAME', 'Geschichte'); - @define('PLUGIN_HISTORY_DESC', 'Zeigt Einträge eines einstellbaren Alters an.'); - @define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Einträge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_AGE', 'Höchstalter'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','Höchstalter der Einträge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Einträge sollen maximal angezeigt werden?'); - @define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Einträge'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur Überschriften, sondern ganze Einträge anzeigen.'); - @define('PLUGIN_HISTORY_INTRO', 'Intro'); - @define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Einträgen angezeigt werden soll'); - @define('PLUGIN_HISTORY_OUTRO', 'Outro'); - @define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Einträgen angezeigt werden soll'); - @define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); - @define('PLUGIN_HISTORY_MAXLENGTH', 'Überschriftenlänge'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die Überschriften abgeschnitten werden (0 für garnicht)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen möchten, wählen Sie \'Anderer\' aus und füllen die unteren beiden Felder.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Einträge vom selben Datum des letzten Jahres an.'); - @define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); - @define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); - @define('PLUGIN_HISTORY_MYSELF', 'Anderer'); +@define('PLUGIN_HISTORY_NAME', 'Geschichte'); +@define('PLUGIN_HISTORY_DESC', 'Zeigt Einträge eines einstellbaren Alters an.'); +@define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Einträge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_AGE', 'Höchstalter'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','Höchstalter der Einträge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Einträge sollen maximal angezeigt werden?'); +@define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Einträge'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur Überschriften, sondern ganze Einträge anzeigen.'); +@define('PLUGIN_HISTORY_INTRO', 'Intro'); +@define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Einträgen angezeigt werden soll'); +@define('PLUGIN_HISTORY_OUTRO', 'Outro'); +@define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Einträgen angezeigt werden soll'); +@define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); +@define('PLUGIN_HISTORY_MAXLENGTH', 'Überschriftenlänge'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die Überschriften abgeschnitten werden (0 für garnicht)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen möchten, wählen Sie \'Anderer\' aus und füllen die unteren beiden Felder.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Einträge vom selben Datum des letzten Jahres an.'); +@define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); +@define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); +@define('PLUGIN_HISTORY_MYSELF', 'Anderer'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); \ No newline at end of file +@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); + diff --git a/plugins/serendipity_plugin_history/lang_en.inc.php b/plugins/serendipity_plugin_history/lang_en.inc.php index d8a03db0..d57734c4 100644 --- a/plugins/serendipity_plugin_history/lang_en.inc.php +++ b/plugins/serendipity_plugin_history/lang_en.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'One year ago'); @define('PLUGIN_HISTORY_MYSELF', 'I\'ll define one'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Show author\'s name'); + diff --git a/plugins/serendipity_plugin_history/lang_es.inc.php b/plugins/serendipity_plugin_history/lang_es.inc.php index 89fddfec..588a3467 100644 --- a/plugins/serendipity_plugin_history/lang_es.inc.php +++ b/plugins/serendipity_plugin_history/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -31,4 +31,3 @@ @define('PLUGIN_HISTORY_OYA', 'Hace un año'); @define('PLUGIN_HISTORY_MYSELF', 'Yo definiré uno'); -?> diff --git a/plugins/serendipity_plugin_history/lang_fr.inc.php b/plugins/serendipity_plugin_history/lang_fr.inc.php index 06082f89..472662b5 100644 --- a/plugins/serendipity_plugin_history/lang_fr.inc.php +++ b/plugins/serendipity_plugin_history/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/lang_ja.inc.php b/plugins/serendipity_plugin_history/lang_ja.inc.php index 51cfe810..9df6d140 100644 --- a/plugins/serendipity_plugin_history/lang_ja.inc.php +++ b/plugins/serendipity_plugin_history/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 1381 */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', '1 å¹´å‰'); @define('PLUGIN_HISTORY_MYSELF', 'I\'ll define one'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '著者ã®åå‰ã‚’表示ã™ã‚‹'); + diff --git a/plugins/serendipity_plugin_history/lang_ko.inc.php b/plugins/serendipity_plugin_history/lang_ko.inc.php index bee68673..9283984b 100644 --- a/plugins/serendipity_plugin_history/lang_ko.inc.php +++ b/plugins/serendipity_plugin_history/lang_ko.inc.php @@ -1,30 +1,29 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_HISTORY_NAME', 'ì˜¤ëž˜ëœ ê¸€'); - @define('PLUGIN_HISTORY_DESC', '설정한 ê¸°ê°„ì— ë§žì¶° 오래 ì „ì— ì¼ë˜ ê¸€ì„ ë³´ì—¬ì¤Œ'); - @define('PLUGIN_HISTORY_MIN_AGE', '최소 나ì´'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', 'ê¸€ì˜ ìµœì†Œ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); - @define('PLUGIN_HISTORY_MAX_AGE', '최대 나ì´'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','ê¸€ì˜ ìµœëŒ€ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 ê¸€ì˜ ìˆ˜'); - @define('PLUGIN_HISTORY_SHOWFULL', '글 ì „ì²´ 보기'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 ë§í¬í•˜ì§€ ë§ê³  글 ì „ì²´ ë‚´ìš©ì„ ë³´ì—¬ì¤Œ'); - @define('PLUGIN_HISTORY_INTRO', '소갯ë§'); - @define('PLUGIN_HISTORY_INTRO_DESC', '\'작년ì—는 ì´ëŸ° 걸 ì ì—ˆì£ :\' ì‹ì˜ 간단한 소갯ë§'); - @define('PLUGIN_HISTORY_OUTRO', '맺ìŒë§'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' ì‹ì˜ 간단한 맺ìŒë§'); - @define('PLUGIN_HISTORY_DISPLAYDATE', 'ë‚ ì§œ 보기'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'ê¸€ì´ ìž‘ì„±ëœ ë‚ ì§œë¥¼ 표시하겠습니까?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '제목 길ì´'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 ê¸€ìž í›„ ì œëª©ì„ ìƒëžµí•˜ê² ìŠµë‹ˆê¹Œ(0ì„ ìž…ë ¥í•˜ë©´ ëª¨ë‘ ì¶œë ¥)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 ì •í•´ì§„ 기간 대신 ì§ì ‘ ê¸°ê°„ì„ ì •í•˜ê³  ì‹¶ì„ ê²½ìš° \'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥\'ì„ ì„ íƒí•˜ê³  ë‘ ê°œì˜ ì„¤ì •ì„ ì¡°ì ˆí•˜ì‹­ì‹œì˜¤.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1ë…„ ì „ ê¸€ì„ ë³´ì—¬ì¤Œ'); - @define('PLUGIN_HISTORY_CUSTOMAGE', 'ê¸°ê°„ì„ ì§ì ‘ 정합니다'); - @define('PLUGIN_HISTORY_OYA', '1ë…„ ì „'); - @define('PLUGIN_HISTORY_MYSELF', 'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥'); +@define('PLUGIN_HISTORY_NAME', 'ì˜¤ëž˜ëœ ê¸€'); +@define('PLUGIN_HISTORY_DESC', '설정한 ê¸°ê°„ì— ë§žì¶° 오래 ì „ì— ì¼ë˜ ê¸€ì„ ë³´ì—¬ì¤Œ'); +@define('PLUGIN_HISTORY_MIN_AGE', '최소 나ì´'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', 'ê¸€ì˜ ìµœì†Œ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); +@define('PLUGIN_HISTORY_MAX_AGE', '최대 나ì´'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','ê¸€ì˜ ìµœëŒ€ ë‚˜ì´ (ì¼ ë‹¨ìœ„)'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 ê¸€ì˜ ìˆ˜'); +@define('PLUGIN_HISTORY_SHOWFULL', '글 ì „ì²´ 보기'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 ë§í¬í•˜ì§€ ë§ê³  글 ì „ì²´ ë‚´ìš©ì„ ë³´ì—¬ì¤Œ'); +@define('PLUGIN_HISTORY_INTRO', '소갯ë§'); +@define('PLUGIN_HISTORY_INTRO_DESC', '\'작년ì—는 ì´ëŸ° 걸 ì ì—ˆì£ :\' ì‹ì˜ 간단한 소갯ë§'); +@define('PLUGIN_HISTORY_OUTRO', '맺ìŒë§'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' ì‹ì˜ 간단한 맺ìŒë§'); +@define('PLUGIN_HISTORY_DISPLAYDATE', 'ë‚ ì§œ 보기'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'ê¸€ì´ ìž‘ì„±ëœ ë‚ ì§œë¥¼ 표시하겠습니까?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '제목 길ì´'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 ê¸€ìž í›„ ì œëª©ì„ ìƒëžµí•˜ê² ìŠµë‹ˆê¹Œ(0ì„ ìž…ë ¥í•˜ë©´ ëª¨ë‘ ì¶œë ¥)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 ì •í•´ì§„ 기간 대신 ì§ì ‘ ê¸°ê°„ì„ ì •í•˜ê³  ì‹¶ì„ ê²½ìš° \'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥\'ì„ ì„ íƒí•˜ê³  ë‘ ê°œì˜ ì„¤ì •ì„ ì¡°ì ˆí•˜ì‹­ì‹œì˜¤.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1ë…„ ì „ ê¸€ì„ ë³´ì—¬ì¤Œ'); +@define('PLUGIN_HISTORY_CUSTOMAGE', 'ê¸°ê°„ì„ ì§ì ‘ 정합니다'); +@define('PLUGIN_HISTORY_OYA', '1ë…„ ì „'); +@define('PLUGIN_HISTORY_MYSELF', 'ê¸°ê°„ì„ ì§ì ‘ ìž…ë ¥'); -?> diff --git a/plugins/serendipity_plugin_history/lang_pl.inc.php b/plugins/serendipity_plugin_history/lang_pl.inc.php index fa34009f..742d952d 100644 --- a/plugins/serendipity_plugin_history/lang_pl.inc.php +++ b/plugins/serendipity_plugin_history/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Sprzed roku'); @define('PLUGIN_HISTORY_MYSELF', 'Zdefiniujê samodzielnie'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Poka¿ imiê/nazwê autora'); + diff --git a/plugins/serendipity_plugin_history/lang_pt_PT.inc.php b/plugins/serendipity_plugin_history/lang_pt_PT.inc.php index 34b9fd9f..850b456c 100644 --- a/plugins/serendipity_plugin_history/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_history/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/lang_sk.inc.php b/plugins/serendipity_plugin_history/lang_sk.inc.php index 285b09b6..5f7180cc 100644 --- a/plugins/serendipity_plugin_history/lang_sk.inc.php +++ b/plugins/serendipity_plugin_history/lang_sk.inc.php @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Pred rokom'); @define('PLUGIN_HISTORY_MYSELF', 'Nastavím sám'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zobrazi» meno autora'); + diff --git a/plugins/serendipity_plugin_history/lang_tn.inc.php b/plugins/serendipity_plugin_history/lang_tn.inc.php index 603cce98..13c33223 100644 --- a/plugins/serendipity_plugin_history/lang_tn.inc.php +++ b/plugins/serendipity_plugin_history/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,28 +12,28 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_HISTORY_NAME', 'æ­·å²'); - @define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); - @define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數é‡'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數é‡'); - @define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或åªé¡¯ç¤ºå®ƒçš„æ¨™é¡Œã€‚'); - @define('PLUGIN_HISTORY_INTRO', '介紹'); - @define('PLUGIN_HISTORY_INTRO_DESC', 'ç°¡å–®çš„ä»‹ç´¹åƒ \'䏀年剿ˆ‘說:\'。'); - @define('PLUGIN_HISTORY_OUTRO', 'çµå°¾'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的çµå°¾åƒ \'ä¸éŒ¯å°å§ï¼Ÿ\'。'); - @define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'å…許多少個標題的文字後切斷?(0 如果ä¸åˆ‡æ–·)'); - @define('PLUGIN_HISTORY_SPECIALAGE', 'é å®šæ—¥æœŸï¼Ÿ'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你ä¸ç”¨é å®šçš„æ—¥æœŸï¼Œè¦ç”¨è‡ªè¨‚çš„æ—¥æœŸï¼Œè«‹é¸æ“‡ \'自訂\' 然後æä¾›ä¸‹é¢çš„兩個設定。'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); - @define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); - @define('PLUGIN_HISTORY_OYA', '一年å‰'); - @define('PLUGIN_HISTORY_MYSELF', '自訂'); -?> \ No newline at end of file +@define('PLUGIN_HISTORY_NAME', 'æ­·å²'); +@define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); +@define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數é‡'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數é‡'); +@define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或åªé¡¯ç¤ºå®ƒçš„æ¨™é¡Œã€‚'); +@define('PLUGIN_HISTORY_INTRO', '介紹'); +@define('PLUGIN_HISTORY_INTRO_DESC', 'ç°¡å–®çš„ä»‹ç´¹åƒ \'䏀年剿ˆ‘說:\'。'); +@define('PLUGIN_HISTORY_OUTRO', 'çµå°¾'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的çµå°¾åƒ \'ä¸éŒ¯å°å§ï¼Ÿ\'。'); +@define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'å…許多少個標題的文字後切斷?(0 如果ä¸åˆ‡æ–·)'); +@define('PLUGIN_HISTORY_SPECIALAGE', 'é å®šæ—¥æœŸï¼Ÿ'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你ä¸ç”¨é å®šçš„æ—¥æœŸï¼Œè¦ç”¨è‡ªè¨‚çš„æ—¥æœŸï¼Œè«‹é¸æ“‡ \'自訂\' 然後æä¾›ä¸‹é¢çš„兩個設定。'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); +@define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); +@define('PLUGIN_HISTORY_OYA', '一年å‰'); +@define('PLUGIN_HISTORY_MYSELF', '自訂'); + diff --git a/plugins/serendipity_plugin_history/lang_zh.inc.php b/plugins/serendipity_plugin_history/lang_zh.inc.php index fadd9c64..2b972627 100644 --- a/plugins/serendipity_plugin_history/lang_zh.inc.php +++ b/plugins/serendipity_plugin_history/lang_zh.inc.php @@ -25,3 +25,4 @@ @define('PLUGIN_HISTORY_OYA', '显示æ°å¥½å‘布已满一年的文章'); @define('PLUGIN_HISTORY_MYSELF', '自己设定日期时间段'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '显示作者姓å'); + diff --git a/plugins/serendipity_plugin_history/serendipity_plugin_history.php b/plugins/serendipity_plugin_history/serendipity_plugin_history.php index 1d0b538b..2081a590 100644 --- a/plugins/serendipity_plugin_history/serendipity_plugin_history.php +++ b/plugins/serendipity_plugin_history/serendipity_plugin_history.php @@ -1,4 +1,8 @@ -add('description', PLUGIN_HISTORY_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Jannis Hermanns'); - $propbag->add('version', '1.6'); + $propbag->add('version', '1.7'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -41,88 +45,102 @@ class serendipity_plugin_history extends serendipity_plugin function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); $propbag->add('description', ''); $propbag->add('default', PLUGIN_HISTORY_NAME); - break; + break; + case 'intro': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_INTRO); $propbag->add('description', PLUGIN_HISTORY_INTRO_DESC); $propbag->add('default', ''); - break; + break; + case 'outro': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_OUTRO); $propbag->add('description', PLUGIN_HISTORY_OUTRO_DESC); $propbag->add('default', ''); - break; + break; + case 'maxlength': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MAXLENGTH); $propbag->add('description', PLUGIN_HISTORY_MAXLENGTH_DESC); $propbag->add('default', 30); - break; + break; + case 'specialage': $propbag->add('type', 'select'); $propbag->add('name', PLUGIN_HISTORY_SPECIALAGE); $propbag->add('description', PLUGIN_HISTORY_SPECIALAGE_DESC); $propbag->add('default', 'year'); $propbag->add('select_values', array('year'=>PLUGIN_HISTORY_OYA,'custom'=>PLUGIN_HISTORY_MYSELF)); - break; + break; + case 'min_age': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MIN_AGE); $propbag->add('description', PLUGIN_HISTORY_MIN_AGE_DESC); $propbag->add('default', 365); - break; + break; + case 'max_age': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MAX_AGE); $propbag->add('description', PLUGIN_HISTORY_MAX_AGE_DESC); $propbag->add('default', 365); - break; + break; + case 'max_entries': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MAX_ENTRIES); $propbag->add('description', PLUGIN_HISTORY_MAX_ENTRIES_DESC); $propbag->add('default', 5); - break; - case 'full': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_HISTORY_SHOWFULL); - $propbag->add('description', PLUGIN_HISTORY_SHOWFULL_DESC); - $propbag->add('default', false); - break; - case 'displaydate': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_HISTORY_DISPLAYDATE); - $propbag->add('description', PLUGIN_HISTORY_DISPLAYDATE_DESC); - $propbag->add('default', true); - break; - case 'displayauthor': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_HISTORY_DISPLAYAUTHOR); - $propbag->add('description', ''); - $propbag->add('default', false); - break; + break; + case 'dateformat': $propbag->add('type', 'string'); $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%a, %d.%m.%Y %H:%M')); $propbag->add('default', '%a, %d.%m.%Y %H:%M'); - break; + break; + + case 'full': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_HISTORY_SHOWFULL); + $propbag->add('description', PLUGIN_HISTORY_SHOWFULL_DESC); + $propbag->add('default', 'false'); + break; + + case 'displaydate': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_HISTORY_DISPLAYDATE); + $propbag->add('description', PLUGIN_HISTORY_DISPLAYDATE_DESC); + $propbag->add('default', 'true'); + break; + + case 'displayauthor': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_HISTORY_DISPLAYAUTHOR); + $propbag->add('description', ''); + $propbag->add('default', 'false'); + break; + default: - return false; + return false; } return true; } function generate_content(&$title) { - global $serendipity; + global $serendipity; + $title = $this->get_config('title', $this->title); $intro = $this->get_config('intro'); $outro = $this->get_config('outro'); @@ -131,10 +149,10 @@ class serendipity_plugin_history extends serendipity_plugin $min_age = $this->get_config('min_age'); $max_age = $this->get_config('max_age'); $specialage = $this->get_config('specialage'); - $displaydate = $this->get_config('displaydate', 'true'); + $displaydate = serendipity_db_bool($this->get_config('displaydate', 'true')); $dateformat = $this->get_config('dateformat'); - $full = serendipity_db_bool($this->get_config('full')); - $displayauthor = serendipity_db_bool($this->get_config('displayauthor', false)); + $full = serendipity_db_bool($this->get_config('full', 'false')); + $displayauthor = serendipity_db_bool($this->get_config('displayauthor', 'false')); if (!is_numeric($min_age) || $min_age < 0 || $specialage == 'year') { $min_age = 365 + date('L', serendipity_serverOffsetHour()); @@ -179,22 +197,29 @@ class serendipity_plugin_history extends serendipity_plugin true, array('timestamp' => $e[$x]['timestamp']) ); - $date = ($displaydate=='0') ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']); + + $date = (!$displaydate) ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']); $author = ($displayauthor) ? $e[$x]['author'] . ': ' : ''; + echo '
          '; - if ($displayauthor) - { echo '' . $author . ' '; } - if ($displaydate) - { echo '' . $date . ' '; } - $t = ($maxlength==0 || strlen($e[$x]['title'])<=$maxlength) ? - $e[$x]['title'] : - (trim(serendipity_mb('substr', $e[$x]['title'], 0, $maxlength-3)).' [...]'); + + if ($displayauthor) { + echo '' . $author . ' '; + } + if ($displaydate) { + echo '' . $date . ' '; + } + $t = ($maxlength==0 || strlen($e[$x]['title']) <= $maxlength) ? $e[$x]['title'] + : (trim(serendipity_mb('substr', $e[$x]['title'], 0, $maxlength-3)).' [...]'); echo '"' . serendipity_specialchars($t) . '"
          '; - if ($full) - { echo '
          ' . strip_tags($e[$x]['body']) . '
          '; } + if ($full) { + echo '
          ' . strip_tags($e[$x]['body']) . '
          '; + } } echo (empty($outro)) ? '' : '
          ' . $outro . '
          '; } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php b/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php index bf869ef2..af71596f 100644 --- a/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php +++ b/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php @@ -1,6 +1,11 @@ add('description', $desc); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('configuration', array( 'title', 'backend_title', @@ -90,7 +95,7 @@ class serendipity_plugin_html_nugget extends serendipity_plugin { return false; } - if ($this->get_config('markup', 'true') == 'true') { + if (serendipity_db_bool($this->get_config('markup', 'true'))) { $entry = array('html_nugget' => $this->get_config('content')); serendipity_plugin_api::hook_event('frontend_display', $entry); echo $entry['html_nugget']; @@ -98,6 +103,7 @@ class serendipity_plugin_html_nugget extends serendipity_plugin { echo $this->get_config('content'); } } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php b/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php index a4bb9e72..e8b5f021 100644 --- a/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php +++ b/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php @@ -1,6 +1,11 @@ add('description', ADVERTISES_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.3'); $propbag->add('configuration', array( 'image', + 'image2', 'text')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -21,7 +27,14 @@ class serendipity_plugin_plug extends serendipity_plugin { switch($name) { case 'image': $propbag->add('type', 'boolean'); - $propbag->add('name', POWERED_BY_SHOW_IMAGE); + $propbag->add('name', POWERED_BY_SHOW_IMAGE . ' 1'); + $propbag->add('description', POWERED_BY_SHOW_IMAGE_DESC); + $propbag->add('default', 'false'); + break; + + case 'image2': + $propbag->add('type', 'boolean'); + $propbag->add('name', POWERED_BY_SHOW_IMAGE . ' 2'); $propbag->add('description', POWERED_BY_SHOW_IMAGE_DESC); $propbag->add('default', 'false'); break; @@ -32,12 +45,30 @@ class serendipity_plugin_plug extends serendipity_plugin { $propbag->add('description', POWERED_BY_SHOW_TEXT_DESC); $propbag->add('default', 'true'); break; + default: return false; } return true; } + function example() + { + global $serendipity; + + $s = ''; + $s .= "\n"; + $s = '
          '; + $s .= POWERED_BY_SHOW_IMAGE; + $s .= '1: Serendipity PHP Weblog '; + $s .= "
          \n"; + $s .= '
          '; + $s .= POWERED_BY_SHOW_IMAGE; + $s .= '2: Serendipity PHP Weblog'; + $s .= "
          \n"; + return $s; + } + function generate_content(&$title) { global $serendipity; @@ -45,10 +76,13 @@ class serendipity_plugin_plug extends serendipity_plugin { $title = $this->title; ?>
          -get_config('image', 'true') == 'true' ) { ?> +get_config('image', 'false'))) { ?> Serendipity PHP Weblog -get_config('text', 'false') == 'true' ) { ?> +get_config('image2', 'false'))) { ?> + Serendipity PHP Weblog + +get_config('text', 'true'))) { ?> @@ -56,6 +90,7 @@ class serendipity_plugin_plug extends serendipity_plugin {
          \ No newline at end of file diff --git a/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php b/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php index 7a67dfe4..8cfb345d 100644 --- a/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php +++ b/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php @@ -1,6 +1,11 @@ add('description', SEARCH_FOR_ENTRY); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.2'); $propbag->add('configuration', array('fullentry')); $propbag->add('groups', array('FRONTEND_ENTRY_RELATED')); } @@ -23,6 +28,7 @@ class serendipity_plugin_quicksearch extends serendipity_plugin { $propbag->add('description', ''); $propbag->add('default', true); break; + default: return false; } @@ -34,7 +40,7 @@ class serendipity_plugin_quicksearch extends serendipity_plugin { global $serendipity; $title = $this->title; - $fullentry = serendipity_db_bool($this->get_config('fullentry', true)); + $fullentry = serendipity_db_bool($this->get_config('fullentry', 'true')); ?>
          @@ -48,6 +54,7 @@ class serendipity_plugin_quicksearch extends serendipity_plugin { \ No newline at end of file diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php index a0c05a57..fa6d2415 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php @@ -1,7 +1,7 @@ * EN-Revision: 690 */ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php index 6c76981d..97b4a7da 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ * EN-Revision: 688 */ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php index dc105809..5c0fc465 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php index 968ed200..1e94377c 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns # # http://www.jannis.to/programming/serendipity.html # diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php index 342619c7..af599dcd 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ * First public version: lang_tr.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_bg.inc.php b/plugins/serendipity_plugin_recententries/lang_bg.inc.php index df2569ba..798d2f87 100644 --- a/plugins/serendipity_plugin_recententries/lang_bg.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_bg.inc.php @@ -1,7 +1,7 @@ * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_es.inc.php b/plugins/serendipity_plugin_recententries/lang_es.inc.php index 34288da3..2173ada2 100644 --- a/plugins/serendipity_plugin_recententries/lang_es.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_es.inc.php @@ -1,7 +1,7 @@ * EN-Revision: 690 */ diff --git a/plugins/serendipity_plugin_recententries/lang_fa.inc.php b/plugins/serendipity_plugin_recententries/lang_fa.inc.php index ed5ca343..c6d102b6 100644 --- a/plugins/serendipity_plugin_recententries/lang_fa.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_fa.inc.php @@ -1,7 +1,7 @@ * EN-Revision: Revision of lang_fa.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_ja.inc.php b/plugins/serendipity_plugin_recententries/lang_ja.inc.php index 6c76981d..97b4a7da 100644 --- a/plugins/serendipity_plugin_recententries/lang_ja.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_ja.inc.php @@ -1,7 +1,7 @@ * EN-Revision: 688 */ diff --git a/plugins/serendipity_plugin_recententries/lang_pl.inc.php b/plugins/serendipity_plugin_recententries/lang_pl.inc.php index 0bb00966..bdac0986 100644 --- a/plugins/serendipity_plugin_recententries/lang_pl.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_pl.inc.php @@ -1,7 +1,7 @@ * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_tn.inc.php b/plugins/serendipity_plugin_recententries/lang_tn.inc.php index 3babfceb..e1a2b3b8 100644 --- a/plugins/serendipity_plugin_recententries/lang_tn.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns # # http://www.jannis.to/programming/serendipity.html # diff --git a/plugins/serendipity_plugin_recententries/lang_tr.inc.php b/plugins/serendipity_plugin_recententries/lang_tr.inc.php index 85abe649..dac29846 100644 --- a/plugins/serendipity_plugin_recententries/lang_tr.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_tr.inc.php @@ -1,7 +1,7 @@ * First public version: lang_tr.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_zh.inc.php b/plugins/serendipity_plugin_recententries/lang_zh.inc.php index bd05c64a..2bb3ca4d 100644 --- a/plugins/serendipity_plugin_recententries/lang_zh.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_zh.inc.php @@ -10,3 +10,4 @@ @define('PLUGIN_RECENTENTRIES_NUMBER_FROM_RADIO_RECENT', '略过头版文章'); @define('PLUGIN_RECENTENTRIES_RANDOMIZE', 'éšæœºæ˜¾ç¤ºæ–‡ç« '); @define('PLUGIN_RECENTENTRIES_RANDOMIZE_DESC', '如果å¯ç”¨æ­¤è®¾ç½®çš„è¯ï¼Œå°†éšæœºé€‰æ‹©æ–‡ç« å¹¶æ˜¾ç¤ºå‡ºæ¥'); + diff --git a/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php b/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php index 214217b9..eada5e92 100644 --- a/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php +++ b/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php @@ -3,21 +3,27 @@ // Contributed by Christian Machmeier // Randomizing contributed by Christian Brabandt +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); -class serendipity_plugin_recententries extends serendipity_plugin { +class serendipity_plugin_recententries extends serendipity_plugin +{ var $title = PLUGIN_RECENTENTRIES_TITLE; - function introspect(&$propbag) { + function introspect(&$propbag) + { $this->title = $this->get_config('title', $this->title); $propbag->add('name', PLUGIN_RECENTENTRIES_TITLE); $propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Christian Machmeier, Christian Brabandt, Judebert, Don Chambers'); - $propbag->add('version', '2.5'); + $propbag->add('version', '2.6'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -25,63 +31,66 @@ class serendipity_plugin_recententries extends serendipity_plugin { $propbag->add('groups', array('FRONTEND_VIEWS')); } - function introspect_config_item($name, &$propbag) { + function introspect_config_item($name, &$propbag) + { global $serendipity; + switch($name) { + case 'title': - $propbag->add('type', 'string'); - $propbag->add('name', TITLE); - $propbag->add('description', TITLE_FOR_NUGGET); - $propbag->add('default', PLUGIN_RECENTENTRIES_TITLE); + $propbag->add('type', 'string'); + $propbag->add('name', TITLE); + $propbag->add('description', TITLE_FOR_NUGGET); + $propbag->add('default', PLUGIN_RECENTENTRIES_TITLE); break; case 'number': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER); - $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_BLAHBLAH); - $propbag->add('default', 10); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER); + $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_BLAHBLAH); + $propbag->add('default', 10); break; case 'number_from': - $propbag->add('type', 'radio'); - $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER_FROM); - $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_FROM_DESC); - $propbag->add('radio', array( + $propbag->add('type', 'radio'); + $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER_FROM); + $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_FROM_DESC); + $propbag->add('radio', array( 'value' => array('all', 'skip'), 'desc' => array(PLUGIN_RECENTENTRIES_NUMBER_FROM_RADIO_ALL, PLUGIN_RECENTENTRIES_NUMBER_FROM_RADIO_RECENT) )); - $propbag->add('default', 'all'); - break; - + $propbag->add('default', 'all'); + break; + case 'randomize': - $propbag->add('type', 'radio'); - $propbag->add('name', PLUGIN_RECENTENTRIES_RANDOMIZE); - $propbag->add('description', PLUGIN_RECENTENTRIES_RANDOMIZE_DESC); - $propbag->add('radio', array( + $propbag->add('type', 'radio'); + $propbag->add('name', PLUGIN_RECENTENTRIES_RANDOMIZE); + $propbag->add('description', PLUGIN_RECENTENTRIES_RANDOMIZE_DESC); + $propbag->add('radio', array( 'value' => array('yes', 'no'), 'desc' => array(YES, NO) )); - $propbag->add('default', 'no'); - break; + $propbag->add('default', 'no'); + break; case 'dateformat': - $propbag->add('type', 'string'); - $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); - $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e %Y') . '. ' . PLUGIN_RECENTENTRIES_DATEFORMAT_WIN); - $propbag->add('default', '%A, %B %e %Y'); + $propbag->add('type', 'string'); + $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); + $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e %Y') . '. ' . PLUGIN_RECENTENTRIES_DATEFORMAT_WIN); + $propbag->add('default', '%A, %B %e %Y'); break; case 'category': $cats = serendipity_fetchCategories($serendipity['authorid']); if (!is_array($cats)) { - return false; + break; } $catlist = serendipity_generateCategoryList($cats, array(0), 4, 0, 0, '', ' . '); $tmp_select_cats = explode('@@@', $catlist); if (!is_array($tmp_select_cats)) { - return false; + break; } $select_cats = array(); @@ -94,30 +103,31 @@ class serendipity_plugin_recententries extends serendipity_plugin { } } - $propbag->add('type', 'multiselect'); - $propbag->add('select_values', $select_cats); - $propbag->add('select_size', 5); - $propbag->add('name', CATEGORY); - $propbag->add('description', CATEGORIES_TO_FETCH); - $propbag->add('default', 'none'); + $propbag->add('type', 'multiselect'); + $propbag->add('select_values', $select_cats); + $propbag->add('select_size', 5); + $propbag->add('name', CATEGORY); + $propbag->add('description', CATEGORIES_TO_FETCH); + $propbag->add('default', 'none'); break; case 'show_where': $select = array('extended' => PLUGIN_ITEM_DISPLAY_EXTENDED, 'overview' => PLUGIN_ITEM_DISPLAY_OVERVIEW, 'both' => PLUGIN_ITEM_DISPLAY_BOTH); - $propbag->add('type', 'select'); - $propbag->add('select_values', $select); - $propbag->add('name', PLUGIN_ITEM_DISPLAY); - $propbag->add('description', ''); - $propbag->add('default', 'both'); - break; - + $propbag->add('type', 'select'); + $propbag->add('select_values', $select); + $propbag->add('name', PLUGIN_ITEM_DISPLAY); + $propbag->add('description', ''); + $propbag->add('default', 'both'); + break; + default: return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $number = $this->get_config('number'); @@ -147,14 +157,14 @@ class serendipity_plugin_recententries extends serendipity_plugin { $sql_condition['and'] = ''; if ($category != 'none' && !empty($category)) { - + $sql_categories = array(); if (is_numeric($category)) { $sql_categories[] = $category; } else { $sql_categories = explode('^', $category); } - + $category_parts = array(); foreach($sql_categories AS $sql_category) { $category_parts[] = "\n" . implode(' AND ', serendipity_fetchCategoryRange($sql_category)); @@ -215,9 +225,9 @@ class serendipity_plugin_recententries extends serendipity_plugin { WHERE isdraft = 'false' {$sql_condition['and']} $sql_order $sql_number"; - + $entries = serendipity_db_query($entries_query); - + if (is_string($entries)) { echo $entries . "
          \n"; echo $entries_query . "
          \n"; @@ -249,6 +259,8 @@ class serendipity_plugin_recententries extends serendipity_plugin { echo '' . "\n\n"; } } + } /* vim: set sts=4 ts=4 smartindent autoindent : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php index c61f3539..6cc8553c 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ - * EN-Revision: 690 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '¿Mostrar fecha?'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '¿Mostrar la fecha luego del titular?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php index 57e7191e..9b892e4c 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php index ce5e8683..24cc3942 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 692 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '日付ã®è¡¨ç¤º'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'ヘッドラインã®ä¸‹ã«æ—¥ä»˜ã‚’表示ã—ã¾ã™ã‹?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php index c8151a79..1c9429ac 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php @@ -1,25 +1,24 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_REMOTERSS_TITLE', 'ì›ê²© RSS/OPML-블로그롤 피드'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', 'ì›ê²© RSS/OPML í”¼ë“œì˜ ì•„ì´í…œì„ 보여줌 (블로그롤 등)'); - @define('PLUGIN_REMOTERSS_NUMBER', 'ê¸€ì˜ ìˆ˜'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 ê°œì˜ ê¸€ì„ ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: í”¼ë“œì— ìžˆëŠ” 모든 글)'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'í”¼ë“œì˜ ì œëª©'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 ì˜†ì¤„ì— ë‚˜íƒ€ë‚¼ í”¼ë“œì˜ ì œëª©'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML í”¼ë“œì˜ URI'); - @define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 ì„ íƒë˜ì§€ 않ìŒ'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML ë§í¬ 출력 대ìƒ'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'í‘œì‹œëœ RSS ì•„ì´í…œì˜ ë§í¬ë¥¼ 출력할 ëŒ€ìƒ (기본값: _blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 ë‚´ìš©ì€ ìºì‹œì— 저장ë˜ì—ˆë‹¤ê°€ X 초가 지나면 ê°±ì‹ ì´ ë¨ (기본값: 3시간)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'ì›ê²© í”¼ë“œì˜ í˜•íƒœë¥¼ ì„ íƒ'); - @define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'ê° ì œëª© ì•žì— í‘œì‹œë  ê·¸ë¦¼ 지정'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', 'ë‚ ì§œ 표시'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 ë°‘ì— ë‚ ì§œë¥¼ 표시'); +@define('PLUGIN_REMOTERSS_TITLE', 'ì›ê²© RSS/OPML-블로그롤 피드'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', 'ì›ê²© RSS/OPML í”¼ë“œì˜ ì•„ì´í…œì„ 보여줌 (블로그롤 등)'); +@define('PLUGIN_REMOTERSS_NUMBER', 'ê¸€ì˜ ìˆ˜'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 ê°œì˜ ê¸€ì„ ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: í”¼ë“œì— ìžˆëŠ” 모든 글)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'í”¼ë“œì˜ ì œëª©'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 ì˜†ì¤„ì— ë‚˜íƒ€ë‚¼ í”¼ë“œì˜ ì œëª©'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML í”¼ë“œì˜ URI'); +@define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 ì„ íƒë˜ì§€ 않ìŒ'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML ë§í¬ 출력 대ìƒ'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'í‘œì‹œëœ RSS ì•„ì´í…œì˜ ë§í¬ë¥¼ 출력할 ëŒ€ìƒ (기본값: _blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 ë‚´ìš©ì€ ìºì‹œì— 저장ë˜ì—ˆë‹¤ê°€ X 초가 지나면 ê°±ì‹ ì´ ë¨ (기본값: 3시간)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'ì›ê²© í”¼ë“œì˜ í˜•íƒœë¥¼ ì„ íƒ'); +@define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'ê° ì œëª© ì•žì— í‘œì‹œë  ê·¸ë¦¼ 지정'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'ë‚ ì§œ 표시'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 ë°‘ì— ë‚ ì§œë¥¼ 표시'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php index 1b09ce32..2648256a 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -33,4 +33,3 @@ @define('PLUGIN_REMOTERSS_RSSESCAPE', 'Wyłącz formatowanie HTML'); @define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'JeÅ›li ta opcja zostanie włączona, kod HTML w feedzie zostanie usuniÄ™ty. JeÅ›li ta opcja zostanie wyłączona, kod HTML w feedach bÄ™dzie interpretowany. To może być potencjalne źródÅ‚o problemów z bezpieczeÅ„stwem bloga jeÅ›li feed nie pochodzi od Ciebie!'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php index 155bceae..e75a8f88 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php index e0ee3a2e..c21651e6 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,23 +12,23 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_REMOTERSS_TITLE', 'é ç«¯ RSS/OPML-Blogroll Feed'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示é ç«¯çš„ RSS/OPML feed (例如 Blogroll)'); - @define('PLUGIN_REMOTERSS_NUMBER', '文章數é‡'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘篇文章?(é è¨­ï¼šå…¨éƒ¨æ–‡ç« )'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'å´åˆ—顯示的 feed 標題'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML ç¶²å€'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網å€'); - @define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連çµç›®æ¨™'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (é è¨­ï¼š_blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', 'æ›´æ–° feed 的時間?'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快å–資料內,時間éŽå¾Œæœƒè‡ªå‹•æ›´æ–° (é è¨­ï¼š3 å°æ™‚)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示é ç«¯ feed 的形å¼'); - @define('PLUGIN_REMOTERSS_BULLETIMG', 'å­å½ˆåž‹åœ–示'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'æ¯å€‹æ¨™é¡Œæ—的圖示'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); -?> \ No newline at end of file +@define('PLUGIN_REMOTERSS_TITLE', 'é ç«¯ RSS/OPML-Blogroll Feed'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示é ç«¯çš„ RSS/OPML feed (例如 Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', '文章數é‡'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘篇文章?(é è¨­ï¼šå…¨éƒ¨æ–‡ç« )'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'å´åˆ—顯示的 feed 標題'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML ç¶²å€'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網å€'); +@define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連çµç›®æ¨™'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (é è¨­ï¼š_blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', 'æ›´æ–° feed 的時間?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快å–資料內,時間éŽå¾Œæœƒè‡ªå‹•æ›´æ–° (é è¨­ï¼š3 å°æ™‚)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示é ç«¯ feed 的形å¼'); +@define('PLUGIN_REMOTERSS_BULLETIMG', 'å­å½ˆåž‹åœ–示'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'æ¯å€‹æ¨™é¡Œæ—的圖示'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); + diff --git a/plugins/serendipity_plugin_remoterss/lang_cs.inc.php b/plugins/serendipity_plugin_remoterss/lang_cs.inc.php index 4886a9fb..27ef52f7 100644 --- a/plugins/serendipity_plugin_remoterss/lang_cs.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_cs.inc.php @@ -1,4 +1,4 @@ - * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_remoterss/lang_es.inc.php b/plugins/serendipity_plugin_remoterss/lang_es.inc.php index 08ac3f3a..2af9dc3c 100644 --- a/plugins/serendipity_plugin_remoterss/lang_es.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_es.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 690 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '¿Mostrar fecha?'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '¿Mostrar la fecha luego del titular?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_fr.inc.php b/plugins/serendipity_plugin_remoterss/lang_fr.inc.php index e84f7db1..f30e6a90 100644 --- a/plugins/serendipity_plugin_remoterss/lang_fr.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/lang_ja.inc.php b/plugins/serendipity_plugin_remoterss/lang_ja.inc.php index ce5e8683..24cc3942 100644 --- a/plugins/serendipity_plugin_remoterss/lang_ja.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_ja.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: 692 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '日付ã®è¡¨ç¤º'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'ヘッドラインã®ä¸‹ã«æ—¥ä»˜ã‚’表示ã—ã¾ã™ã‹?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_ko.inc.php b/plugins/serendipity_plugin_remoterss/lang_ko.inc.php index c8151a79..1c9429ac 100644 --- a/plugins/serendipity_plugin_remoterss/lang_ko.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_ko.inc.php @@ -1,25 +1,24 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_REMOTERSS_TITLE', 'ì›ê²© RSS/OPML-블로그롤 피드'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', 'ì›ê²© RSS/OPML í”¼ë“œì˜ ì•„ì´í…œì„ 보여줌 (블로그롤 등)'); - @define('PLUGIN_REMOTERSS_NUMBER', 'ê¸€ì˜ ìˆ˜'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 ê°œì˜ ê¸€ì„ ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: í”¼ë“œì— ìžˆëŠ” 모든 글)'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'í”¼ë“œì˜ ì œëª©'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 ì˜†ì¤„ì— ë‚˜íƒ€ë‚¼ í”¼ë“œì˜ ì œëª©'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML í”¼ë“œì˜ URI'); - @define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 ì„ íƒë˜ì§€ 않ìŒ'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML ë§í¬ 출력 대ìƒ'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'í‘œì‹œëœ RSS ì•„ì´í…œì˜ ë§í¬ë¥¼ 출력할 ëŒ€ìƒ (기본값: _blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 ë‚´ìš©ì€ ìºì‹œì— 저장ë˜ì—ˆë‹¤ê°€ X 초가 지나면 ê°±ì‹ ì´ ë¨ (기본값: 3시간)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'ì›ê²© í”¼ë“œì˜ í˜•íƒœë¥¼ ì„ íƒ'); - @define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'ê° ì œëª© ì•žì— í‘œì‹œë  ê·¸ë¦¼ 지정'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', 'ë‚ ì§œ 표시'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 ë°‘ì— ë‚ ì§œë¥¼ 표시'); +@define('PLUGIN_REMOTERSS_TITLE', 'ì›ê²© RSS/OPML-블로그롤 피드'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', 'ì›ê²© RSS/OPML í”¼ë“œì˜ ì•„ì´í…œì„ 보여줌 (블로그롤 등)'); +@define('PLUGIN_REMOTERSS_NUMBER', 'ê¸€ì˜ ìˆ˜'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 ê°œì˜ ê¸€ì„ ë³´ì—¬ì£¼ê² ìŠµë‹ˆê¹Œ? (기본값: í”¼ë“œì— ìžˆëŠ” 모든 글)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'í”¼ë“œì˜ ì œëª©'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 ì˜†ì¤„ì— ë‚˜íƒ€ë‚¼ í”¼ë“œì˜ ì œëª©'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML í”¼ë“œì˜ URI'); +@define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 ì„ íƒë˜ì§€ 않ìŒ'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML ë§í¬ 출력 대ìƒ'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'í‘œì‹œëœ RSS ì•„ì´í…œì˜ ë§í¬ë¥¼ 출력할 ëŒ€ìƒ (기본값: _blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 ë‚´ìš©ì€ ìºì‹œì— 저장ë˜ì—ˆë‹¤ê°€ X 초가 지나면 ê°±ì‹ ì´ ë¨ (기본값: 3시간)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'ì›ê²© í”¼ë“œì˜ í˜•íƒœë¥¼ ì„ íƒ'); +@define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'ê° ì œëª© ì•žì— í‘œì‹œë  ê·¸ë¦¼ 지정'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'ë‚ ì§œ 표시'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 ë°‘ì— ë‚ ì§œë¥¼ 표시'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_pl.inc.php b/plugins/serendipity_plugin_remoterss/lang_pl.inc.php index f5903e82..3b321611 100644 --- a/plugins/serendipity_plugin_remoterss/lang_pl.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -33,4 +33,3 @@ @define('PLUGIN_REMOTERSS_RSSESCAPE', 'Wy³±cz formatowanie HTML'); @define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Je¶li ta opcja zostanie w³±czona, kod HTML w feedzie zostanie usuniêty. Je¶li ta opcja zostanie wy³±czona, kod HTML w feedach bêdzie interpretowany. To mo¿e byæ potencjalne ¼ród³o problemów z bezpieczeñstwem bloga je¶li feed nie pochodzi od Ciebie!'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php b/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php index 176b88b1..1cb19f2c 100644 --- a/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/lang_tn.inc.php b/plugins/serendipity_plugin_remoterss/lang_tn.inc.php index e0ee3a2e..c21651e6 100644 --- a/plugins/serendipity_plugin_remoterss/lang_tn.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,23 +12,23 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_REMOTERSS_TITLE', 'é ç«¯ RSS/OPML-Blogroll Feed'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示é ç«¯çš„ RSS/OPML feed (例如 Blogroll)'); - @define('PLUGIN_REMOTERSS_NUMBER', '文章數é‡'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘篇文章?(é è¨­ï¼šå…¨éƒ¨æ–‡ç« )'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'å´åˆ—顯示的 feed 標題'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML ç¶²å€'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網å€'); - @define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連çµç›®æ¨™'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (é è¨­ï¼š_blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', 'æ›´æ–° feed 的時間?'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快å–資料內,時間éŽå¾Œæœƒè‡ªå‹•æ›´æ–° (é è¨­ï¼š3 å°æ™‚)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示é ç«¯ feed 的形å¼'); - @define('PLUGIN_REMOTERSS_BULLETIMG', 'å­å½ˆåž‹åœ–示'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'æ¯å€‹æ¨™é¡Œæ—的圖示'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); -?> \ No newline at end of file +@define('PLUGIN_REMOTERSS_TITLE', 'é ç«¯ RSS/OPML-Blogroll Feed'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示é ç«¯çš„ RSS/OPML feed (例如 Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', '文章數é‡'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'è¦é¡¯ç¤ºå¤šå°‘篇文章?(é è¨­ï¼šå…¨éƒ¨æ–‡ç« )'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'å´åˆ—顯示的 feed 標題'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML ç¶²å€'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網å€'); +@define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連çµç›®æ¨™'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (é è¨­ï¼š_blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', 'æ›´æ–° feed 的時間?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快å–資料內,時間éŽå¾Œæœƒè‡ªå‹•æ›´æ–° (é è¨­ï¼š3 å°æ™‚)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示é ç«¯ feed 的形å¼'); +@define('PLUGIN_REMOTERSS_BULLETIMG', 'å­å½ˆåž‹åœ–示'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'æ¯å€‹æ¨™é¡Œæ—的圖示'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); + diff --git a/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl b/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl index de615fa0..c2e20140 100644 --- a/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl +++ b/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl @@ -1,11 +1,12 @@ {foreach from=$remoterss_items.items item="item"} +
          {if $remoterss_items.use_rss_link} - + {/foreach} diff --git a/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl b/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl index 839a8d5f..994ed57b 100644 --- a/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl +++ b/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl @@ -1,7 +1,9 @@ {foreach from=$remoterss_items.items item="item"} +
          {$item.title}
          {$item.description}
          + {/foreach} diff --git a/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php b/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php index d9c16c62..35cff8a5 100644 --- a/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php +++ b/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php @@ -1,12 +1,18 @@ - // OPML Contributed by Richard Thomas Harrison +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); -class s9y_remoterss_XMLTree { - function GetChildren($vals, &$i) { +class s9y_remoterss_XMLTree +{ + function GetChildren($vals, &$i) + { $children = array(); $cnt = sizeof($vals); while (++$i < $cnt) { @@ -39,16 +45,26 @@ class s9y_remoterss_XMLTree { } } - function GetXMLTree($file) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + function GetXMLTree($file) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($file); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($file, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Status code not 200, xml file not fetched'); + } + $data = $response->getBody(); + + } catch (HTTP_Request2_Exception $e) { $data = file_get_contents($file); - } else { - // Fetch file - $data = $req->getResponseBody(); } serendipity_request_end(); @@ -93,25 +109,29 @@ class s9y_remoterss_XMLTree { define('OPMLDEBUG', '0'); -class s9y_remoterss_OPML { +class s9y_remoterss_OPML +{ var $cacheOPMLHead; var $cacheOPMLBody; var $cacheOPMLOutline; - function s9y_remoterss_OPML() { + function __construct() + { $this->cacheOPMLHead = array(); $this->cacheOPMLBody = array(); $this->cacheOPMLOutline = array(); } - function parseOPML($file) { + function parseOPML($file) + { $xmltree = new s9y_remoterss_XMLTree(); $opmltree = $xmltree->GetXMLTree($file); return $opmltree[0]; } - function findOPMLTag($arr, $tag) { + function findOPMLTag($arr, $tag) + { $i = 0; $tagindex = false; $children = $arr['children']; @@ -130,7 +150,8 @@ class s9y_remoterss_OPML { return $tagindex !== false ? $tagindex : false; } - function getOPMLTag($tree, $tag) { + function getOPMLTag($tree, $tag) + { $tagindex = $this->findOPMLTag($tree, $tag); if (OPMLDEBUG == 1) { @@ -142,7 +163,8 @@ class s9y_remoterss_OPML { return $tagindex !== false ? $tree['children'][$tagindex] : false; } - function getOPMLHead($tree) { + function getOPMLHead($tree) + { $head = array(); if (isset($this->cacheOPMLHead) && count($this->cacheOPMLHead) != 0) { @@ -172,7 +194,8 @@ class s9y_remoterss_OPML { return $head['tag'] == 'head' ? $head : false; } - function getOPMLBody($tree) { + function getOPMLBody($tree) + { $body = array(); if (isset($this->cacheOPMLBody) && count($this->cacheOPMLBody) != 0) { @@ -202,7 +225,8 @@ class s9y_remoterss_OPML { return $body['tag'] == 'body' ? $body : false; } - function getOPMLOutline($tree, $index) { + function getOPMLOutline($tree, $index) + { if (isset($this->cacheOPMLOutline[$index])) { return $this->cacheOPMLOutline[$index]; @@ -232,7 +256,8 @@ class s9y_remoterss_OPML { } } - function getOPMLOutlineAttr($tree, $index) { + function getOPMLOutlineAttr($tree, $index) + { $outline = $this->getOPMLOutline($tree, $index); return $outline != false ? $outline['attributes'] : false; @@ -240,63 +265,66 @@ class s9y_remoterss_OPML { } -class serendipity_plugin_remoterss extends serendipity_plugin { +class serendipity_plugin_remoterss extends serendipity_plugin +{ var $title = PLUGIN_REMOTERSS_TITLE; var $encoding = null; - function introspect(&$propbag) { + function introspect(&$propbag) + { $this->title = $this->get_config('sidebartitle', $this->title); $propbag->add('name', PLUGIN_REMOTERSS_TITLE); $propbag->add('description', PLUGIN_REMOTERSS_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Udo Gerhards, Richard Thomas Harrison'); - $propbag->add('version', '1.20'); + $propbag->add('version', '1.22.1'); $propbag->add('requirements', array( - 'serendipity' => '0.8', - 'smarty' => '2.6.7', - 'php' => '4.1.0' + 'serendipity' => '1.7', + 'smarty' => '3.1.0', + 'php' => '5.2.0' )); $propbag->add('configuration', array('sidebartitle', 'feedtype', 'template', 'rssuri', 'show_rss_element', 'smarty', 'number', 'use_rss_link', 'escape_rss', 'displaydate', 'dateformat', 'charset', 'target', 'cachetime', 'bulletimg', 'markup')); $propbag->add('groups', array('FRONTEND_EXTERNAL_SERVICES')); } - function introspect_config_item($name, &$propbag) { + function introspect_config_item($name, &$propbag) + { switch($name) { case 'use_rss_link': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSLINK); - $propbag->add('description', PLUGIN_REMOTERSS_RSSLINK_DESC); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSLINK); + $propbag->add('description', PLUGIN_REMOTERSS_RSSLINK_DESC); + $propbag->add('default', 'true'); break; case 'escape_rss': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSESCAPE); - $propbag->add('description', PLUGIN_REMOTERSS_RSSESCAPE_DESC); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSESCAPE); + $propbag->add('description', PLUGIN_REMOTERSS_RSSESCAPE_DESC); + $propbag->add('default', 'true'); break; case 'show_rss_element': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSFIELD); - $propbag->add('description', PLUGIN_REMOTERSS_RSSFIELD_DESC); - $propbag->add('default', 'title'); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSFIELD); + $propbag->add('description', PLUGIN_REMOTERSS_RSSFIELD_DESC); + $propbag->add('default', 'title'); break; case 'markup': - $propbag->add('type', 'boolean'); - $propbag->add('name', DO_MARKUP); - $propbag->add('description', DO_MARKUP_DESCRIPTION); - $propbag->add('default', 'false'); + $propbag->add('type', 'boolean'); + $propbag->add('name', DO_MARKUP); + $propbag->add('description', DO_MARKUP_DESCRIPTION); + $propbag->add('default', 'false'); break; case 'charset': - $propbag->add('type', 'radio'); - $propbag->add('name', CHARSET); - $propbag->add('description', CHARSET); - $propbag->add('default', 'native'); + $propbag->add('type', 'radio'); + $propbag->add('name', CHARSET); + $propbag->add('description', CHARSET); + $propbag->add('default', 'native'); $charsets = array(); if (LANG_CHARSET != 'UTF-8') { @@ -308,84 +336,84 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $charsets['value'][] = 'native'; $charsets['desc'][] = LANG_CHARSET; - $propbag->add('radio', $charsets); + $propbag->add('radio', $charsets); break; case 'feedtype': $select = array('rss' => 'RSS', 'opml' => 'OPML', 'atom' => 'ATOM'); - $propbag->add('type', 'select'); - $propbag->add('name', PLUGIN_REMOTERSS_FEEDTYPE); - $propbag->add('description', PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH); - $propbag->add('select_values', $select); - $propbag->add('default', 'rss'); + $propbag->add('type', 'select'); + $propbag->add('name', PLUGIN_REMOTERSS_FEEDTYPE); + $propbag->add('description', PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH); + $propbag->add('select_values', $select); + $propbag->add('default', 'rss'); break; case 'number': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_NUMBER); - $propbag->add('description', PLUGIN_REMOTERSS_NUMBER_BLAHBLAH); - $propbag->add('default', '0'); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_NUMBER); + $propbag->add('description', PLUGIN_REMOTERSS_NUMBER_BLAHBLAH); + $propbag->add('default', '0'); break; case 'dateformat': - $propbag->add('type', 'string'); - $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); - $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e. %Y')); - $propbag->add('default', '%A, %B %e. %Y'); + $propbag->add('type', 'string'); + $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); + $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e. %Y')); + $propbag->add('default', '%A, %B %e. %Y'); break; case 'sidebartitle': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_SIDEBARTITLE); - $propbag->add('description', PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_SIDEBARTITLE); + $propbag->add('description', PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH); + $propbag->add('default', ''); break; case 'rssuri': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSURI); - $propbag->add('description', PLUGIN_REMOTERSS_RSSURI_BLAHBLAH); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSURI); + $propbag->add('description', PLUGIN_REMOTERSS_RSSURI_BLAHBLAH); + $propbag->add('default', ''); break; case 'target': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSTARGET); - $propbag->add('description', PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH); - $propbag->add('default', '_blank'); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSTARGET); + $propbag->add('description', PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH); + $propbag->add('default', '_blank'); break; case 'cachetime': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_CACHETIME); - $propbag->add('description', PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH); - $propbag->add('default', 10800); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_CACHETIME); + $propbag->add('description', PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH); + $propbag->add('default', 10800); break; case 'bulletimg': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_BULLETIMG); - $propbag->add('description', PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_BULLETIMG); + $propbag->add('description', PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH); + $propbag->add('default', ''); break; case 'smarty': - $propbag->add('type', 'boolean'); - $propbag->add('name', CATEGORY_PLUGIN_TEMPLATE); - $propbag->add('description', CATEGORY_PLUGIN_TEMPLATE_DESC); - $propbag->add('default', false); + $propbag->add('type', 'boolean'); + $propbag->add('name', CATEGORY_PLUGIN_TEMPLATE); + $propbag->add('description', CATEGORY_PLUGIN_TEMPLATE_DESC); + $propbag->add('default', 'false'); break; case 'displaydate': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_REMOTERSS_DISPLAYDATE); - $propbag->add('description', PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_REMOTERSS_DISPLAYDATE); + $propbag->add('description', PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH); + $propbag->add('default', 'true'); break; case 'template': $select = array('plugin_remoterss.tpl' => 'Default (plugin_remoterss.tpl)', 'plugin_remoterss_nasaiotd.tpl' => 'NASA Image of the day'); - + $add_files = glob(dirname(__FILE__) . '/*.tpl'); foreach($add_files AS $add_file) { $bn = basename($add_file); @@ -407,7 +435,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } // Check if a given URI is readable. - function urlcheck($uri) { + function urlcheck($uri) + { // These two substring comparisons are faster than one regexp. if ('http://' != substr($uri, 0, 7) && 'https://' != substr($uri, 0, 8)) { @@ -416,20 +445,10 @@ class serendipity_plugin_remoterss extends serendipity_plugin { // Disabled by now. May get enabled in the future, but for now the extra HTTP call isn't worth trying. return true; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - serendipity_request_start(); - $req = new HTTP_Request($uri); - - if (PEAR::isError($req->sendRequest()) || !preg_match('@^[23]..@', $req->getResponseCode())) { - serendipity_request_end(); - return false; - } else { - serendipity_request_end(); - return true; - } } - function debug($msg) { + function debug($msg) + { static $debug = false; if ($debug === false) { @@ -442,18 +461,19 @@ class serendipity_plugin_remoterss extends serendipity_plugin { fclose($fp); } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $number = $this->get_config('number'); - $displaydate = $this->get_config('displaydate','true'); + $displaydate = serendipity_db_bool($this->get_config('displaydate', 'true')); $dateformat = $this->get_config('dateformat'); $sidebartitle = $title = $this->get_config('sidebartitle', $this->title); $rssuri = $this->get_config('rssuri'); $target = $this->get_config('target'); $cachetime = $this->get_config('cachetime'); $feedtype = $this->get_config('feedtype', 'rss'); - $markup = $this->get_config('markup', 'false'); + $markup = serendipity_db_bool($this->get_config('markup', 'false')); $bulletimg = $this->get_config('bulletimg'); $charset = $this->get_config('charset', 'native'); @@ -470,8 +490,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { if (!$cachetime || !is_numeric($cachetime)) { $cachetime = 10800; // 3 hours in seconds } - - $smarty = serendipity_db_bool($this->get_config('smarty')); + + $smarty = serendipity_db_bool($this->get_config('smarty', 'false')); if ($this->get_config('template') != 'plugin_remoterss.tpl') { $smarty = true; } @@ -493,9 +513,9 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $c->parse($rssuri); $this->encoding = $c->rss['encoding']; - $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link')); + $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link', 'true')); $rss_elements = explode(',', $this->get_config('show_rss_element')); - $escape_rss = serendipity_db_bool($this->get_config('escape_rss')); + $escape_rss = serendipity_db_bool($this->get_config('escape_rss', 'true')); $i = 0; $content = ''; $smarty_items = array(); @@ -517,7 +537,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $is_first = true; foreach($rss_elements AS $rss_element) { $rss_element = trim($rss_element); - + if (!$is_first) { $content .= ''; } @@ -527,11 +547,11 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } else { $content .= serendipity_specialchars($this->decode($item[$rss_element])); } - + if ($smarty) { $item['display_elements'][preg_replace('@[^a-z0-9]@imsU', '', $rss_element)] = $this->decode($item[$rss_element]); } - + if (!$is_first) { $content .= ''; } @@ -549,13 +569,13 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $content .= "
          \n"; $item['timestamp'] = @strtotime(isset($item['pubdate']) ? $item['pubdate'] : $item['dc:date']); - if (!($item['timestamp'] == -1) AND ($displaydate == 'true')) { + if (!($item['timestamp'] == -1) AND $displaydate) { $content .= '
          ' . serendipity_specialchars(serendipity_formatTime($dateformat, $item['timestamp'], false)) . '
          '; } - + if ($smarty) { $smarty_items['items'][$i] = $item; $smarty_items['items'][$i]['css_class'] = preg_replace('@[^a-z0-9]@imsU', '', $rss_element); @@ -575,12 +595,12 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $smarty_items['dateformat'] = $dateformat; $smarty_items['target'] = $target; - $serendipity['smarty']->assign_by_ref('remoterss_items', $smarty_items); + $serendipity['smarty']->assignByRef('remoterss_items', $smarty_items); $tpl = $this->get_config('template'); if (empty($tpl)) { $tpl = 'plugin_remoterss.tpl'; } - + // Template specifics go here switch($tpl) { case 'plugin_remoterss_nasaiotd.tpl': @@ -623,9 +643,9 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $simplefeed->handle_content_type(); $this->encoding = $charset; - $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link')); + $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link', 'true')); $rss_elements = explode(',', $this->get_config('show_rss_element')); - $escape_rss = serendipity_db_bool($this->get_config('escape_rss')); + $escape_rss = serendipity_db_bool($this->get_config('escape_rss', 'true')); $i = 0; $content = ''; $smarty_items = array(); @@ -660,7 +680,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $is_first = true; foreach($rss_elements AS $rss_element) { $rss_element = trim($rss_element); - + if (!$is_first) { $content .= ''; } @@ -670,11 +690,11 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } else { $content .= serendipity_specialchars($this->decode($item[$rss_element])); } - + if ($smarty) { $item['display_elements'][preg_replace('@[^a-z0-9]@imsU', '', $rss_element)] = $this->decode($item[$rss_element]); } - + if (!$is_first) { $content .= ''; } @@ -698,7 +718,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { . '
          '; } - + if ($smarty) { $smarty_items['items'][$i] = $item; $smarty_items['items'][$i]['css_class'] = preg_replace('@[^a-z0-9]@imsU', '', $rss_element); @@ -709,7 +729,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $content .= '
          '; // end of rss_item ++$i; } - + if ($smarty) { $smarty_items['use_rss_link'] = $use_rss_link; $smarty_items['bulletimg'] = $bulletimg; @@ -718,12 +738,12 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $smarty_items['dateformat'] = $dateformat; $smarty_items['target'] = $target; - $serendipity['smarty']->assign_by_ref('remoterss_items', $smarty_items); + $serendipity['smarty']->assignByRef('remoterss_items', $smarty_items); $tpl = $this->get_config('template'); if (empty($tpl)) { $tpl = 'plugin_remoterss.tpl'; } - + // Template specifics go here switch($tpl) { case 'plugin_remoterss_nasaiotd.tpl': @@ -805,7 +825,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } /* Pretend to be a html_nugget so we can apply markup events. */ - if ($markup == 'true') { + if ($markup) { $entry = array('html_nugget' => $content); serendipity_plugin_api::hook_event('frontend_display', $entry); $content = $entry['html_nugget']; @@ -838,7 +858,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } } - function &decode($string) { + function &decode($string) + { $target = $this->get_config('charset', 'native'); // xml_parser_* functions to recoding from ISO-8859-1/UTF-8 @@ -867,6 +888,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { return $out; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php b/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php index f20118c8..3d748bc8 100644 --- a/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php +++ b/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php @@ -1,6 +1,11 @@ add('description', ALLOWS_YOU_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('configuration', array('https')); $propbag->add('groups', array('FRONTEND_FEATURES')); } - function generate_content(&$title) - { - global $serendipity; - - $title = $this->title; - if ($this->get_config('https', 'false') == 'true') { - $base = str_replace('http://', 'https://', $serendipity['baseURL']); - } else { - $base = $serendipity['serendipityHTTPPath']; - } - - $link = $base . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] .'?/' : '') . PATH_ADMIN; - $text = (($_SESSION['serendipityAuthedUser'] === true) ? SUPERUSER_OPEN_ADMIN : SUPERUSER_OPEN_LOGIN); - echo ''. $text .''; - } - function introspect_config_item($name, &$propbag) { switch($name) { @@ -45,6 +34,23 @@ class serendipity_plugin_superuser extends serendipity_plugin { } return true; } + + function generate_content(&$title) + { + global $serendipity; + + $title = $this->title; + if (serendipity_db_bool($this->get_config('https', 'false'))) { + $base = str_replace('http://', 'https://', $serendipity['baseURL']); + } else { + $base = $serendipity['serendipityHTTPPath']; + } + + $link = $base . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] .'?/' : '') . PATH_ADMIN; + $text = (($_SESSION['serendipityAuthedUser'] === true) ? SUPERUSER_OPEN_ADMIN : SUPERUSER_OPEN_LOGIN); + echo ''. $text .''; + } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php b/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php index cee904d6..a60e9786 100644 --- a/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php +++ b/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php @@ -1,5 +1,9 @@ add('description', SHOWS_RSS_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.2.2'); + $propbag->add('version', '2.2.3'); $propbag->add('configuration', array( 'title', 'big_img', 'feed_format', 'subToMe', 'show_comment_feed', - 'seperator', + 'separator', 'iconURL', 'feed_name', 'comment_name', - 'seperator2', + 'separator2', 'fb_id', 'custom_url' ) @@ -66,9 +70,9 @@ class serendipity_plugin_syndication extends serendipity_plugin { $propbag->add('default', 'false'); break; - case 'seperator': - case 'seperator2': - $propbag->add('type', 'seperator'); + case 'separator': + case 'separator2': + $propbag->add('type', 'separator'); break; case 'iconURL': @@ -113,7 +117,6 @@ class serendipity_plugin_syndication extends serendipity_plugin { $propbag->add('default', ''); break; - default: return false; } @@ -200,15 +203,24 @@ class serendipity_plugin_syndication extends serendipity_plugin { } if (serendipity_db_bool($this->get_config('show_2.0c', false)) || serendipity_db_bool($this->get_config('show_comment_feed', false))) { - echo $this->generateFeedButton(($useAtom && ! $useRss ? serendipity_rewriteURL(PATH_FEEDS .'/comments.atom') : serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')), - $COMMENTS, - ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')) : ""), - $small_icon); + if ($useRss) { + echo $this->generateFeedButton( serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2'), + $COMMENTS . ($useAtom ? " (RSS)": ""), + ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')) : ""), + $small_icon); + } + if ($useAtom) { + echo $this->generateFeedButton( serendipity_rewriteURL(PATH_FEEDS .'/comments.atom10'), + $COMMENTS . ($useRss ? " (Atom)": ""), + ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.atom10')) : ""), + $small_icon); + } } echo "\n"; } - function generateFeedButton($feed, $label, $onclick, $icon, $small = false) { + function generateFeedButton($feed, $label, $onclick, $icon, $small = false) + { $link = 'href="'.$feed.'" '. $onclick; $output = '
        • '; $class = ""; @@ -227,7 +239,8 @@ class serendipity_plugin_syndication extends serendipity_plugin { return $output .= "
        • \n"; } - function getOnclick($url) { + function getOnclick($url) + { return "onclick=\"document.subtomeBtn=this;document.subtomeBtn.dataset['subtomeFeeds']='". urlencode($url). "';var s=document.createElement('script');s.src='https://www.subtome.com/load.js';document.body.appendChild(s);return false;\""; } diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php index 9e70178f..12a7dbc4 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php @@ -1,11 +1,12 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovací tlaÄítko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovací tlaÄítko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php index 017093d7..8239c506 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovací tlaÄítko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovací tlaÄítko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php index 59ada22c..7abfc953 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php @@ -1,6 +1,7 @@ - * EN-Revision: 690 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '¿Botón de enviar?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '¿Mostrar un botón de envío?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '¿Botón de enviar?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '¿Mostrar un botón de envío?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php index cca113e8..f7e872d3 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php index 3628714a..e014c3db 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php @@ -1,15 +1,13 @@ - * EN-Revision: 692 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更ã®ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¾ã™ã€‚'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã¯?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã‚’ã—ã¾ã™ã‹?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更ã®ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¾ã™ã€‚'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã¯?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã‚’ã—ã¾ã™ã‹?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php index 4b6580d7..c640ed6b 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php @@ -1,10 +1,9 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 ì„ íƒ'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있는 ëª©ë¡ ìƒìžë¥¼ 보여줌'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit ë²„íŠ¼ì„ í‘œì‹œí•©ë‹ˆê¹Œ?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 ì„ íƒ'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있는 ëª©ë¡ ìƒìžë¥¼ 보여줌'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit ë²„íŠ¼ì„ í‘œì‹œí•©ë‹ˆê¹Œ?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php index 84ce80f8..d56ee6fb 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Przycisk potwierdzenia (submit)?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Czy przycisk potwoerdzenia ma być pokazywany?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php index c6ce9a25..86477a45 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php index ce15d412..b997947c 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,8 +12,8 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'ä½ˆæ™¯é¸æ“‡'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'é¡¯ç¤ºæ”¹è®Šä½ˆæ™¯çš„é¸æ“‡'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€å‡ºæŒ‰éˆ•?'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'è¦é¡¯ç¤ºé€å‡ºæŒ‰éˆ•嗎?'); -?> \ No newline at end of file +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'ä½ˆæ™¯é¸æ“‡'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'é¡¯ç¤ºæ”¹è®Šä½ˆæ™¯çš„é¸æ“‡'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€å‡ºæŒ‰éˆ•?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'è¦é¡¯ç¤ºé€å‡ºæŒ‰éˆ•嗎?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php index a18f5955..5c758ce0 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '显示一个选择主题的下拉框'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'æäº¤æŒ‰é’®'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'æ˜¯å¦æ˜¾ç¤ºä¸€ä¸ªæäº¤æŒ‰é’®ï¼ˆç”¨äºŽåˆ‡æ¢æ‰€é€‰æ‹©çš„主题)?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php index 67eb76a2..5e2b1d78 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php @@ -1,11 +1,12 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovací tlaèítko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovací tlaèítko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php index c9fbbe79..d48ba76f 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovací tlaèítko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovací tlaèítko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php index 4e2c073b..14c0b591 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php @@ -1,6 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit button?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Show a submit button?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php index 6fe74027..1dbc1f27 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php @@ -1,14 +1,13 @@ - * EN-Revision: 690 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '¿Botón de enviar?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '¿Mostrar un botón de envío?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '¿Botón de enviar?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '¿Mostrar un botón de envío?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php index 0a538628..8f9a9fd1 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php index 3628714a..e014c3db 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php @@ -1,15 +1,13 @@ - * EN-Revision: 692 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更ã®ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¾ã™ã€‚'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã¯?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã‚’ã—ã¾ã™ã‹?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更ã®ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¾ã™ã€‚'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã¯?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'é€ä¿¡ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºã‚’ã—ã¾ã™ã‹?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php index 4b6580d7..c640ed6b 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php @@ -1,10 +1,9 @@ - # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 ì„ íƒ'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있는 ëª©ë¡ ìƒìžë¥¼ 보여줌'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit ë²„íŠ¼ì„ í‘œì‹œí•©ë‹ˆê¹Œ?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 ì„ íƒ'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'í…œí”Œë¦¿ì„ ë°”ê¿€ 수 있는 ëª©ë¡ ìƒìžë¥¼ 보여줌'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit ë²„íŠ¼ì„ í‘œì‹œí•©ë‹ˆê¹Œ?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php index f1a0f6f9..039cee9d 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php @@ -1,7 +1,7 @@ - * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Przycisk potwierdzenia (submit)?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Czy przycisk potwoerdzenia ma byæ pokazywany?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php index 2bf634df..00c3e505 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php index ce15d412..b997947c 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php @@ -1,8 +1,8 @@ - # # http://www.jannis.to/programming/serendipity.html # @@ -12,8 +12,8 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'ä½ˆæ™¯é¸æ“‡'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'é¡¯ç¤ºæ”¹è®Šä½ˆæ™¯çš„é¸æ“‡'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€å‡ºæŒ‰éˆ•?'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'è¦é¡¯ç¤ºé€å‡ºæŒ‰éˆ•嗎?'); -?> \ No newline at end of file +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'ä½ˆæ™¯é¸æ“‡'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'é¡¯ç¤ºæ”¹è®Šä½ˆæ™¯çš„é¸æ“‡'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'é€å‡ºæŒ‰éˆ•?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'è¦é¡¯ç¤ºé€å‡ºæŒ‰éˆ•嗎?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php index a18f5955..5c758ce0 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '显示一个选择主题的下拉框'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'æäº¤æŒ‰é’®'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'æ˜¯å¦æ˜¾ç¤ºä¸€ä¸ªæäº¤æŒ‰é’®ï¼ˆç”¨äºŽåˆ‡æ¢æ‰€é€‰æ‹©çš„主题)?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php b/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php index 55ce7b98..a3f38efc 100644 --- a/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php +++ b/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php @@ -1,8 +1,13 @@ -add('description', PLUGIN_TEMPLATEDROPDOWN_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.2'); + $propbag->add('version', '1.3'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -46,33 +51,35 @@ class serendipity_plugin_templatedropdown extends serendipity_plugin { break; default: - return false; + return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title', $this->title); $url = serendipity_currentURL(true); - echo ''; - echo ''."\n"; foreach (serendipity_fetchTemplates() as $template) { if ($template == 'default-php' || $template == 'default-xml') continue; $templateInfo = serendipity_fetchTemplateInfo($template); - echo ''; + echo ' \n"; } - echo ''; + echo "\n"; - if ($this->get_config('show_submit', 'false') == 'true') { - echo ''; + if (serendipity_db_bool($this->get_config('show_submit', 'false'))) { + echo ''."\n"; } - echo ''; + echo "\n"; } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/rss.php b/rss.php index 30ff16bc..7d3cab96 100644 --- a/rss.php +++ b/rss.php @@ -9,6 +9,10 @@ session_cache_limiter('public'); include('serendipity_config.inc.php'); include(S9Y_INCLUDE_PATH . 'include/functions_rss.inc.php'); +if ($serendipity['cors']) { + header('Access-Control-Allow-Origin: *'); // Allow RSS feeds to be read by javascript +} + $version = $_GET['version']; $description = $serendipity['blogDescription']; $title = $serendipity['blogTitle']; @@ -16,6 +20,13 @@ $comments = FALSE; if (empty($version)) { list($version) = serendipity_discover_rss($_GET['file'], $_GET['ext']); +} else { + # be sure it is an allowed version, to prevent attackers sniffing for unrelated files on the file system + $allowed_versions = ['opml1.0', '0.91', '1.0', '2.0', 'atom0.3', 'atom1.0']; + if (! in_array($version, $allowed_versions, true)) { + header('Status: 404 Not Found'); + exit; + } } if (isset($_GET['category'])) { @@ -233,18 +244,14 @@ if ($_GET['type'] == 'content' && header('Location: ' . serendipity_get_config_var('feedCustom')); exit; } -$metadata['showMail'] = serendipity_db_bool(serendipity_get_config_var('show_mail', $metadata['showMail'])); +$metadata['showMail'] = serendipity_db_bool(serendipity_get_config_var('feedShowMail', $metadata['showMail'])); $file_version = preg_replace('@[^0-9a-z\.-_]@i', '', $version); -$metadata['template_file'] = serendipity_getTemplateFile('feed_' . $file_version . '.tpl', 'serendipityPath'); +$metadata['template_file'] = 'feed_' . $file_version . '.tpl'; serendipity_smarty_init(); serendipity_plugin_api::hook_event('frontend_rss', $metadata); -if (!$metadata['template_file'] || $metadata['template_file'] == 'feed_' . $file_version . '.tpl') { - die("Invalid RSS version specified or RSS-template file not found\n"); -} - $self_url = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . serendipity_specialchars($_SERVER['REQUEST_URI']); if (!is_array($entries)) { $entries = array(); diff --git a/serendipity_admin.php b/serendipity_admin.php index a8a7ff89..3a70b9ac 100644 --- a/serendipity_admin.php +++ b/serendipity_admin.php @@ -116,7 +116,7 @@ if (!$use_installer && $is_logged_in) { } include S9Y_INCLUDE_PATH . 'include/admin/templates.inc.php'; - $admin_section = MANAGE_STYLES; + $admin_section = MENU_TEMPLATES; break; case 'plugins': @@ -125,7 +125,7 @@ if (!$use_installer && $is_logged_in) { } include S9Y_INCLUDE_PATH . 'include/admin/plugins.inc.php'; - $admin_section = CONFIGURE_PLUGINS; + $admin_section = MENU_PLUGINS; break; case 'users': @@ -174,10 +174,7 @@ if (!$use_installer && $is_logged_in) { break; case 'comments': - if (!serendipity_checkPermission('adminComments')) { - break; - } - + // perms are checked by author include S9Y_INCLUDE_PATH . 'include/admin/comments.inc.php'; $admin_section = COMMENTS; break; @@ -230,9 +227,10 @@ if ($ajax) { $admin_vars[$poll_admin_var] =& $$poll_admin_var; } - $admin_vars['out'] = array(); - $admin_vars['no_create'] = $serendipity['no_create']; - $admin_vars['title'] = $admin_section; + $admin_vars['out'] = array(); + $admin_vars['no_create'] = $serendipity['no_create']; + $admin_vars['title'] = $admin_section; + $admin_vars['backendBlogtitleFirst'] = $serendipity['backendBlogtitleFirst']; if ($serendipity['expose_s9y']) { $admin_vars['version_info'] = sprintf(ADMIN_FOOTER_POWERED_BY, $serendipity['versionInstalled'], phpversion()); diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index 2ce82a4a..d29a27fa 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -47,7 +47,7 @@ if (defined('USE_MEMSNAP')) { } // The version string -$serendipity['version'] = '2.1-alpha3'; +$serendipity['version'] = '2.2.0-beta2'; // Setting this to 'false' will enable debugging output. All alpha/beta/cvs snapshot versions will emit debug information by default. To increase the debug level (to enable Smarty debugging), set this flag to 'debug'. @@ -83,9 +83,12 @@ $serendipity['max_last_modified'] = 60 * 60 * 24 * 7; // that date. However it is still limited by the number below of maximum entries $serendipity['max_fetch_limit'] = 50; -// How many bytes are allowed for fetching trackbacks, so that no binary files get accidently trackbacked? +// How many bytes are allowed for fetching trackbacks, so that no binary files get accidentally trackbacked? $serendipity['trackback_filelimit'] = 150 * 1024; +// Allow "Access-Control-Allow-Origin: *" to be used in sensible locations (RSS feed) +$serendipity['cors'] = false; + if (!isset($serendipity['fetchLimit'])) { $serendipity['fetchLimit'] = 15; } @@ -134,6 +137,22 @@ if (!isset($serendipity['template_backend'])) { $serendipity['template_backend'] = '2k11'; } +// The default page title of backend pages is "section | blog title | SERENDIPITY_ADMIN_SUITE" +// If set to true (in serendipity_config_local.inc.php), the page title will be +// "blog title | section | SERENDIPITY_ADMIN_SUITE" instead +if (!isset($serendipity['backendBlogtitleFirst'])) { + $serendipity['backendBlogtitleFirst'] = false; +} + +// Dashboard: set number of comments and drafts / future entries to be shown +if (!isset($serendipity['dashboardCommentsLimit'])) { + $serendipity['dashboardCommentsLimit'] = 5; +} + +if (!isset($serendipity['dashboardEntriesLimit'])) { + $serendipity['dashboardEntriesLimit'] = 5; +} + // Available languages if (!isset($serendipity['languages'])) { $serendipity['languages'] = array('en' => 'English', @@ -278,7 +297,7 @@ if ($serendipity['production'] === false) { $errLevel = error_reporting(); -/* debug make correct error levels readable +/* [DEBUG] Helper to display current error levels, meant for developers. echo $errLevel."
          \n"; for ($i = 0; $i < 15; $i++ ) { print debug_ErrorLevelType($errLevel & pow(2, $i)) . "
          \n"; @@ -287,14 +306,9 @@ for ($i = 0; $i < 15; $i++ ) { // [internal callback function]: errorToExceptionHandler() if (is_callable($serendipity['errorhandler'], false, $callable_name)) { - // set serendipity global error to exeption handler - if ($serendipity['production'] === 'debug') { - set_error_handler($serendipity['errorhandler'], $errLevel); // Yes, DEBUG mode should actually report E_STRICT errors! In PHP 5.4+ contained in E_ALL already - } elseif ($serendipity['production'] === false) { - set_error_handler($serendipity['errorhandler'], $errLevel); // most E_STRICT errors are thrown during the page's compilation process and can not be suppressed here. - } else { - set_error_handler($serendipity['errorhandler'], $errLevel); // different, see ln 56 - } + // set serendipity global error to exception handler + set_error_handler($serendipity['errorhandler'], $errLevel); // See error_reporting() earlier to see which errors are passed to the handler, deending on $serendipity['production']. + register_shutdown_function('fatalErrorShutdownHandler'); } define('IS_up2date', version_compare($serendipity['version'], $serendipity['versionInstalled'], '<=')); @@ -430,7 +444,7 @@ if (!isset($serendipity['GET']['adminAction'])) { // Make sure this variable is always properly sanitized. Previously in compat.inc.php, but there LANG_CHARSET was not defined. if (isset($serendipity['GET']['searchTerm'])) { - $serendipity['GET']['searchTerm'] = serendipity_specialchars(strip_tags($serendipity['GET']['searchTerm'])); + $serendipity['GET']['searchTerm'] = (is_string($serendipity['GET']['searchTerm']) ? serendipity_specialchars(strip_tags($serendipity['GET']['searchTerm'])) : ''); } // Some stuff... diff --git a/templates/2k11/admin/category.inc.tpl b/templates/2k11/admin/category.inc.tpl index 596f15a7..2f5ab23b 100644 --- a/templates/2k11/admin/category.inc.tpl +++ b/templates/2k11/admin/category.inc.tpl @@ -1,25 +1,25 @@ {if $post_save} {if $new} - {$CONST.CATEGORY_SAVED} + {$CONST.CATEGORY_SAVED} {/if} {if $edit} {if isset($editPermission) && $editPermission == false} - {$CONST.PERM_DENIED} + {$CONST.PERM_DENIED} {else} {if $subcat}{$subcat}{else} - {$CONST.CATEGORY_SAVED} + {$CONST.CATEGORY_SAVED} {/if} {/if} {/if} {if $error_name} - {$CONST.CATEGORY_ALREADY_EXIST|sprintf:$category_name|escape} + {$CONST.CATEGORY_ALREADY_EXIST|sprintf:$category_name|escape} {/if} {/if} {if $doDelete} {if $deleteSuccess} - {if $remainingCat}{$CONST.CATEGORY_DELETED_ARTICLES_MOVED|sprintf:$remainingCat:$cid}{else}{$cid|string_format:"{$CONST.CATEGORY_DELETED}"}{/if} + {if $remainingCat}{$CONST.CATEGORY_DELETED_ARTICLES_MOVED|sprintf:$remainingCat:$cid}{else}{$cid|string_format:"{$CONST.CATEGORY_DELETED}"}{/if} {else} - {$CONST.INVALID_CATEGORY} + {$CONST.INVALID_CATEGORY} {/if} {/if} {if $delete} @@ -54,7 +54,7 @@
          - +
          @@ -64,7 +64,7 @@

          - +

          @@ -74,13 +74,13 @@ {foreach $categories as $cat} {if $cat.categoryid == $cid}{continue}{/if} - + {/foreach}
          - {$CONST.CATEGORY_HIDE_SUB} More + {$CONST.CATEGORY_HIDE_SUB} More {$CONST.CATEGORY_HIDE_SUB_DESC} @@ -99,7 +99,7 @@

          - +

          @@ -125,7 +125,7 @@

          - +

          @@ -134,7 +134,7 @@ - +
          @@ -172,7 +172,7 @@ {/if} {$priorDepth=$category.depth} - +
        • {/foreach} @@ -199,7 +199,7 @@ {/for} {else} - {$CONST.NO_CATEGORIES} + {$CONST.NO_CATEGORIES} {/if} {$CONST.CREATE_NEW_CAT} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/comments.inc.tpl b/templates/2k11/admin/comments.inc.tpl index d343c944..4baad0ba 100644 --- a/templates/2k11/admin/comments.inc.tpl +++ b/templates/2k11/admin/comments.inc.tpl @@ -1,11 +1,15 @@ {if !empty($errormsg)} - {$errormsg} + {foreach $errormsg as $show_errormsg} + {$show_errormsg} + {/foreach} {/if} {if !empty($msg)} - {$msg} + {foreach $msg as $show_msg} + {$show_msg} + {/foreach} {/if} {if $commentReplied} - {$CONST.COMMENT_ADDED} + {$CONST.COMMENT_ADDED} {else}

          {$CONST.COMMENTS}

          @@ -16,7 +20,7 @@ @@ -90,8 +94,8 @@ {if !is_array($sql)} - - + + {if $c_type == 'TRACKBACK'} {$CONST.NO_TRACKBACKS} {else if $c_type == 'PINGBACK'} @@ -118,8 +122,8 @@

          {$comment.author|escape|truncate:40:"…"} {$CONST.IN} {($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id} - {$CONST.IN_REPLY_TO} {$comment.title|escape} - {$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'} - + {$CONST.ON} {$comment.timestamp|formatTime:'%b %e %Y, %H:%M'} +

          {if ($comment.status == 'pending') || ($comment.status == 'confirm')} {$CONST.COMMENTS_FILTER_NEED_APPROVAL} @@ -144,19 +148,19 @@
          {$comment.fullBody}
          {$comment.action_more} @@ -167,10 +171,10 @@ {if ($page != 1 && $page <= $pages)||$page != $pages} {/if} @@ -183,4 +187,4 @@
        • {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/config_template.tpl b/templates/2k11/admin/config_template.tpl index 0df15c6e..c65e6936 100644 --- a/templates/2k11/admin/config_template.tpl +++ b/templates/2k11/admin/config_template.tpl @@ -4,16 +4,16 @@ {$formToken} {/if} -{if $config|@sizeof > 1 AND $allowToggle} - {$CONST.TOGGLE_ALL} +{if $config|sizeof > 1 AND $allowToggle} + {$CONST.TOGGLE_ALL} {/if}
          {foreach $config as $category}
          - {if $config|@sizeof > 1} + {if $config|sizeof > 1} {if $allowToggle}

          - +

          {else}

          {$category.title}

          @@ -27,7 +27,7 @@ {if $item.guessedInput} {if $item.type == 'bool'}
          - {$item.title}{if $item.description != ''} {/if} + {$item.title}{if $item.description != ''} {/if} {if $item.description != ''} {$item.description} {/if} @@ -36,8 +36,11 @@
          {else} -
          - + {if $item.ignore} + {cycle advance=true assign='temp'} + {/if} +
          + {if $item.description != ''} {$item.description} {/if} @@ -55,4 +58,4 @@
          -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/configuration.inc.tpl b/templates/2k11/admin/configuration.inc.tpl index 1faf336b..d15cc933 100644 --- a/templates/2k11/admin/configuration.inc.tpl +++ b/templates/2k11/admin/configuration.inc.tpl @@ -3,20 +3,20 @@ {if $diagnosticError}

          {$CONST.DIAGNOSTIC_ERROR}

          {foreach $res as $r} - {$r} + {$r} {/foreach} {else} {if $htaccessRewrite}

          {$CONST.ATTEMPT_WRITE_FILE|sprintf:"{$serendipityPath}htaccess"}

          {if is_array($res)} {foreach $res as $r} - {$r} + {$r} {/foreach} {else} - {$CONST.DONE} + {$CONST.DONE} {/if} {/if} - {$CONST.WRITTEN_N_SAVED} + {$CONST.WRITTEN_N_SAVED} {/if} {/if} -{$config} +{$config} \ No newline at end of file diff --git a/templates/2k11/admin/entries.inc.tpl b/templates/2k11/admin/entries.inc.tpl index 41040fdb..959659c4 100644 --- a/templates/2k11/admin/entries.inc.tpl +++ b/templates/2k11/admin/entries.inc.tpl @@ -8,10 +8,10 @@ @@ -23,12 +23,12 @@
          @@ -146,17 +146,17 @@ {/foreach} @@ -185,11 +186,11 @@

          {$CONST.PAGE_BROWSE_ENTRIES|sprintf:($page+1):$totalPages:$totalEntries}

          {/if} @@ -206,36 +207,36 @@ {if $no_entries}

          {$CONST.FIND_ENTRIES}

          - {$CONST.NO_ENTRIES_TO_PRINT} + {$CONST.NO_ENTRIES_TO_PRINT} {/if} {if $switched_output} {if ($get.adminAction && $dateval)} - {$CONST.DATE_INVALID} + {$CONST.DATE_INVALID} {/if} {if ($get.adminAction && $use_legacy)} {if $is_draft && ! $errors} - {$CONST.IFRAME_SAVE_DRAFT} + {$CONST.IFRAME_SAVE_DRAFT} {/if} {if $is_iframe} {if $iframe === true && isset($smarty.post.serendipity.properties.lang_selected)} - {$CONST.PLUGIN_EVENT_MULTILINGUAL_ENTRY_RELOADED|sprintf:{(''==$smarty.post.serendipity.properties.lang_selected)?$lang:$smarty.post.serendipity.properties.lang_selected}} + {$CONST.PLUGIN_EVENT_MULTILINGUAL_ENTRY_RELOADED|sprintf:{(''==$smarty.post.serendipity.properties.lang_selected)?$lang:$smarty.post.serendipity.properties.lang_selected}} {else} - {$CONST.IFRAME_SAVE} + {$CONST.IFRAME_SAVE} {/if} {/if} {if $is_iframepreview} - {$CONST.IFRAME_PREVIEW} + {$CONST.IFRAME_PREVIEW} {/if} {/if} {if ($is_doDelete || $is_doMultiDelete )} {foreach $del_entry AS $delent} - {$delent} + {$delent} {/foreach} {/if} {if ( $is_delete || $is_multidelete )} {foreach $rip_entry AS $ripent} - {$ripent} + {$ripent} {/foreach}
          {$CONST.NOT_REALLY} diff --git a/templates/2k11/admin/entries.tpl b/templates/2k11/admin/entries.tpl index 44a671dd..6c6a323d 100644 --- a/templates/2k11/admin/entries.tpl +++ b/templates/2k11/admin/entries.tpl @@ -1,6 +1,6 @@

          {if $entry_vars.entry.title}{$CONST.EDIT_ENTRY}{else}{$CONST.NEW_ENTRY}{/if}

          {if $entry_vars.errMsg} - {$entry_vars.errMsg} + {$entry_vars.errMsg} {/if}
          {foreach $entry_vars.hiddens as $key => $value} @@ -78,18 +78,21 @@
          - - {$CONST.CATEGORIES} + + {$CONST.CATEGORIES} {if class_exists('serendipity_event_freetag')} - {$CONST.PLUGIN_EVENT_FREETAG_MANAGETAGS} + {$CONST.PLUGIN_EVENT_FREETAG_MANAGETAGS} {/if} - + + {if $entry_vars.entry.id} + {$CONST.DELETE} + {/if}
          - +
          {if $entry_vars.allowDateManipulation} @@ -97,7 +100,7 @@ - +
          {/if}
          @@ -131,8 +134,8 @@
          - - + +
          {foreach from=$entry_vars.category_options item="entry_cat"} @@ -144,19 +147,21 @@
          {/foreach} +
          - {capture name='advanced_options'}{$entry_vars.entry|@serendipity_refhookPlugin:'backend_display'}{/capture} - {if ! empty($smarty.capture.advanced_options) } -
          - -
          + {capture name='advanced_options'}{$entry_vars.entry|serendipity_refhookPlugin:'backend_display'}{/capture} + {if !empty($smarty.capture.advanced_options)} + +
          + +
          {$smarty.capture.advanced_options} -
          +
          {/if} @@ -164,5 +169,5 @@ {foreach from=$entry_vars.wysiwyg_blocks item="wysiwyg_block_item" key="wysiwyg_block_jsname"} {$wysiwyg_block_item|emit_htmlarea_code:$wysiwyg_block_jsname} {/foreach} - {$entry_vars.wysiwyg_blocks|@serendipity_refhookPlugin:'backend_wysiwyg_finish'} -{/if} + {$entry_vars.wysiwyg_blocks|serendipity_refhookPlugin:'backend_wysiwyg_finish'} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/groups.inc.tpl b/templates/2k11/admin/groups.inc.tpl index 142fd466..38792309 100644 --- a/templates/2k11/admin/groups.inc.tpl +++ b/templates/2k11/admin/groups.inc.tpl @@ -1,11 +1,11 @@ {if $delete_yes} - {$CONST.DELETED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"} + {$CONST.DELETED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"} {/if} {if $save_new} - {$CONST.CREATED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"} + {$CONST.CREATED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"} {/if} {if $save_edit} - {$CONST.MODIFIED_GROUP|sprintf:"{$name|escape}"} + {$CONST.MODIFIED_GROUP|sprintf:"{$name|escape}"} {/if} {if !$delete} @@ -14,10 +14,10 @@
          {else} - {$CONST.PERMISSION_FORBIDDEN_ENABLE_DESC} + {$CONST.PERMISSION_FORBIDDEN_ENABLE_DESC} {/if}
          {if $edit} @@ -123,12 +123,12 @@

          {$CONST.MANAGE_GROUPS}

          - {$CONST.DELETE_GROUP|sprintf:"{$group_id}":"{$group.name|escape}"} - + {$CONST.DELETE_GROUP|sprintf:"{$group_id}":"{$group.name|escape}"} +
          {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/images.inc.tpl b/templates/2k11/admin/images.inc.tpl index efa6c63c..8109cf39 100644 --- a/templates/2k11/admin/images.inc.tpl +++ b/templates/2k11/admin/images.inc.tpl @@ -4,21 +4,21 @@ {if $case_doSync} {if !$perm_adminImagesSync} - {$CONST.PERM_DENIED} + {$CONST.PERM_DENIED} {else}

          {$CONST.SYNCING}

          - {$print_SYNC_DONE} + {$print_SYNC_DONE}

          {$CONST.RESIZING}

          - {$print_RESIZE_DONE} + {$print_RESIZE_DONE} {/if} {/if} {if $case_delete}

          {$CONST.MEDIA_DELETE}

          - {$CONST.ABOUT_TO_DELETE_FILE|sprintf:"$file"} + {$CONST.ABOUT_TO_DELETE_FILE|sprintf:"$file"}
          @@ -29,9 +29,9 @@ {/if} {if $case_multidelete} - {$CONST.ABOUT_TO_DELETE_FILES} + {$CONST.ABOUT_TO_DELETE_FILES} {foreach $rip_image AS $ripimg} - {$ripimg} + {$ripimg} {/foreach}
          {$CONST.BACK} @@ -47,13 +47,13 @@ {if isset($showML)}{$showML}{/if} {/if} {if $case_directoryDoDelete} - {if $print_DIRECTORY_WRITE_ERROR} {$print_DIRECTORY_WRITE_ERROR}{/if} + {if $print_DIRECTORY_WRITE_ERROR} {$print_DIRECTORY_WRITE_ERROR}{/if} {if isset($ob_serendipity_killPath)}{$ob_serendipity_killPath}{/if} - {if $print_ERROR_NO_DIRECTORY} {$print_ERROR_NO_DIRECTORY}{/if} + {if $print_ERROR_NO_DIRECTORY} {$print_ERROR_NO_DIRECTORY}{/if} {/if} {if $case_directoryEdit} {if !empty($smarty.post.serendipity.save)} - {$print_SETTINGS_SAVED_AT} + {$print_SETTINGS_SAVED_AT} {/if}

          {$CONST.MANAGE_DIRECTORIES}

          @@ -67,7 +67,7 @@

          - +

          @@ -122,10 +122,10 @@ {/if} {if $case_directoryDoCreate} {if $print_DIRECTORY_CREATED} - {$print_DIRECTORY_CREATED} + {$print_DIRECTORY_CREATED} {/if} {if $print_DIRECTORY_WRITE_ERROR} - {$print_DIRECTORY_WRITE_ERROR} + {$print_DIRECTORY_WRITE_ERROR} {/if} {$CONST.BACK} {/if} @@ -160,7 +160,7 @@ {if $case_directorySelect}

          {$CONST.MANAGE_DIRECTORIES}

          -

          {$CONST.BASE_DIRECTORY} {$CONST.DIRECTORY_INFO}

          +

          {$CONST.BASE_DIRECTORY} {$CONST.DIRECTORY_INFO}

          {$CONST.DIRECTORY_INFO_DESC}
          @@ -194,12 +194,12 @@
        • {/foreach} @@ -237,16 +237,16 @@ {/if} {/if} {if $case_scale} - {if isset($print_SCALING_IMAGE)} {$print_SCALING_IMAGE}{/if} - {if isset($scaleImgError)} {$scaleImgError}{/if} - {if isset($is_done)} {$CONST.DONE}{/if} + {if isset($print_SCALING_IMAGE)} {$print_SCALING_IMAGE}{/if} + {if isset($scaleImgError)} {$scaleImgError}{/if} + {if isset($is_done)} {$CONST.DONE}{/if} {if $showML}{$showML}{/if} {/if} {if $case_scaleSelect} {if $print_RESIZE_BLAHBLAH}

          {$print_RESIZE_BLAHBLAH}

          {/if} {if $print_ORIGINAL_SIZE}{$print_ORIGINAL_SIZE}{/if} - {$CONST.HERE_YOU_CAN_ENTER_BLAHBLAH} + {$CONST.HERE_YOU_CAN_ENTER_BLAHBLAH}
          @@ -290,4 +290,4 @@ {/if} {if $showMLbutton} {$CONST.MEDIA_LIBRARY} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/import.inc.tpl b/templates/2k11/admin/import.inc.tpl index 29a7cf6d..324eb47c 100644 --- a/templates/2k11/admin/import.inc.tpl +++ b/templates/2k11/admin/import.inc.tpl @@ -2,16 +2,16 @@ {if $die}

          {$CONST.IMPORT_ENTRIES}

          - {$CONST.INCLUDE_ERRORFAILURE|sprintf:'importer'} + {$CONST.INCLUDE_ERRORFAILURE|sprintf:'importer'} {else} {if $validateData}

          {$CONST.IMPORT_ENTRIES}

          - {$CONST.IMPORT_STARTING} + {$CONST.IMPORT_STARTING} {if $result != true} - {$CONST.IMPORT_FAILED}: {$result} + {$CONST.IMPORT_FAILED}: {$result} {else} - {$CONST.IMPORT_DONE} + {$CONST.IMPORT_DONE} {/if} {else}

          {$CONST.IMPORT_PLEASE_ENTER}

          @@ -19,7 +19,7 @@ {$formToken} {if $notes} - {$CONST.IMPORT_NOTES}: {$notes} + {$CONST.IMPORT_NOTES}: {$notes} {/if}
          {foreach $fields as $field} @@ -50,4 +50,4 @@
          -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/index.tpl b/templates/2k11/admin/index.tpl index 9733da3a..198b26ef 100644 --- a/templates/2k11/admin/index.tpl +++ b/templates/2k11/admin/index.tpl @@ -1,9 +1,13 @@ - + - {if $admin_vars.title}{$admin_vars.title} | {/if}{$CONST.SERENDIPITY_ADMIN_SUITE} + {if !$admin_vars.backendBlogtitleFirst} + {if $admin_vars.title}{$admin_vars.title} | {/if}{$blogTitle} | {$CONST.SERENDIPITY_ADMIN_SUITE} + {else} + {$blogTitle} | {if $admin_vars.title}{$admin_vars.title}{/if} | {$CONST.SERENDIPITY_ADMIN_SUITE} + {/if} {$media.external} @@ -11,7 +11,7 @@

          {$CONST.YOU_CHOSE|sprintf:$media.file.realname}

          - +
          {serendipity_hookPlugin hookAll=true hook='frontend_image_selector_hiddenfields' eventData=$media.file} @@ -170,5 +170,4 @@ {/if} {/if}{* if $media.file.is_image is something else end *}
        • -{/if}{* if $perm_denied else end *} - +{/if}{* if $perm_denied else end *} \ No newline at end of file diff --git a/templates/2k11/admin/media_items.tpl b/templates/2k11/admin/media_items.tpl index 89a32e8c..6fa868ba 100644 --- a/templates/2k11/admin/media_items.tpl +++ b/templates/2k11/admin/media_items.tpl @@ -49,7 +49,7 @@ {$img_title="{$file.path}"} {$img_alt="{$file.realname}"} {else} - {$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"} + {$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"} {$img_src="{$file.mimeicon}"} {$img_title="{$file.path}{$file.name}({$file.mime})"} {$img_alt="{$file.mime}"} @@ -60,9 +60,9 @@ {$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[fid]={$file.id}&serendipity[filename_only]={$media.filename_only}&serendipity[textarea]={$media.textarea}&serendipity[htmltarget]={$media.htmltarget}"} {/if} -
          +
          - {if $media.manage} + {if $media.manage AND $media.multiperm}
          @@ -77,7 +77,7 @@
          - + {$img_alt}
          {/if} -{/foreach} +{/foreach} \ No newline at end of file diff --git a/templates/2k11/admin/media_pane.tpl b/templates/2k11/admin/media_pane.tpl index 6bc76bc1..ad93a536 100644 --- a/templates/2k11/admin/media_pane.tpl +++ b/templates/2k11/admin/media_pane.tpl @@ -13,8 +13,8 @@ {else}{$media.form_hidden}{/if}
          @@ -102,18 +105,13 @@
          - mediaproperties metadata  + mediaproperties metadata fields
          {/if} {/foreach} -
          - - -
          -
          @@ -226,18 +224,12 @@
          {* has toolbar end *} -{if $smarty.get.serendipity.showUpload} - -{/if} -
          {if $media.nr_files < 1} - {$CONST.NO_IMAGES_FOUND} + {$CONST.NO_IMAGES_FOUND} {else} - {if $media.manage} + {if $media.manage AND $media.multiperm}
          {$media.token} @@ -246,57 +238,53 @@ {/if} -
          +
          {$MEDIA_ITEMS} - {if ($media.page != 1 && $media.page <= $media.pages)||$media.page != $media.pages} + {if ($media.page != 1 AND $media.page <= $media.pages) OR $media.page != $media.pages} {/if}
          {* media pane end *} - {if $media.manage} + {if $media.manage AND $media.multiperm} -
          -
          - - - + + +
          +

          Move images to directory

          +
          +
          + -
          - - -
          - {$CONST.BULKMOVE_INFO_DESC} -
          - {/if} - - +
          +
          + +
          + +
          {/if} -
          {* media library pane end *} +
          {* media library pane end *} \ No newline at end of file diff --git a/templates/2k11/admin/media_upload.tpl b/templates/2k11/admin/media_upload.tpl index 47113ba8..cb29e241 100644 --- a/templates/2k11/admin/media_upload.tpl +++ b/templates/2k11/admin/media_upload.tpl @@ -40,13 +40,13 @@
          - +

          {$CONST.DOWNLOAD}

          - {$CONST.ADD_MEDIA_BLAHBLAH_NOTE} + {$CONST.ADD_MEDIA_BLAHBLAH_NOTE}
          @@ -87,4 +87,4 @@ {/if}
          - + \ No newline at end of file diff --git a/templates/2k11/admin/oldie.css b/templates/2k11/admin/oldie.css index b87e1615..c9217062 100644 --- a/templates/2k11/admin/oldie.css +++ b/templates/2k11/admin/oldie.css @@ -20,6 +20,14 @@ position: relative; } +#media_selector_bar { + margin: 0; +} + +.popuplayer_showUpload { + margin: 1em 0 0; +} + .tabcontent #pluginlist_event > a, .tabcontent #pluginlist_sidebar > a { position: absolute; @@ -40,6 +48,7 @@ #image_directory_create_form label { display: inline-block; width: 20%; + white-space: nowrap;/*mediafilter*/ } #sort_entries .form_select select, @@ -83,6 +92,14 @@ margin: 0 0 1em; } +.popuplayer_showUpload { + margin: 0 .4em 1em 0; +} + +.media_select_strict { + margin: -1em 0; +} + #mediaPropertyForm .media_file_props label, #mediaPropertyForm header b, #mediaPropertyForm footer b { @@ -90,6 +107,11 @@ width: 20%; } +#media_filter > .left, +#media_filter > .center {/*mediafilter*/ + margin-right: .2em; +} + .user_level { display: inline; } @@ -144,13 +166,13 @@ pre { margin: 1.71429em 0; } -#template_select article, -.plugins_installable > li, +.no-flexbox #template_select article, +.no-flexbox .plugins_installable > li, #serendipityScaleForm, #serendipityScaleImg, -.media_file, -#dashboard > .dashboard_widget, -#maintenance > .quick_list, +.no-flexbox .media_file, +.no-flexbox #dashboard > .dashboard_widget, +.no-flexbox #maintenance > .quick_list, .serendipity_statistics > section, #serendipity_category > div > div, #serendipity_category #preview, @@ -162,6 +184,65 @@ pre { width: 48%; } +#dashboard, +#maintenance, +.media_pane, +.pluginmanager, +.plugins_installable, +#template_select, +#template_select > ul { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.plugins_installable { + justify-content: flex-start; +} + +#dashboard > .dashboard_widget, +#maintenance > .quick_list, +.media_pane > .media_file, +.plugins_installable > li, +#template_select > article, +#template_select > ul li { + flex: 0 0 auto; + margin: 0 2% 1em 0; + width: 48%; +} + +.pluginmanager .pluginmanager_event { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 49%; +} + +.pluginmanager .pluginmanager_sidebar { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 32%; +} + +.no-js #dashboard #s9y_links, +#maintenance > h2, +.media_pane .pagination, +#template_select > h2 { + flex: 0 0 auto; + width: 100%; +} + +#dashboard > .dashboard_widget:nth-of-type(even), +#maintenance > .quick_list:nth-of-type(even), +.media_pane > .media_file:nth-of-type(even), +#template_select > .current_backend_template, +#template_select > ul li:nth-of-type(even) { + margin: 0 0 1em 2%; +} + +.no-js #dashboard #s9y_links { + margin: 0 0 1em; +} + .media_chooser { margin-bottom: 0; } @@ -176,22 +257,14 @@ pre { width: 84%; } -#template_select .current_backend_template, -#template_select li:nth-child(even) article, -.media_pane .even, -#dashboard > .dashboard_widget:nth-child(even), -#maintenance > section:nth-of-type(even) { +.no-flexbox #template_select .current_backend_template, +.no-flexbox #template_select li:nth-child(even) article, +.no-flexbox .media_pane .even, +.no-flexbox #dashboard > .dashboard_widget:nth-child(even), +.no-flexbox #maintenance > section:nth-of-type(even) { margin: 0 0 1em 2%; } -#maintenance > section { - margin: 0 2% 1em 0; -} - -#template_select .current_template { - margin-bottom: 2em; -} - #mediaPropertyForm .media_file { float: none; margin: 1.5em 0; @@ -227,6 +300,7 @@ pre { .configuration_group .form_field input, .configuration_group .form_area textarea, .configuration_group fieldset > fieldset legend, +.configuration_group div > fieldset legend, #uploadform .form_select label, #uploadform .form_field label, #uploadform .form_select select, @@ -302,14 +376,15 @@ pre { .configuration_group .form_multiselect, .configuration_group .form_field, .configuration_group .form_area, +.configuration_group .custom_item, .configuration_group fieldset > fieldset, -#template_select li:nth-child(odd), +.configuration_group div > fieldset, +.no-flexbox #template_select li:nth-child(odd), #template_select h2, -.media_pane .odd, -#dashboard > .odd, -.plugins_installable > li:nth-child(odd), +.no-flexbox .media_pane .odd, +.no-flexbox .plugins_installable > li:nth-child(odd), .serendipity_statistics > section:nth-child(odd), -.dashboard_widget:nth-child(odd) { +.no-flexbox .dashboard_widget:nth-child(odd) { clear: left; } @@ -323,33 +398,34 @@ pre { .configure_plugin fieldset .form_radio, .configuration_group fieldset > fieldset .form_radio, +.configuration_group div > fieldset .form_radio, #serendipity_plugin_config > fieldset .form_radio, #template_options fieldset .form_radio { margin-top: 0; } -.pluginmanager_side { +.no-flexbox .pluginmanager_side { float: left; margin: 0 0 1.5em; vertical-align: top; } -#pluginlist_sidebar .pluginmanager_side { +.no-flexbox #pluginlist_sidebar .pluginmanager_side { margin-right: 1%; width: 32%; } -#pluginlist_event .pluginmanager_side { +.no-flexbox #pluginlist_event .pluginmanager_side { margin-right: 1%; width: 49%; } -#pluginlist_event .pluginmanager_side:nth-child(even) { +.no-flexbox #pluginlist_event .pluginmanager_side:nth-child(even) { margin-right: 0; margin-left: 1%; } -#pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { +.no-flexbox #pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { clear: left; } @@ -358,6 +434,10 @@ pre { padding: .85715em; } +.manage h3 { + width: 17em; +} + #edit_entry_status_comments .form_check { margin-bottom: 0; } @@ -405,6 +485,12 @@ pre { width: 33% ; } +#media_filter > div.keywords {/*simple filter*/ + float: right; + margin-top: -2.5em; + margin-bottom: 0; +} + #filter_entries .form_select, #filter_entries .form_field { float: left; @@ -417,8 +503,10 @@ pre { width: 50%; } -#media_filter_file, -#media_pane_sort .left, +#media_filter .left { + clear: left; +} + #serendipity_comment .form_area { clear: both; } @@ -427,6 +515,10 @@ pre { padding-top: 2em; } +.manage h3 { + width: 19em; +} + #login .form_field input { width: auto; } @@ -567,6 +659,10 @@ main { width: 100%; } +.manage h3 { + width: 14em; +} + #login { margin: 4em auto 8em; -} +} \ No newline at end of file diff --git a/templates/2k11/admin/overview.inc.tpl b/templates/2k11/admin/overview.inc.tpl index 93c64c4b..54f2132d 100644 --- a/templates/2k11/admin/overview.inc.tpl +++ b/templates/2k11/admin/overview.inc.tpl @@ -1,22 +1,24 @@

          {$CONST.WELCOME_BACK} {$username|escape}

          - {$CONST.FURTHER_LINKS} + {$CONST.FURTHER_LINKS}
          {$backend_frontpage_display} -
          +
          {if $published} - {$CONST.ENTRY_PUBLISHED|sprintf:$published|escape} + {$CONST.ENTRY_PUBLISHED|sprintf:$published|escape} +
          {/if} {if $error_publish} - {$CONST.PUBLISH_ERROR}: {$error_publish} + {$CONST.PUBLISH_ERROR}: {$error_publish} +
          {/if} - {if $updateCheck == "stable" || $updateCheck == "beta" } + {if $updateCheck == "stable" || $updateCheck == "beta"} {if $curVersion == -1}

          {$CONST.UPDATE_NOTIFICATION}

          - {$CONST.UPDATE_FAILMSG} + {$CONST.UPDATE_FAILMSG}
          {$token} @@ -28,7 +30,7 @@

          {$CONST.UPDATE_NOTIFICATION}

          - {$CONST.NEW_VERSION_AVAILABLE} {$curVersion} + {$CONST.NEW_VERSION_AVAILABLE} {$curVersion} {$updateButton}

          @@ -48,18 +50,18 @@
          {$comment.fullBody|escape}
          {if ($comment.status == 'pending') || ($comment.status == 'confirm')} @@ -68,7 +70,7 @@ {/foreach} {else} -
        • {$CONST.NO_COMMENTS}
        • +
        • {$CONST.NO_COMMENTS}
        • {/if}
          @@ -82,22 +84,22 @@
        • {$entry.title|escape} {if !$showFutureEntries && ($entry.timestamp >= $serverOffsetHour) && $entry.isdraft == "false"} - {$entry.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT} + {$entry.timestamp|formatTime:$CONST.DATE_FORMAT_SHORT} {/if} {if $entry.properties.ep_is_sticky} {$CONST.STICKY_POSTINGS} @@ -108,7 +110,7 @@
        • {/foreach} {else} -
        • {$CONST.NO_ENTRIES_TO_PRINT}
        • +
        • {$CONST.NO_ENTRIES_TO_PRINT}
        • {/if} @@ -133,7 +135,7 @@ + \ No newline at end of file diff --git a/templates/2k11/admin/personal.inc.tpl b/templates/2k11/admin/personal.inc.tpl index 97d3a9b2..1cf32ebf 100644 --- a/templates/2k11/admin/personal.inc.tpl +++ b/templates/2k11/admin/personal.inc.tpl @@ -1,13 +1,13 @@

          {$CONST.PERSONAL_SETTINGS}

          {if $adminAction == 'save'} {if $not_authorized} - {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} + {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} {elseif $empty_username} - {$CONST.USERCONF_CHECK_USERNAME_ERROR} + {$CONST.USERCONF_CHECK_USERNAME_ERROR} {elseif $password_check_fail} - {$CONST.USERCONF_CHECK_PASSWORD_ERROR} + {$CONST.USERCONF_CHECK_PASSWORD_ERROR} {else} - {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"} ?> + {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"} ?> {/if} {/if}
          @@ -16,4 +16,4 @@
          - + \ No newline at end of file diff --git a/templates/2k11/admin/plugin_config.tpl b/templates/2k11/admin/plugin_config.tpl index 715e5092..a3c91bb8 100644 --- a/templates/2k11/admin/plugin_config.tpl +++ b/templates/2k11/admin/plugin_config.tpl @@ -8,13 +8,13 @@ {/if} {if is_array($config_groups)}
          {foreach $config_groups AS $config_header => $config_groupkeys}
          -

          +

          {foreach $config_groupkeys AS $config_groupkey} @@ -73,4 +73,4 @@ {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/plugin_config_item.tpl b/templates/2k11/admin/plugin_config_item.tpl index 59bd2155..95034308 100644 --- a/templates/2k11/admin/plugin_config_item.tpl +++ b/templates/2k11/admin/plugin_config_item.tpl @@ -7,7 +7,7 @@ {elseif $ctype == 'select'}
          - + {if $cdesc != ''}{$cdesc}{/if}
          {elseif (($ctype == 'html') || ($ctype == 'text'))}
          - + {if $cdesc != ''}{$cdesc}{/if}
          @@ -56,6 +56,13 @@ {$cbag_custom}
          +{elseif $ctype == 'color'} + +
          + + {if $cdesc != ''}{$cdesc}{/if} + +
          {elseif $ctype == 'hidden'}
          @@ -64,12 +71,12 @@ {elseif $ctype == 'media'}
          - +
          - +
          {if $cdesc != ''}{$cdesc}{/if} @@ -82,7 +89,7 @@ {elseif $ctype == 'sequence'} - {$cname}{if $cdesc != ''} {/if} + {$cname}{if $cdesc != ''} {/if} {if $cdesc != ''}{$cdesc}{/if} @@ -95,7 +102,7 @@ {foreach $order_id as $orid}
        • - +
          {if $checkable}
          @@ -112,12 +119,12 @@ {if ($orid['sort_idx'] == 0)}   {else} - + {/if} {if ($orid['sort_idx'] == $last)}   {else} - + {/if}
          @@ -128,4 +135,4 @@ {$no_sequence} {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/plugins.inc.tpl b/templates/2k11/admin/plugins.inc.tpl index 68489a7c..4f9777dc 100644 --- a/templates/2k11/admin/plugins.inc.tpl +++ b/templates/2k11/admin/plugins.inc.tpl @@ -1,7 +1,7 @@ {if $plugin_to_conf} {if is_array($save_errors)}
          -

          {$CONST.ERROR}:

          +

          {$CONST.ERROR}:

            {foreach $save_errors as $save_error} @@ -10,7 +10,7 @@
          {elseif $saveconf} - {$CONST.DONE}: {$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"} + {$CONST.DONE}: {$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"} {/if}

          {$name} ({$class})

          @@ -39,9 +39,9 @@ {$config} {elseif $adminAction == 'addnew'} -

          {if $type == 'event'}{$CONST.EVENT_PLUGINS}{else}{$CONST.SIDEBAR_PLUGINS}{/if}{if $only_group != UPGRADE} ({$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$count_pluginstack}){/if}

          +

          {if $type == 'event'}{$CONST.EVENT_PLUGINS}{/if}{if $type == 'sidebar'}{$CONST.SIDEBAR_PLUGINS}{/if}{if $type == 'both'}{$CONST.MENU_PLUGINS}{/if}{if $only_group != UPGRADE} ({$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$count_pluginstack}){/if}

          {foreach $errorstack as $e_idx => $e_name} - {$CONST.ERROR}: {$e_name} + {$CONST.ERROR}: {$e_name} {/foreach}
          @@ -65,7 +65,7 @@
          - +
          @@ -76,15 +76,15 @@
          {if $only_group == 'UPGRADE' && ! $available_upgrades} - {$CONST.NO_UPDATES} + {$CONST.NO_UPDATES} {else} {foreach $pluggroups AS $pluggroup => $groupstack} - {if $only_group && $pluggroup != $only_group}{continue}{/if} + {if $only_group && $pluggroup != $only_group || empty($pluggroup)}{continue}{/if}

          {foreach $groupnames as $available_group => $available_name}{if $pluggroup == $available_group}{$available_name}{/if}{/foreach}

          {if $only_group == 'UPGRADE' && $pluggroups['UPGRADE']|@count > 1} {/if} -
            +
              {foreach $groupstack as $plug}
            • @@ -130,13 +130,13 @@
              {if isset($requirements_failures.{$plug.class_name})} - {$CONST.UNMET_REQUIREMENTS|sprintf:"{if $requirements_failures.{$plug.class_name}.s9y}s9y $plug.requirements..serendipity,{/if} {if $requirements_failures.{$plug.class_name}.php}PHP $plug.requirements.php,{/if} {if $requirements_failures.{$plug.class_name}.smarty}Smarty $plug.requirements.smarty{/if}"} + {$CONST.UNMET_REQUIREMENTS|sprintf:"{if $requirements_failures.{$plug.class_name}.s9y}s9y $plug.requirements..serendipity,{/if} {if $requirements_failures.{$plug.class_name}.php}PHP $plug.requirements.php,{/if} {if $requirements_failures.{$plug.class_name}.smarty}Smarty $plug.requirements.smarty{/if}"} {elseif $plug['upgradable'] == true} - {$CONST.UPGRADE} + {$CONST.UPGRADE} {elseif $plug.installable == true} - {$CONST.INSTALL} + {$CONST.INSTALL} {else} - {$CONST.ALREADY_INSTALLED} + {$CONST.ALREADY_INSTALLED} {/if}
            • @@ -157,18 +157,18 @@ {$backend_pluginlisting_header}

              {$CONST.CONFIGURE_PLUGINS}

              {if $save} - {$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"} + {$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"} {/if} {if $new_plugin_failed} - {$CONST.ERROR}: {$CONST.PLUGIN_ALREADY_INSTALLED} + {$CONST.ERROR}: {$CONST.PLUGIN_ALREADY_INSTALLED} {/if} {if $updateAllMsg} - {$CONST.DONE}: All Plugins updated {* i18n *} + {$CONST.DONE}: All Plugins updated {* i18n *} {/if}

              {$CONST.SIDEBAR_PLUGINS}

              - {$CONST.INSTALL_NEW_SIDEBAR_PLUGIN} + {$CONST.INSTALL_NEW_SIDEBAR_PLUGIN} {$backend_plugins_sidebar_header} {$sidebar_plugins} @@ -176,7 +176,7 @@

              {$CONST.EVENT_PLUGINS}

              - {$CONST.INSTALL_NEW_EVENT_PLUGIN} + {$CONST.INSTALL_NEW_EVENT_PLUGIN} {$backend_plugins_event_header} {$event_plugins} @@ -189,4 +189,4 @@
              {$memSnaps|print_r}
              {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/serendipity_editor.js.tpl b/templates/2k11/admin/serendipity_editor.js.tpl index 6c3e1b05..84561805 100644 --- a/templates/2k11/admin/serendipity_editor.js.tpl +++ b/templates/2k11/admin/serendipity_editor.js.tpl @@ -385,7 +385,7 @@ // this function got called on load of the editor var toggleButton = '#toggle_extended'; $('#extended_entry_editor').parent().find('label').first().wrap(''); - $(toggleButton).prepend(' '); + $(toggleButton).prepend(' '); $(toggleButton).click(function(e) { e.preventDefault(); serendipity.toggle_extended(true); @@ -423,7 +423,7 @@ // this function got called on load of the editor var toggleButton = '#toggle_' + id; - $('#'+id).before(''); + $('#'+id).before(''); $(toggleButton).click(function(e) { e.preventDefault(); @@ -836,32 +836,36 @@ } serendipity.eraseEntryEditorCache = function() { - serendipity.cache("serendipity[body]", null); - serendipity.cache("serendipity[extended]", null); + serendipity.cache("serendipity[body]", ""); + serendipity.cache("serendipity[extended]", ""); } var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; serendipity.cache = function (id, data) { - var request = indexedDB.open("cache", 1); - request.onupgradeneeded = function (event) { - event.target.result.createObjectStore("cache"); - }; - request.onsuccess = function(event) { - event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").put(data, id); - }; + if (typeof indexedDB !== 'undefined') { + var request = indexedDB.open("cache", 1); + request.onupgradeneeded = function (event) { + event.target.result.createObjectStore("cache"); + }; + request.onsuccess = function(event) { + event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").put(data, id); + }; + } } serendipity.getCached = function(id, success) { - var request = indexedDB.open("cache", 1); - request.onupgradeneeded = function (event) { - event.target.result.createObjectStore("cache"); - }; - request.onsuccess = function(event) { - event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").get(id).onsuccess = function (event) { - success(event.target.result); + if (typeof indexedDB !== 'undefined') { + var request = indexedDB.open("cache", 1); + request.onupgradeneeded = function (event) { + event.target.result.createObjectStore("cache"); }; - }; + request.onsuccess = function(event) { + event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").get(id).onsuccess = function (event) { + success(event.target.result); + }; + }; + } } } @@ -1034,7 +1038,7 @@ $(function() { } e.preventDefault(); // Inline notification, we might want to make this reuseable - $('{$CONST.TIMESTAMP_RESET} {$CONST.HIDE}').insertBefore('#edit_entry_title'); + $('{$CONST.TIMESTAMP_RESET} {$CONST.HIDE}').insertBefore('#edit_entry_title'); // Remove timestamp msg $('.remove_msg').click(function(e) { e.preventDefault(); @@ -1075,7 +1079,7 @@ $(function() { } // Inline notification, we might want to make this reuseable - $('{$CONST.ENTRY_STATUS}: ' + newState + ' {$CONST.HIDE}').insertBefore('#edit_entry_title'); + $('{$CONST.ENTRY_STATUS}: ' + newState + ' {$CONST.HIDE}').insertBefore('#edit_entry_title'); // Remove entrystatus msg $('.remove_msg').click(function(e) { e.preventDefault(); @@ -1354,11 +1358,7 @@ $(function() { $('.comments_reply').click(function(e) { e.preventDefault(); - {if $use_backendpopups || $force_backendpopups.comments} - window.open(this.href, 'CommentForm', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1').focus(); - {else} - $(this).magnificPopup({ type:'iframe' }); - {/if} + serendipity.openPopup($(this).attr('href')); }); // Selection for multidelete @@ -1565,6 +1565,7 @@ $(function() { $('#uploadform').submit(function(event) { if (! $('#imageurl').val()) { event.preventDefault(); + $('#uploadform .check_inputs').attr('disabled', true); var sendDataToML = function(data, progressContainer, progress) { $.ajax({ type: 'post', @@ -1573,12 +1574,14 @@ $(function() { cache: false, processData: false, contentType: false, - xhrFields: { - onprogress: function (e) { + xhr: function() { + var xhr = $.ajaxSettings.xhr(); + xhr.upload.onprogress = function(e) { if (e.lengthComputable) { progress.value = e.loaded / e.total * 100; } - } + }; + return xhr; } }).done(function(data) { progress.value = 100; @@ -1600,6 +1603,7 @@ $(function() { $('.form_buttons').prepend(mlLink); $(mlLink).fadeIn(); } + $('#uploadform .check_inputs').removeAttr('disabled'); }); }; $('.uploadform_userfile').each(function() { @@ -1617,6 +1621,7 @@ $(function() { data.append('serendipity[adminAction]', 'add'); data.append('serendipity[token]', $('input[name*="serendipity[token]"]').val()); data.append('serendipity[target_filename][1]', $('input[name*="serendipity[target_filename][1]"]').val()); + data.append('serendipity[target_directory][1]', $('select[name*="serendipity[target_directory][1]"]').val()); var progress = document.createElement('progress'); var progressContainer = document.createElement('span'); progressContainer.className = 'msg_notice'; @@ -1646,7 +1651,7 @@ $(function() { canvas.width = width; canvas.height = height; canvas.getContext('2d').drawImage(image, 0, 0, width, height); - + if (type == "image/bmp") { {* bmp is not supported *} type = "image/png"; @@ -1677,6 +1682,19 @@ $(function() { }); } + if ($('.image_move').length > 0) { + $('.image_move').removeClass('hidden'); + $('.image_move').magnificPopup({ + type: 'inline', + }); + $('#move-popup form').submit(function(e) { + e.preventDefault(); + $('#newDir').val($('#move-popup form select').val()); + $.magnificPopup.close(); + $('input[name="toggle_move"]').click(); + }); + } + // reopen detail element after spamblock action if ($('#serendipity_comments_list').length > 0 && window.location.hash && $('#' + window.location.hash.replace('#', '')).length > 0) { $('#' + window.location.hash.replace('#', '')).find(".toggle_info").click(); @@ -1743,15 +1761,19 @@ $(function() { // Equal Heights $(window).load(function() { - if (mq_small) { - serendipity.sync_heights(); + if(!Modernizr.flexbox) { + if (mq_small) { + serendipity.sync_heights(); + } } }); // Make sure plugin list heights are recalculated when switching tabs $('#pluginlist_tabs a').click(function() { - if (mq_small) { - serendipity.sync_heights(); + if(!Modernizr.flexbox) { + if (mq_small) { + serendipity.sync_heights(); + } } }); }); @@ -1783,4 +1805,4 @@ serendipity_imageSelector_done = function(textarea) { serendipity_imageSelector_addToElement = function(str, id) { return serendipity.serendipity_imageSelector_addToElement(str, id); -} +} \ No newline at end of file diff --git a/templates/2k11/admin/show_plugins.fnc.tpl b/templates/2k11/admin/show_plugins.fnc.tpl index 6935984e..5769ed94 100644 --- a/templates/2k11/admin/show_plugins.fnc.tpl +++ b/templates/2k11/admin/show_plugins.fnc.tpl @@ -6,7 +6,7 @@ {/if} {$serendipity_setFormToken} -
              +
              {foreach $placement as $plugin_placement}

              {$plugin_placement['ptitle']}

              @@ -27,11 +27,11 @@
              - +
              {if $plugin_data['can_configure']} - {$CONST.CONFIGURATION} + {$CONST.CONFIGURATION} {/if} {$plugin_data['desc']} @@ -67,14 +67,14 @@ {if $plugin_data.sort_idx == 0} {else} - {$CONST.MOVE_UP} + {$CONST.MOVE_UP} {/if} {if $sort_idx == $total - 1} {else} - {$CONST.MOVE_DOWN} + {$CONST.MOVE_DOWN} {/if} @@ -84,10 +84,10 @@
              {/foreach} - {$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$total}
              + {$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$total}
              - + \ No newline at end of file diff --git a/templates/2k11/admin/style.css b/templates/2k11/admin/style.css index 1ae2b1b6..4619e4bc 100644 --- a/templates/2k11/admin/style.css +++ b/templates/2k11/admin/style.css @@ -10,7 +10,7 @@ hgroup, main, nav, section, -summary { +.no-details summary { display: block; } @@ -152,6 +152,7 @@ select { button, html input[type="button"], +html input[type="color"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; @@ -350,6 +351,11 @@ progress div.progress-undefined { width: 100%; } +progress { + /* Makes progress bar visible in FF */ + background: white; +} + /* HELPER CLASSES */ /* Hide visually, available for screenreaders */ .visuallyhidden { @@ -365,12 +371,30 @@ progress div.progress-undefined { /* Clearfix: contain floats */ .clearfix:before, -.clearfix:after { +.no-flexbox #maintenance:before, +.no-flexbox #dashboard:before, +.no-flexbox .media_pane:before, +.no-flexbox .plugins_installable:before, +.no-flexbox .pluginmanager:before, +.no-flexbox #template_select > ul:before, +.clearfix:after, +.no-flexbox #maintenance:after, +.no-flexbox #dashboard:after, +.no-flexbox .media_pane:after, +.no-flexbox .plugins_installable:after, +.no-flexbox .pluginmanager:after, +.no-flexbox #template_select > ul:after { content: " "; display: table; } -.clearfix:after { +.clearfix:after, +.no-flexbox #maintenance:after, +.no-flexbox #dashboard:after, +.no-flexbox .media_pane:after, +.no-flexbox .plugins_installable:after, +.no-flexbox .pluginmanager:after, +.no-flexbox #template_select > ul:after { clear: both; } @@ -616,6 +640,7 @@ button, #edit_entry_category button.mfp-close, #edit_entry_freetags button.mfp-close, input[type="button"], +input[type="color"], input[type="reset"], input[type="submit"] { border-radius: 4px; @@ -632,7 +657,8 @@ input[type="submit"] { .tabs > ul a, button, button[type="submit"].publish_now, -input[type="button"] { +input[type="button"], +input[type="color"] { background: #ddd; background-image: -webkit-linear-gradient(#fff, #ddd); background-image: linear-gradient(#fff, #ddd); @@ -674,7 +700,8 @@ input[type="submit"].state_cancel:visited { .tabs > ul a:hover, button:hover, button[type="submit"].publish_now:hover, -input[type="button"]:hover { +input[type="button"]:hover, +input[type="color"]:hover { background: #ccc; background-image: -webkit-linear-gradient(#fff, #eee 1px, #ccc); background-image: linear-gradient(#fff, #eee 1px, #ccc); @@ -710,7 +737,8 @@ input:checked + .media_selector, button[type="submit"].publish_now:active, .tabs > ul a:active, button:active, -input[type="button"]:active { +input[type="button"]:active, +input[type="color"]:active { background-image: -webkit-linear-gradient(#fff, #ddd 1px, #eee); background-image: linear-gradient(#fff, #ddd 1px, #eee); box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0; @@ -1061,7 +1089,7 @@ input[type=checkbox], .media_file_metadata h5, .media_file_metadata dt, #serendipity_comments_list details, -#dashboard > #s9y_links, +.no-flexbox #dashboard > #s9y_links, .configure_plugin .cke { clear: both; } @@ -1574,7 +1602,8 @@ fieldset p, padding: .25em 0; } -.importer_data dd > div { +.importer_data dd > div, +.media_file .actions, { margin-top: 0; margin-bottom: 0; } @@ -1588,7 +1617,6 @@ fieldset p, } #login .form_buttons, -.media_file .actions, #entries_list .actions, .msg_hint > p:last-of-type { margin-bottom: 0; @@ -1601,7 +1629,6 @@ fieldset p, margin-top: .75em; } -.media_file .actions, .js #add_upload { margin-top: 1em; } @@ -1743,13 +1770,19 @@ form > .button_link:first-of-type, } #template_select article, -.media_file, .plugins_installable > li { padding: 0 .5em 1em; } .media_file { - padding: 0 .5em .5em; + box-sizing: border-box; + padding: 0 .5em 3.5em; + position: relative; +} + +.media_file_actions { + position: absolute; + bottom: 0; } .media_wrap_thumb { @@ -2234,18 +2267,29 @@ label .perm_name, /* PLUGIN MANAGER */ +.pluginmanager { + margin-top: 1em; + margin-bottom: 1em; +} + .pluginmanager_container { background: transparent; + margin: 0; + padding: .25em; + position: relative; +} + +.flexbox .pluginmanager_side, +.no-flexbox .pluginmanager_container { border: 1px solid #ddd; border-radius: 2px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; - height: 98%; - margin: 0; - min-height: 12.5em; - padding: .25em; - position: relative; +} + +.flexbox .pluginmanager_side h4 { + margin: .75em .5em .25em; } .pluginmanager_container .placeholder { @@ -2300,7 +2344,7 @@ label .perm_name, .plugin_count { clear: both; - margin: 0 0 1.5em; + margin: 1.5em 0 0; } .pluginmanager .pluginmanager_grablet { @@ -2328,11 +2372,27 @@ label .perm_name, } .pluginmanager_plugin .form_check { + float: left; margin: .75em 0; + width: 5%; } .pluginmanager_plugin h5 { + float: left; margin: .75em 0 0; + width: 95%; +} + +.pluginmanager_sidebar .pluginmanager_plugin .form_check { + width: 8%; +} + +.pluginmanager_sidebar .pluginmanager_plugin h5 { + width: 92%; +} + +.pluginmanager_plugin .plugin_data { + clear: left; } .configuration_group .sequence_grablet, @@ -2414,6 +2474,7 @@ label .perm_name, .js .media_file_preview, .js .template_preview { + min-height: 12em; position: relative; } @@ -2515,6 +2576,11 @@ input[name="serendipity[filter][fileCategory]"] { margin: 1em 0 0; } +.popuplayer_showUpload { + float: right; + margin: 1em 0 0; +} + .media_select_strict { clear: right; float: left; @@ -2566,6 +2632,15 @@ input[name="serendipity[filter][fileCategory]"] { animation: loaderSprite 1s steps(25, end) infinite; } +#move-popup { + position: relative; + background: #FFF; + padding: 20px; + width: auto; + max-width: 500px; + margin: 20px auto; +} + /* TEMP fixes for tree view */ #expandcontractdiv { font-size: 1em !important; @@ -2596,8 +2671,7 @@ input[name="serendipity[filter][fileCategory]"] { overflow: hidden; position: fixed; background: #0b0b0b; - opacity: 0.8; - filter: alpha(opacity=80); } + opacity: 0.8; } .mfp-wrap { top: 0; @@ -2617,8 +2691,6 @@ input[name="serendipity[filter][fileCategory]"] { left: 0; top: 0; padding: 0 8px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-container:before { @@ -2638,7 +2710,8 @@ input[name="serendipity[filter][fileCategory]"] { text-align: left; z-index: 1045; } -.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { +.mfp-inline-holder .mfp-content, +.mfp-ajax-holder .mfp-content { width: 100%; cursor: auto; } @@ -2659,7 +2732,10 @@ input[name="serendipity[filter][fileCategory]"] { .mfp-auto-cursor .mfp-content { cursor: auto; } -.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter { +.mfp-close, +.mfp-arrow, +.mfp-preloader, +.mfp-counter { -webkit-user-select: none; -moz-user-select: none; user-select: none; } @@ -2671,7 +2747,7 @@ input[name="serendipity[filter][fileCategory]"] { display: none !important; } .mfp-preloader { - color: #cccccc; + color: #CCC; position: absolute; top: 50%; width: auto; @@ -2681,9 +2757,9 @@ input[name="serendipity[filter][fileCategory]"] { right: 8px; z-index: 1044; } .mfp-preloader a { - color: #cccccc; } + color: #CCC; } .mfp-preloader a:hover { - color: white; } + color: #FFF; } .mfp-s-ready .mfp-preloader { display: none; } @@ -2691,7 +2767,8 @@ input[name="serendipity[filter][fileCategory]"] { .mfp-s-error .mfp-content { display: none; } -button.mfp-close, button.mfp-arrow { +button.mfp-close, +button.mfp-arrow { overflow: visible; cursor: pointer; background: transparent; @@ -2701,8 +2778,9 @@ button.mfp-close, button.mfp-arrow { outline: none; padding: 0; z-index: 1046; - -webkit-box-shadow: none; - box-shadow: none; } + box-shadow: none; + touch-action: manipulation; } + button::-moz-focus-inner { padding: 0; border: 0; } @@ -2717,23 +2795,23 @@ button::-moz-focus-inner { text-decoration: none; text-align: center; opacity: 0.65; - filter: alpha(opacity=65); padding: 0 0 18px 10px; - color: white; + color: #FFF; font-style: normal; font-size: 28px; font-family: Arial, Baskerville, monospace; } - .mfp-close:hover, .mfp-close:focus { - opacity: 1; - filter: alpha(opacity=100); } + .mfp-close:hover, + .mfp-close:focus { + opacity: 1; } .mfp-close:active { top: 1px; } .mfp-close-btn-in .mfp-close { - color: #333333; } + color: #333; } -.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close { - color: white; +.mfp-image-holder .mfp-close, +.mfp-iframe-holder .mfp-close { + color: #FFF; right: -6px; text-align: right; padding-right: 6px; @@ -2743,27 +2821,28 @@ button::-moz-focus-inner { position: absolute; top: 0; right: 0; - color: #cccccc; + color: #CCC; font-size: 12px; - line-height: 18px; } + line-height: 18px; + white-space: nowrap; } .mfp-arrow { position: absolute; opacity: 0.65; - filter: alpha(opacity=65); margin: 0; top: 50%; margin-top: -55px; padding: 0; width: 90px; height: 110px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } + -webkit-tap-highlight-color: transparent; } .mfp-arrow:active { margin-top: -54px; } - .mfp-arrow:hover, .mfp-arrow:focus { - opacity: 1; - filter: alpha(opacity=100); } - .mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a { + .mfp-arrow:hover, + .mfp-arrow:focus { + opacity: 1; } + .mfp-arrow:before, + .mfp-arrow:after { content: ''; display: block; width: 0; @@ -2774,31 +2853,31 @@ button::-moz-focus-inner { margin-top: 35px; margin-left: 35px; border: medium inset transparent; } - .mfp-arrow:after, .mfp-arrow .mfp-a { + .mfp-arrow:after { border-top-width: 13px; border-bottom-width: 13px; top: 8px; } - .mfp-arrow:before, .mfp-arrow .mfp-b { + .mfp-arrow:before { border-top-width: 21px; border-bottom-width: 21px; opacity: 0.7; } .mfp-arrow-left { left: 0; } - .mfp-arrow-left:after, .mfp-arrow-left .mfp-a { - border-right: 17px solid white; + .mfp-arrow-left:after { + border-right: 17px solid #FFF; margin-left: 31px; } - .mfp-arrow-left:before, .mfp-arrow-left .mfp-b { + .mfp-arrow-left:before { margin-left: 25px; - border-right: 27px solid #3f3f3f; } + border-right: 27px solid #3F3F3F; } .mfp-arrow-right { right: 0; } - .mfp-arrow-right:after, .mfp-arrow-right .mfp-a { - border-left: 17px solid white; + .mfp-arrow-right:after { + border-left: 17px solid #FFF; margin-left: 39px; } - .mfp-arrow-right:before, .mfp-arrow-right .mfp-b { - border-left: 27px solid #3f3f3f; } + .mfp-arrow-right:before { + border-left: 27px solid #3F3F3F; } .mfp-iframe-holder { padding-top: 40px; @@ -2823,7 +2902,7 @@ button::-moz-focus-inner { width: 100%; height: 100%; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); - background: black; } + background: #000; } /* Main image in popup */ img.mfp-img { @@ -2832,8 +2911,6 @@ img.mfp-img { height: auto; display: block; line-height: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; padding: 40px 0 40px; margin: 0 auto; } @@ -2853,9 +2930,9 @@ img.mfp-img { height: auto; z-index: -1; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); - background: #444444; } + background: #444; } .mfp-figure small { - color: #bdbdbd; + color: #BDBDBD; display: block; font-size: 12px; line-height: 14px; } @@ -2873,7 +2950,7 @@ img.mfp-img { .mfp-title { text-align: left; line-height: 18px; - color: #f3f3f3; + color: #F3F3F3; word-wrap: break-word; padding-right: 36px; } @@ -2885,8 +2962,8 @@ img.mfp-img { @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { /** - * Remove all paddings around the image on small screen - */ + * Remove all paddings around the image on small screen + */ .mfp-img-mobile .mfp-image-holder { padding-left: 0; padding-right: 0; } @@ -2905,8 +2982,6 @@ img.mfp-img { top: auto; padding: 3px 5px; position: fixed; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-img-mobile .mfp-bottom-bar:empty { padding: 0; } @@ -2938,23 +3013,6 @@ img.mfp-img { padding-left: 6px; padding-right: 6px; } } -.mfp-ie7 .mfp-img { - padding: 0; } -.mfp-ie7 .mfp-bottom-bar { - width: 600px; - left: 50%; - margin-left: -300px; - margin-top: 5px; - padding-bottom: 5px; } -.mfp-ie7 .mfp-container { - padding: 0; } -.mfp-ie7 .mfp-content { - padding-top: 44px; } -.mfp-ie7 .mfp-close { - top: 0; - right: 0; - padding-top: 0; } - /* Additional styles for MagnificPopup, do not remove */ .mfp-image-holder .mfp-content { min-width: 240px; @@ -2973,6 +3031,10 @@ img.mfp-img { display: inline-block; width: auto; } + + .popuplayer_showUpload { + margin: 1em .4rem 0 0; + } } @media only screen and (min-width: 480px) { @@ -2998,6 +3060,14 @@ img.mfp-img { position: relative; } + #media_selector_bar { + margin: 0; + } + + .popuplayer_showUpload { + margin: 1em 0 0; + } + .tabcontent #pluginlist_event > a, .tabcontent #pluginlist_sidebar > a { position: absolute; @@ -3066,13 +3136,12 @@ img.mfp-img { margin: 0 0 1em; } - .media_select_strict { - margin: -1em 0; + .popuplayer_showUpload { + margin: 0 .4em 1em 0; } - .popuplayer_showUpload { - float: right; - margin-top: -2.375em; + .media_select_strict { + margin: -1em 0; } #mediaPropertyForm .media_file_props label, @@ -3145,13 +3214,13 @@ img.mfp-img { margin: 1.71429em 0; } - #template_select article, - .plugins_installable > li, + .no-flexbox #template_select article, + .no-flexbox .plugins_installable > li, #serendipityScaleForm, #serendipityScaleImg, - .media_file, - #dashboard > .dashboard_widget, - #maintenance > .quick_list, + .no-flexbox .media_file, + .no-flexbox #dashboard > .dashboard_widget, + .no-flexbox #maintenance > .quick_list, .serendipity_statistics > section, #serendipity_category > div > div, #serendipity_category #preview, @@ -3163,10 +3232,71 @@ img.mfp-img { width: 48%; } + #dashboard, + #maintenance, + .media_pane, + .pluginmanager, + .plugins_installable, + #template_select, + #template_select > ul { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + } + + .plugins_installable { + justify-content: flex-start; + } + + #dashboard > .dashboard_widget, + #maintenance > .quick_list, + .media_pane > .media_file, + .plugins_installable > li, + #template_select > article, + #template_select > ul li { + flex: 0 0 auto; + margin: 0 2% 1em 0; + width: 48%; + } + + .pluginmanager .pluginmanager_event { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 49%; + } + + .pluginmanager .pluginmanager_sidebar { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 32%; + } + + .no-js #dashboard #s9y_links, + #maintenance > h2, + #maintenance > span, + .media_pane .pagination, + #template_select > h2 { + flex: 0 0 auto; + width: 100%; + } + + #dashboard > .dashboard_widget:nth-of-type(even), + #maintenance > .quick_list:nth-of-type(even), + .media_pane > .media_file:nth-of-type(even), + #template_select > .current_backend_template, + #template_select > ul li:nth-of-type(even) { + margin: 0 0 1em 2%; + } + + .no-js #dashboard #s9y_links { + margin: 0 0 1em; + } + .media_chooser { margin-bottom: 0; } + #maintenance > span, .media_chooser + .field_info { margin-top: 0; } @@ -3177,22 +3307,14 @@ img.mfp-img { width: 84%; } - #template_select .current_backend_template, - #template_select li:nth-child(even) article, - .media_pane .even, - #dashboard > .dashboard_widget:nth-child(even), - #maintenance > section:nth-of-type(even) { + .no-flexbox #template_select .current_backend_template, + .no-flexbox #template_select li:nth-child(even) article, + .no-flexbox .media_pane .even, + .no-flexbox #dashboard > .dashboard_widget:nth-child(even), + .no-flexbox #maintenance > section:nth-of-type(even) { margin: 0 0 1em 2%; } - #maintenance > section { - margin: 0 2% 1em 0; - } - - #template_select .current_template { - margin-bottom: 2em; - } - #mediaPropertyForm .media_file { float: none; margin: 1.5em 0; @@ -3307,12 +3429,12 @@ img.mfp-img { .configuration_group .custom_item, .configuration_group fieldset > fieldset, .configuration_group div > fieldset, - #template_select li:nth-child(odd), + .no-flexbox #template_select li:nth-child(odd), #template_select h2, - .media_pane .odd, - .plugins_installable > li:nth-child(odd), + .no-flexbox .media_pane .odd, + .no-flexbox .plugins_installable > li:nth-child(odd), .serendipity_statistics > section:nth-child(odd), - .dashboard_widget:nth-child(odd) { + .no-flexbox .dashboard_widget:nth-child(odd) { clear: left; } @@ -3332,28 +3454,28 @@ img.mfp-img { margin-top: 0; } - .pluginmanager_side { + .no-flexbox .pluginmanager_side { float: left; margin: 0 0 1.5em; vertical-align: top; } - #pluginlist_sidebar .pluginmanager_side { + .no-flexbox #pluginlist_sidebar .pluginmanager_side { margin-right: 1%; width: 32%; } - #pluginlist_event .pluginmanager_side { + .no-flexbox #pluginlist_event .pluginmanager_side { margin-right: 1%; width: 49%; } - #pluginlist_event .pluginmanager_side:nth-child(even) { + .no-flexbox #pluginlist_event .pluginmanager_side:nth-child(even) { margin-right: 0; margin-left: 1%; } - #pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { + .no-flexbox #pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { clear: left; } @@ -3627,4 +3749,4 @@ img.mfp-img { .manage h3 { width: 19em; } -} +} \ No newline at end of file diff --git a/templates/2k11/admin/templates.inc.tpl b/templates/2k11/admin/templates.inc.tpl index e9d4509f..9630dfad 100644 --- a/templates/2k11/admin/templates.inc.tpl +++ b/templates/2k11/admin/templates.inc.tpl @@ -1,8 +1,8 @@ {if $adminAction == 'install'} - {$install_template|string_format:"{$CONST.TEMPLATE_SET}"} + {$install_template|string_format:"{$CONST.TEMPLATE_SET}"} {/if} {if $deprecated} - {$CONST.WARNING_TEMPLATE_DEPRECATED} + {$CONST.WARNING_TEMPLATE_DEPRECATED} {/if} {if $adminAction == 'editConfiguration'} @@ -10,7 +10,7 @@

              {$CONST.STYLE_OPTIONS} ({$cur_template})

              {if $has_config} {if $adminAction == 'configure'} - {$CONST.DONE}: {$save_time} + {$CONST.DONE}: {$save_time} {/if}
              @@ -56,9 +56,9 @@
              - - {if $cur_tpl.info.custom_config}{$CONST.CONFIGURATION}{/if} - {if $cur_tpl.info.custom_admin_interface == $CONST.YES and $cur_tpl.info.name != $cur_tpl_backend.info.name}{$CONST.INSTALL}: {$CONST.BACKEND}{/if} + + {if $cur_tpl.info.custom_config}{$CONST.CONFIGURATION}{/if} + {if $cur_tpl.info.custom_admin_interface == $CONST.YES and $cur_tpl.info.name != $cur_tpl_backend.info.name}{$CONST.INSTALL}: {$CONST.BACKEND}{/if} {if $cur_template_backend} @@ -87,14 +87,11 @@
        • - + {/if} -

          {$CONST.AVAILABLE_TEMPLATES}

          - -
            - {foreach $templates as $template=>$info} + {function name=templateBlock}
          • {$info.info.name|truncate:25:"…"}

            @@ -109,7 +106,7 @@ {/if} {/if} -
            +
            {$CONST.AUTHOR}:
            {$info.info.author}
            @@ -124,23 +121,38 @@
          - + {if $info.demoURL} - {$CONST.THEMES_PREVIEW_BLOG} + {$CONST.THEMES_PREVIEW_BLOG} {/if} {if !$info.unmetRequirements} {if $info.info.custom_admin_interface == $CONST.YES && $cur_tpl_backend.info.name != $info.info.name} - {$CONST.INSTALL}: {$CONST.FRONTEND} - {$CONST.INSTALL}: {$CONST.BACKEND} + {$CONST.INSTALL}: {$CONST.FRONTEND} + {$CONST.INSTALL}: {$CONST.BACKEND} {else} - {$CONST.INSTALL}: {$CONST.FRONTEND} + {$CONST.INSTALL}: {$CONST.FRONTEND} {/if} {else} - {$info.unmetRequirements}> + {$info.unmetRequirements}> {/if} + {/function} + +

          {$CONST.RECOMMENDED}

          +
            + {foreach $recommended_templates as $template=>$info} + {templateBlock template=$template info=$info key=$info@key} + {/foreach} +
          + + +

          {$CONST.AVAILABLE_TEMPLATES}

          + +
            + {foreach $templates as $template=>$info} + {templateBlock template=$template info=$info key=$info@key} {/foreach}
          -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/upgrader.inc.tpl b/templates/2k11/admin/upgrader.inc.tpl index 871a4d69..78d0c2da 100644 --- a/templates/2k11/admin/upgrader.inc.tpl +++ b/templates/2k11/admin/upgrader.inc.tpl @@ -32,12 +32,12 @@ {/if} @@ -60,7 +60,7 @@
          {foreach $errors AS $implode_err} -

          {$implode_err}

          +

          {$implode_err}

          {/foreach}
          {/if} @@ -68,9 +68,9 @@ {if (($showAbort && $get.action == 'ignore') || $get.action == 'upgrade')} {if $get.action == 'ignore'} - {$CONST.SERENDIPITY_UPGRADER_YOU_HAVE_IGNORED} + {$CONST.SERENDIPITY_UPGRADER_YOU_HAVE_IGNORED} {elseif $get.action == 'upgrade'} - {$CONST.SERENDIPITY_UPGRADER_NOW_UPGRADED|sprintf:$s9y_version} + {$CONST.SERENDIPITY_UPGRADER_NOW_UPGRADED|sprintf:$s9y_version} {/if} {if $return_here} {$print_UPGRADER_RETURN_HERE} @@ -109,19 +109,19 @@
          {$urd3}
          {/foreach} {if $isdir_uploadpath} -
          {$basedir}{$uploadHTTPPath}
          +
          {$basedir}{serendipity_getConfigVar key='uploadHTTPPath'}
          {foreach $upgraderResultDiagnose4 AS $urd4}
          {$urd4}
          {/foreach} {/if} {if $showWritableNote} - {$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'} + {$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'} {/if} {if ($errorCount > 0)} - {$CONST.PROBLEM_DIAGNOSTIC} + {$CONST.PROBLEM_DIAGNOSTIC} - {$CONST.RECHECK_INSTALLATION} + {$CONST.RECHECK_INSTALLATION} {/if}
          {if ($errorCount < 1)} diff --git a/templates/2k11/admin/users.inc.tpl b/templates/2k11/admin/users.inc.tpl index 0c8d55e6..f592e82c 100644 --- a/templates/2k11/admin/users.inc.tpl +++ b/templates/2k11/admin/users.inc.tpl @@ -1,39 +1,39 @@ {if $delete_yes} {if $no_delete_permission} - {$CONST.CREATE_NOT_AUTHORIZED} + {$CONST.CREATE_NOT_AUTHORIZED} {else} {if $no_delete_permission_userlevel} - {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} + {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} {else} {if $delete_permission} - {$CONST.DELETED_USER|sprintf:"{$user|escape}":"{$realname|escape}"} + {$CONST.DELETED_USER|sprintf:"{$user|escape}":"{$realname|escape}"} {else} - {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} + {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} {/if} {/if} {/if} {/if} {if $save_new} {if $no_save_permission} - {$CONST.CREATE_NOT_AUTHORIZED} + {$CONST.CREATE_NOT_AUTHORIZED} {else} {if $no_group_selected} - {$CONST.WARNING_NO_GROUPS_SELECTED} + {$CONST.WARNING_NO_GROUPS_SELECTED} {/if} - {$CONST.CREATED_USER|sprintf:"# {$user|escape}":"{$realname|escape}"} + {$CONST.CREATED_USER|sprintf:"# {$user|escape}":"{$realname|escape}"} {/if} {/if} {if $save_edit} {if $no_edit_permission} - {$CONST.CREATE_NOT_AUTHORIZED} + {$CONST.CREATE_NOT_AUTHORIZED} {else} {if $no_edit_permission_userlevel} - {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} + {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL} {else} {if $no_group_selected} - {$CONST.WARNING_NO_GROUPS_SELECTED} + {$CONST.WARNING_NO_GROUPS_SELECTED} {/if} - {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"} + {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"} {/if} {/if} {/if} @@ -44,12 +44,12 @@ {foreach $users as $user} {if $user.isEditable}
        • - {$user.realname|escape} ({$user.userlevel_name|escape}) + {$user.realname|escape} ({$user.userlevel_name|escape})
        • {/if} @@ -78,11 +78,11 @@ {$formToken} - +

          {$CONST.MANAGE_USERS}

          - {$CONST.DELETE_USER|sprintf:"{$userid}":"{$realname|escape}"} + {$CONST.DELETE_USER|sprintf:"{$userid}":"{$realname|escape}"}
          @@ -91,4 +91,4 @@
          {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/feed_0.91.tpl b/templates/2k11/feed_0.91.tpl new file mode 100644 index 00000000..64192044 --- /dev/null +++ b/templates/2k11/feed_0.91.tpl @@ -0,0 +1,26 @@ + + + + +{$metadata.title} +{$metadata.link} +{$metadata.description} +{$metadata.language} +{$metadata.additional_fields.image} + +{foreach from=$entries item="entry"} + + {$entry.feed_title} + {$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if} + +{if !empty($entry.body)} + + {$entry.feed_body|@escape} {$entry.feed_ext|@escape} + +{/if} + +{/foreach} + + + + diff --git a/templates/2k11/feed_1.0.tpl b/templates/2k11/feed_1.0.tpl new file mode 100644 index 00000000..09267a93 --- /dev/null +++ b/templates/2k11/feed_1.0.tpl @@ -0,0 +1,59 @@ + + + + + {$metadata.title} + {$metadata.link} + {$metadata.description} + {$metadata.language} +{if $metadata.showMail} + +{/if} + + {$metadata.additional_fields.image_rss10_channel} + + + +{foreach from=$entries item="entry"} + +{/foreach} + + + + +{$metadata.additional_fields.image_rss10_rdf} +{$once_display_dat} + +{foreach from=$entries item="entry"} + + {$entry.feed_title} + {$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if} +{if !empty($entry.body)} + + {$entry.feed_body|@escape} {$entry.feed_ext|@escape} + +{/if} + + {$entry.feed_blogTitle} + {$entry.feed_email} ({$entry.feed_author}) + + {foreach from=$entry.categories item="cat"}{$cat.feed_category_name}, {/foreach} + {$entry.feed_timestamp} + {$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id} +{if !$is_comments} + {$entry.comments} + {$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id} +{/if} + {$entry.per_entry_display_dat} + +{/foreach} + + + diff --git a/templates/2k11/feed_2.0.tpl b/templates/2k11/feed_2.0.tpl new file mode 100644 index 00000000..80643b83 --- /dev/null +++ b/templates/2k11/feed_2.0.tpl @@ -0,0 +1,54 @@ + + + + + {$channel_display_dat} + {$metadata.title} + {$metadata.link} + {$metadata.description} + {$metadata.language} +{if $metadata.showMail} + +{/if} + Serendipity {$serendipityVersion} - http://www.s9y.org/ + {$metadata.additional_fields.channel} + {$metadata.additional_fields.image} + +{foreach from=$entries item="entry"} + + {$entry.feed_title} + {$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if} + {foreach from=$entry.categories item="cat"} + {$cat.feed_category_name} + {/foreach} + + {$entry.feed_entryLink}#comments + {$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id} + +{if !$is_comments} + {$entry.comments} + {$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id} +{/if} + + {$entry.feed_email} ({$entry.feed_author}) +{if !empty($entry.body)} + + {$entry.feed_body|@escape} {$entry.feed_ext|@escape} + +{/if} + + {$entry.feed_timestamp_r} + {$entry.feed_guid} + {$entry.per_entry_display_dat} + +{/foreach} + + + diff --git a/templates/2k11/feed_atom0.3.tpl b/templates/2k11/feed_atom0.3.tpl new file mode 100644 index 00000000..0cb3ded1 --- /dev/null +++ b/templates/2k11/feed_atom0.3.tpl @@ -0,0 +1,57 @@ + + + + {$channel_display_dat} + + + + + {$metadata.title} + {$metadata.description} + {$metadata.link} + {$last_modified} + Serendipity {$serendipityVersion} - http://www.s9y.org/ + {$metadata.language} +{if $metadata.showMail} + +{/if} + +
          You are viewing an ATOM formatted XML site feed. Usually this file is inteded to be viewed in an aggregator or syndication software. If you want to know more about ATOM, please visist Atomenabled.org
          +
          + +{foreach from=$entries item="entry"} + + + + {$entry.feed_author} + {if $entry.feed_email != 'nospam@example.com'}{$entry.feed_email}{/if} + + + {$entry.feed_timestamp} + {$entry.feed_timestamp} + {$entry.feed_last_modified} + {$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id} +{if !$is_comments} + {$entry.comments} + {$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id} +{/if} + {$entry.feed_guid} + {$entry.feed_title} +{if !empty($entry.body)} + +
          + {$entry.feed_body} {$entry.feed_ext} +
          +
          +{/if} + + {$entry.per_entry_display_dat} +
          +{/foreach} +
          \ No newline at end of file diff --git a/templates/2k11/feed_atom1.0.tpl b/templates/2k11/feed_atom1.0.tpl new file mode 100644 index 00000000..461cf12c --- /dev/null +++ b/templates/2k11/feed_atom1.0.tpl @@ -0,0 +1,58 @@ + + + + {$channel_display_dat} + + + + + {$metadata.title} + {$metadata.description} + {$metadata.additional_fields.image_atom10} + {$metadata.link} + {$last_modified} + Serendipity {$serendipityVersion} - http://www.s9y.org/ + {$metadata.language} +{if $metadata.showMail} + +{/if} + +{foreach from=$entries item="entry"} + + + + {$entry.feed_author} + {if $entry.feed_email != 'nospam@example.com'}{$entry.feed_email}{/if} + + + {$entry.feed_timestamp} + {$entry.feed_last_modified} + {$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id} + +{if !$is_comments} + {$entry.comments} + {$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id} +{/if} + + {foreach from=$entry.categories item="cat"} + + {/foreach} + + {$entry.feed_guid} + {$entry.feed_title} +{if !empty($entry.body)} + + + +{/if} + {$entry.per_entry_display_dat} + +{/foreach} + + \ No newline at end of file diff --git a/templates/2k11/feed_opml1.0.tpl b/templates/2k11/feed_opml1.0.tpl new file mode 100644 index 00000000..ad877ee7 --- /dev/null +++ b/templates/2k11/feed_opml1.0.tpl @@ -0,0 +1,16 @@ + + + + + {$metadata.title} + {$last_modified} + Serendipity {$serendipityVersion} - http://www.s9y.org/ + + + +{foreach from=$entries item="entry"} + +{/foreach} + + + \ No newline at end of file diff --git a/templates/2k11/img/img_align_left.png b/templates/2k11/img/img_align_left.png new file mode 100644 index 00000000..ab38e28d Binary files /dev/null and b/templates/2k11/img/img_align_left.png differ diff --git a/templates/2k11/img/img_align_right.png b/templates/2k11/img/img_align_right.png new file mode 100644 index 00000000..eb28cd91 Binary files /dev/null and b/templates/2k11/img/img_align_right.png differ diff --git a/templates/2k11/img/img_align_top.png b/templates/2k11/img/img_align_top.png new file mode 100644 index 00000000..b0f09991 Binary files /dev/null and b/templates/2k11/img/img_align_top.png differ diff --git a/templates/2k11/img/s9y_banner_small.png b/templates/2k11/img/s9y_banner_small.png new file mode 100644 index 00000000..b62833ec Binary files /dev/null and b/templates/2k11/img/s9y_banner_small.png differ diff --git a/templates/2k11/index.tpl b/templates/2k11/index.tpl index 8f25c739..4c76fcc2 100644 --- a/templates/2k11/index.tpl +++ b/templates/2k11/index.tpl @@ -38,6 +38,7 @@ {if $entry_id} + {/if} {serendipity_hookPlugin hook="frontend_header"} @@ -97,7 +98,7 @@
          diff --git a/templates/2k11/info.txt b/templates/2k11/info.txt index fdb0b202..9216f532 100644 --- a/templates/2k11/info.txt +++ b/templates/2k11/info.txt @@ -3,3 +3,4 @@ Author: Matthias Mees, Veit Lehmann Date: 2015-05-19 Require Serendipity: 2.0 Backend: Yes +Recommended: Yes \ No newline at end of file diff --git a/templates/2k11/preview_iframe.tpl b/templates/2k11/preview_iframe.tpl index ffc1559f..7e998bec 100644 --- a/templates/2k11/preview_iframe.tpl +++ b/templates/2k11/preview_iframe.tpl @@ -26,16 +26,11 @@ {else} {/if} - + {serendipity_hookPlugin hook="backend_header" hookAll="true"} - - {/if} - {$CONST.ENTRY_SAVED} + {$CONST.ENTRY_SAVED} {$CONST.VIEW} {/if} {/if} @@ -70,4 +65,4 @@
          - + \ No newline at end of file diff --git a/templates/2k11/style_fallback.css b/templates/2k11/style_fallback.css new file mode 100644 index 00000000..232d229e --- /dev/null +++ b/templates/2k11/style_fallback.css @@ -0,0 +1,92 @@ +/* The templates/default/style_fallback.css emits CSS statements that all s9y + themes should have. + + Statements declared in this file are emitted early in the dynamically + generated stylesheet serendipity.css, so you can override them by declaring + them again in your theme's style.css or user.css. + + IT IS NOT ADVISED TO CREATE YOUR OWN style_fallback.css FILE! */ + +/* Images positioned normal/left/right */ +.serendipity_image_center { + border: 0; + padding-left: 5px; + padding-right: 5px; +} + +.serendipity_image_left { + float: left; + border: 0; + padding-left: 5px; + padding-right: 5px; +} + +.serendipity_image_right { + float: right; + border: 0; + padding-left: 5px; + padding-right: 5px; +} + +/* Images with captions and positioning */ +.serendipity_imageComment_center, +.serendipity_imageComment_left, +.serendipity_imageComment_right { + border: 1px solid #ddd; + background-color: #efefef; + margin: 3px; + padding: 3px; + text-align: center; +} + +.serendipity_imageComment_center { + margin: auto; +} + +.serendipity_imageComment_left { + float: left; +} + +.serendipity_imageComment_right { + float: right; +} + +.serendipity_imageComment_img, +.serendipity_imageComment_img img { + margin: 0; + padding: 0; + text-align: center; +} + +.serendipity_imageComment_txt { + border-top: 1px solid #ddd; + margin: 0; + padding: 3px; + clear: both; + font-size: 10px; + text-align: center; +} + +/* Lists without bullets or numbers */ +.plainList { + list-style: none; + margin-left: 0; + padding-left: 0; +} + +/* Messages: centered, important, notice */ +.serendipity_center { + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.serendipity_msg_important { + color: red; +} + +.serendipity_msg_notice { + color: green; +} + +/* END OF style_fallback.css */ diff --git a/templates/blue/htmlarea.css b/templates/blue/htmlarea.css deleted file mode 100644 index 4b3687fe..00000000 --- a/templates/blue/htmlarea.css +++ /dev/null @@ -1,45 +0,0 @@ -body { - background-color: #e6eaee; - padding-left: 20px; - padding-right: 20px; - padding-bottom: 10px; - color: #000000; - font-family: sans-serif; - line-height: 20px; - direction: {LANG_DIRECTION}; -} - -/** Embedded images with the s9y image manager **/ -.serendipity_imageComment_center, -.serendipity_imageComment_left, -.serendipity_imageComment_right { - border: 1px solid black; - background-color: #EFEFEF; - margin: 3px; -} - -.serendipity_imageComment_center { -} - -.serendipity_imageComment_left { - float: left; -} - -.serendipity_imageComment_right { - float: right; -} - -.serendipity_imageComment_img, -.serendipity_imageComment_img img { - margin: 0px; - padding: 0px; - border: 0px; -} - -.serendipity_imageComment_txt { - margin: 0px; - padding: 3px; - clear: both; - font-size: 9pt; -} - diff --git a/templates/blue/info.txt b/templates/blue/info.txt deleted file mode 100644 index fe794c35..00000000 --- a/templates/blue/info.txt +++ /dev/null @@ -1,3 +0,0 @@ -Name: blue -Author: Sebastian Bergmann -Date: 16/02/2004 diff --git a/templates/blue/preview.png b/templates/blue/preview.png deleted file mode 100644 index fa4c475f..00000000 Binary files a/templates/blue/preview.png and /dev/null differ diff --git a/templates/blue/preview_fullsize.jpg b/templates/blue/preview_fullsize.jpg deleted file mode 100644 index 3d78bd9e..00000000 Binary files a/templates/blue/preview_fullsize.jpg and /dev/null differ diff --git a/templates/blue/style.css b/templates/blue/style.css deleted file mode 100644 index 5fd96ed4..00000000 --- a/templates/blue/style.css +++ /dev/null @@ -1,375 +0,0 @@ -a, a:visited { - color: #993300; - text-decoration: none; -} - -a:hover { - color: #cc3300; - text-decoration: underline; -} - -body { - background-color: #f0f0f0; - color: #000000; - font-family: sans-serif; - line-height: 20px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; - margin-bottom: 0px; -} - -p, td, th, div, span { - vertical-align: top; -} - -#content { - width: auto; -} - -#mainpane { - width: 100%; -} - -#serendipity_banner { - background-color: #dddddd; - border-bottom: dashed 1px #000080; - width: 100%; -} - -a.homelink1, -a.homelink1:hover, -a.homelink1:link, -a.homelink1:visited, -#serendipity_banner h1 { - color: #666666; - font-size: x-large; - font-weight: bold; - margin-top: 0px; - padding-left: 20px; - padding-top: 5px; - text-decoration: none; -} - -a.homelink2, -a.homelink2:hover, -a.homelink2:link, -a.homelink2:visited, -#serendipity_banner h2 { - color: #aaaaaa; - font-size: large; - font-weight: bold; - padding-left: 20px; - text-decoration: none; -} - -#serendipityRightSideBar { - background-color: #f0f0f0; - border-left: 1px dashed #4068ab; - border-bottom: 1px dashed #4068ab; - padding: 20px; - vertical-align: top; -} - -#serendipityLeftSideBar { - background-color: #f0f0f0; - border-right: 1px dashed #4068ab; - border-bottom: 1px dashed #4068ab; - padding: 20px; - vertical-align: top; -} - -div.serendipitySideBarTitle { - font-size: small; - font-weight: bold; - margin-bottom: 8px; -} - -div.serendipitySideBarItem { - background-color: #e6eaee; - border: 1px dashed #d0d0d0; - font-size: x-small; - margin-bottom: 12px; - padding-left: 10px; - padding-right: 10px; - padding-bottom: 10px; -} - -.serendipity_entry { - background-color: #e6eaee; - display: block; - padding-left: 20px; - padding-right: 20px; - padding-bottom: 10px; -} - -div.serendipity_Entry_Date { - background-color: #e6eaee; - border: 1px dashed #d0d0d0; - margin: 10px; - padding: 10px; - width: auto; -} - -img.serendipity_entryIcon { - float: right; - border: 0px; -} - -.serendipity_title { - border: 1px; - color: #1a3c5a; - font-weight: bold; - margin-bottom: 8px; - margin-top: 8px; - padding-left: 20px; -} - -.serendipity_title a:link, -.serendipity_title a:visited { - border: 0; - color: #000000; - text-decoration: none; -} - -.serendipity_title a:hover { - color: #cc3300; -} - -.serendipity_date { - color: #000080; - display: block; - font-weight: bold; - text-align: right; - width: 100%; -} - -.serendipity_commentsTitle { - background-color: #f2f4f6; - border: 0px; - color: #404040; - display: block; - font-size: small; - padding-left:8px; - width: 100%; -} - -.serendipity_time { - display: block; - font-size: large; - font-weight: bold; - margin-top: 8px; -} - -td.serendipity_commentsLabel { - font-size: small; - font-weight: bold; - vertical-align: top; - width: 10%; -} - -td.serendipity_comment { - color: #404040; - font-size: small; - margin-bottom: 12px; - padding-left:8px; -} - -.serendipity_comment_source { - margin-top: 5px; -} - -.serendipity_comment { - padding-top: 1em; - overflow: auto; -} - -td.serendipityEntriesBox { - background-color: #ffffff; - padding: 10px; - margin: 10px; -} - -td.serendipity_admin { - padding: 10px; -} - -table.serendipity_calendar td { - font-size: small; - padding: 3px; -} - -table.serendipity_calendar a { - font-weight: bold; - text-decoration:none; -} - -table.serendipity_calendar a:hover { - text-decoration:underline; -} - -td.serendipity_weekDayName { - background-color: #dddddd; - font-size: small; - font-weight: bold; -} - -div.serendipityPlug, div.serendipityPlug a { - font-size: small; -} - -img.serendipityImageButton { - cursor: hand; -} - -div.serendipity_admin_title { - font-size: large; - font-weight: bold; - margin-bottom: 12px; -} - -div.serendipity_admin_list_title { - font-weight: bold; - margin-bottom: 8px; -} - -td.serendipity_admin_list_item { - border: dotted 1px #d0d0d0; -} - -div.serendipity_entryFooter { - clear: both; - color: #000000; - font-size: x-small; - padding-top: 5px; - padding-bottom: 4px; -} - - -/** Embedded images with the s9y image manager **/ -.serendipity_imageComment_center, -.serendipity_imageComment_left, -.serendipity_imageComment_right { - border: 1px solid black; - background-color: #EFEFEF; - margin: 3px; -} - -.serendipity_imageComment_center { - margin: 0px; -} - -.serendipity_imageComment_left { - float: left; -} - -.serendipity_imageComment_right { - float: right; -} - -.serendipity_imageComment_img, -.serendipity_imageComment_img img { - margin: 0px; - padding: 0px; - border: 0px; - text-align: center; -} - -.serendipity_imageComment_txt { - margin: 0px; - padding: 3px; - clear: both; - font-size: 9pt; - text-align: center; -} - -.serendipity_admin_list_item_even { - background-color: #ffffff; -} - -.serendipity_admin_list_item_uneven { - background-color: #E0E0E0; -} - -.serendipity_admin_filters { - border: 1px dashed; - background-color: #FFFFFF; - font-size: 10px; - margin-bottom: 10px; - padding: 2px; -} - -.serendipity_admin_filters_headline { - border-bottom: 1px solid; - font-weight: bold; -} - -.serendipity_admin_sortorder { - font-size: 10px; - text-align: center; -} - -.serendipity_admin_sortorder input, -.serendipity_admin_sortorder select, -.serendipity_admin_filters input, -.serendipity_admin_filters select { - font-size: 10px; -} - -.serendipity_comments { -} - -.serendipity_center { - margin-left: auto; - margin-right: auto; - text-align: center; -} - -.serendipity_msg_important { - color: red; -} - -.serendipity_msg_notice { - color: green; -} - -.serendipity_entry_author_self { -} - -.serendipity_comment_author_self { - background-color: #f2f4f6; -} - - -/*** Additional plugin styles needed for the modernized output code ***/ -/*** added by Matthias 'YellowLed' Mees ***/ - -.plainList { - list-style: none; - margin-left: 0; - padding-left: 0; -} - -.container_serendipity_authors_plugin .serendipitySideBarContent div { - margin: 5px 0; - padding-left: 0; -} - -.serendipity_history_author { font-weight: bolder; } - -.serendipity_history_intro, -.serendipity_history_info { margin-bottom: 3px; } - -.serendipity_history_body { margin-bottom: 10px; } - -.serendipity_recententries_entrylink { margin-bottom: 2px; } - -.serendipity_recententries_entrydate { margin: 0 0 4px 0; } - -.plugin_comment_body { padding: 3px 0; } - -.serendipity_shoutbox_date { margin: 5px 0 2px 0; } - -.serendipity_shoutbox_comment { padding: 3px 0; } - -/*** End Additional plugin styles ***/ diff --git a/templates/bulletproof/UTF-8/lang_bg.inc.php b/templates/bulletproof/UTF-8/lang_bg.inc.php index ce2dfa72..b4a2f8e3 100644 --- a/templates/bulletproof/UTF-8/lang_bg.inc.php +++ b/templates/bulletproof/UTF-8/lang_bg.inc.php @@ -1,6 +1,6 @@ -{* standart - if you use it on a shared-s9y-installation you have to correct the path to staticpage-entries-listing.tpl *} +{* standard - if you use it on a shared-s9y-installation you have to correct the path to staticpage-entries-listing.tpl *} {serendipity_fetchPrintEntries category=$staticpage_related_category_id template="../../plugins/serendipity_event_staticpage/staticpage-entries-listing.tpl" limit=5 noSticky="true"} {* if you use your own static-entries.tpl in your template, take this: *} diff --git a/templates/bulletproof/preview_iframe.tpl b/templates/bulletproof/preview_iframe.tpl index 4623dae8..7a81d46a 100644 --- a/templates/bulletproof/preview_iframe.tpl +++ b/templates/bulletproof/preview_iframe.tpl @@ -8,19 +8,19 @@ {$CONST.SERENDIPITY_ADMIN_SUITE} - + {if $head_link_stylesheet_frontend} - + {else} {/if} diff --git a/templates/bulletproof/sidebar.tpl b/templates/bulletproof/sidebar.tpl index 1f92e17f..2cba834f 100644 --- a/templates/bulletproof/sidebar.tpl +++ b/templates/bulletproof/sidebar.tpl @@ -3,7 +3,7 @@ {/if} {foreach from=$plugindata item=item} {if $item.class == "serendipity_plugin_quicksearch" and $template_option.sitenav_quicksearch == 'true' and ($template_option.sitenavpos == 'above' or $template_option.sitenavpos == 'below')} - + {else}
          diff --git a/templates/bulletproof/style.css b/templates/bulletproof/style.css index e229f909..d899d0c8 100644 --- a/templates/bulletproof/style.css +++ b/templates/bulletproof/style.css @@ -451,7 +451,7 @@ input#serendipityQuickSearchTermField { margin-left: 10px; } -/* overide serendipitySideBarItem overflow: hidden just for sidebar quicksearch livesearch_result */ +/* override serendipitySideBarItem overflow: hidden just for sidebar quicksearch livesearch_result */ .container_serendipity_quicksearch_plugin{ overflow: visible !important; } diff --git a/templates/carl_contest/admin/img/background.png b/templates/carl_contest/admin/img/background.png deleted file mode 100755 index f676c344..00000000 Binary files a/templates/carl_contest/admin/img/background.png and /dev/null differ diff --git a/templates/carl_contest/admin/img/button_background.png b/templates/carl_contest/admin/img/button_background.png deleted file mode 100644 index d48532b2..00000000 Binary files a/templates/carl_contest/admin/img/button_background.png and /dev/null differ diff --git a/templates/carl_contest/admin/img/infobar_background.png b/templates/carl_contest/admin/img/infobar_background.png deleted file mode 100644 index 09c90775..00000000 Binary files a/templates/carl_contest/admin/img/infobar_background.png and /dev/null differ diff --git a/templates/carl_contest/admin/style.css b/templates/carl_contest/admin/style.css deleted file mode 100755 index 682fdfb9..00000000 --- a/templates/carl_contest/admin/style.css +++ /dev/null @@ -1,304 +0,0 @@ -body { - font-size: 9.5pt; - margin: 0; - padding:0; - font-size: 10px; - font-family: "trebuchet ms", "bitstream vera sans", arial, sans-serif; - background-color: #f1f6fb; - direction: {LANG_DIRECTION}; } - -#serendipity_admin_page { - text-align: center; } - -h3, h2 { - } - -#serendipityAdminBodyImageSelector { - background: #FFF; } - -#serendipityAdminFrame { - text-align: left; - width: 90%; - margin: auto; - background: #FFF; - border-top: 0; - border-right:1px solid #235587; - border-left:1px solid #235587; - border-bottom:1px solid #235587; } - -#serendipityAdminBanner { - margin: auto; - width: 100%; - height: 72px; - background-image: url({TEMPLATE_PATH}img/background.png); } - -#serendipityAdminInfopane { - background: #F8F9FA url({TEMPLATE_PATH}img/infobar_background.png); - font-size: 10px; - padding: 5px; - vertical-align: middle; - text-align: right; - color: #5E5E5E; - height: 27px; } - -#serendipityAdminMainpane { - background: #FFF; } - -.serendipityAdminContent { - font-size: 9.5pt; - padding: 10px 30px 20px 30px; - width:100%; } - -#serendipityAdminBanner h1 { - color: #333; - font-size : 20px; - padding-left:15px; - padding-top: 10px; - margin: 0px; - text-decoration: none; } - -#serendipityAdminBanner h2 { - color: #fff; - font-size: 14px; - margin: 0px; - text-decoration: none; - text-transform:none; - text-align:left; - line-height:0.85em; - border:none; - padding: 0 0 0 15px; } - - -#serendipitySideBar { - width: 170px; - padding-top: 10px; } - -#serendipityAdminFooter { - padding:0; - margin:0; } - -.serendipitySideBarTitle { - padding-left: 2px; - font-weight: bold; - font-size: 0.9em; } - -.serendipitySideBarContent { - padding-left: 10px; - font-size: 0.8em; } - -.serendipitySideBarItem { - margin-bottom: 10px; } - -.serendipity_admin_title { - font-size: 2em; - margin-bottom: 5px; } - -.serendipity_admin_list_item.serendipity_admin_list_item_uneven { - border: 1px solid #294366; - background: #F8F9FA; - margin-bottom: 5px; } - -.serendipity_admin_list_item.serendipity_admin_list_item_even { - border: 1px solid #294366; - background: #F2F3F2; - margin: 0 0 5px 0; } - -.serendipityAdminMsgError { - color: #F00; - text-align: center; - font-weight: bold; - margin: 10px; } - -.serendipityAdminMsgSuccess { - color: #0B0; - text-align: center; - font-weight: bold; - margin: 10px; } - -.serendipityAdminMsgNote { - background: #FFFF9D; - border: 1px solid #F70; - padding: 3px; - text-align: center; - margin: 10px; } - -td, th { - font-size: 0.8em; } - -a:link, a:visited, a:active { - color: #235587; - text-decoration: none; } - -a:hover { - color: #5f90ba; - text-decoration: underline; } - -input, select, textarea { - background: #F8F9FA; - font-family: Verdana; - font-size: 0.9em; - border: 1px solid #294366; } - -#serendipity_iframe { - border: 1px solid #294366; - text-align: center; - margin: auto; } - -ul.serendipitySideBarMenu { - padding: 0; - margin: 0; } - -ul.serendipitySideBarMenu { - font-size: 0.85em; - list-style: none; - width:170px; - font-weight: bold; - padding-top: 0.3em; - padding-bottom: 0.3em; - padding-left: 3px; } - -.serendipitySideBarMenuHead { - line-height:0.85em; - color: #999; - margin:10px 0 4px 0; - text-transform:lowercase; - font-size:0.9em; - border-bottom: 1px solid #ddd; - padding: 10px 0 0 10px; } - -ul.serendipitySideBarMenu li { - line-height:1.1em; - font-size: 1.0em; - font-weight: normal; - padding-top: 0.3em; - padding-bottom: 0.3em; - padding-left: 5px; - list-style:none; - margin:0; } - -ul.serendipitySideBarMenu a { - text-decoration: none; - font-weight: bold; } - -ul.serendipitySideBarMenu a:hover { - text-decoration: underline; } - -.serendipityImageButton { - cursor: pointer; } - -a:link.serendipityIconLink, -a:visited.serendipityIconLink { - border: 0; - font-weight: bold; - text-decoration: none; - margin-right: 4px; } - -.serendipityIconLink a:hover { - color: #e37235; } - -.serendipityIconLink img { - margin-right: 2px; - vertical-align: bottom; - border: 0; } - -a:link.serendipityIconLinkRight, -a:visited.serendipityIconLinkRight { - border: 0; - font-weight: bold; - text-decoration: none; - margin-left: 4px; } - -.serendipityIconLinkRight img { - margin-left: 2px; - vertical-align: bottom; - border: 0; } - -a:link.serendipityPrettyButton, -a:visited.serendipityPrettyButton, -a:hover.serendipityPrettyButton { - text-decoration: none; - color: #1D2E3F; } - -.serendipityPrettyButton { - padding: 1px; - background: url({TEMPLATE_PATH}img/button_background.png) repeat-x top; - background-color: #95accc; - color: #1D2E3F; - height: 20px; - font-weight: bold; - font-size: 0.9em; - border: 1px outset #000; - margin: 2px; } - -/* Special class if the button is a tag */ -a.serendipityPrettyButton { - padding: 2px 4px 2px 4px; - cursor: default; } - -.direction_ltr { - direction: ltr; } - -.direction_rtl { - direction: rtl; } - -.serendipity_pluginlist_header { - height: 30px; - background-color: white; - color: black; - vertical-align: middle; - padding: 10px 0px 5px 10px; } - -.serendipity_pluginlist_section { - margin:20px 0 20px 0; - padding:10px; - border:1px solid #c0c0c0; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; } - -table#serendipity_customfields { - width: 100%; } - -table#serendipity_customfields .customfield_name { - background-color: #FAFAFA; - width: 25%; - padding-left: 5px; } - -table#serendipity_customfields .customfield_value { - background-color: #FFFFFF; - width: 75%; } - -table#serendipity_customfields .customfield_value textarea { - width: 100%; - height: 100px; } - - -.serendipityAdminContent .further_links { - float: right; - font-size: 0.8em; - border: 1px solid black; -} - -.further_links p { - text-align: center; - font-weight: bold; -} - -.further_links ul { - padding: 0px; - list-style-type: none; -} - -.further_links li { - margin: 5px; - padding: 0px; -} - -#serendipityAdminBodyImageSelectorTree .serendipityAdminContent { - width: auto; -} - -#serendipityAdminBodyImageSelector .serendipityAdminContent { - width: auto; - margin: 0px; -} diff --git a/templates/carl_contest/entries.tpl b/templates/carl_contest/entries.tpl deleted file mode 100644 index 2ce8d348..00000000 --- a/templates/carl_contest/entries.tpl +++ /dev/null @@ -1,210 +0,0 @@ - - {serendipity_hookPlugin hook="entries_header" addData="$entry_id"} - {foreach from=$entries item="dategroup"} - {foreach from=$dategroup.entries item="entry"} - {assign var="entry" value=$entry scope="parent"} - - - - - - {$entry.plugin_display_dat} - - {if $is_single_entry and not $use_popups and not $is_preview} - {if $CONST.DATA_UNSUBSCRIBED} -
          {$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}

          - {/if} - - {if $CONST.DATA_TRACKBACK_DELETED} -
          {$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}

          - {/if} - - {if $CONST.DATA_TRACKBACK_APPROVED} -
          {$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}

          - {/if} - - {if $CONST.DATA_COMMENT_DELETED} -
          {$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}

          - {/if} - - {if $CONST.DATA_COMMENT_APPROVED} -
          {$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}

          - {/if} - -
          -
          - -
          {$CONST.TRACKBACKS}
          - -
          - {serendipity_printTrackbacks entry=$entry.id} -
          - {/if} - - {if $is_single_entry and not $is_preview} -
          -
          - -
          {$CONST.COMMENTS}
          -
          {$CONST.DISPLAY_COMMENTS_AS} - {if $entry.viewmode eq $CONST.VIEWMODE_LINEAR} - ({$CONST.COMMENTS_VIEWMODE_LINEAR} | {$CONST.COMMENTS_VIEWMODE_THREADED}) - {else} - ({$CONST.COMMENTS_VIEWMODE_LINEAR} | {$CONST.COMMENTS_VIEWMODE_THREADED}) - {/if} -
          -
          - {serendipity_printComments entry=$entry.id mode=$entry.viewmode} - - {if $entry.is_entry_owner} - {if $entry.allow_comments} - - {else} - - {/if} - {/if} - - - {foreach from=$comments_messagestack item="message"} -
          {$message}
          - {/foreach} - - {if $is_comment_moderate} -
          -
          {$CONST.COMMENT_ADDED}
          {$CONST.THIS_COMMENT_NEEDS_REVIEW}
          - {elseif $is_comment_added} -
          -
          {$CONST.COMMENT_ADDED}
          - {elseif not $entry.allow_comments} - -
          -
          {$CONST.COMMENTS_CLOSED}
          - - {else} - -
          -
          -
          {$CONST.ADD_COMMENT}
          - {$COMMENTFORM} -
          - - {/if} -
          - {/if} - - {$entry.backend_preview} - {/foreach} -
          - {foreachelse} - {if not $plugin_clean_page} -

          {$CONST.ADMIN_FRONTPAGE}

          -
          {$CONST.NO_ENTRIES_TO_PRINT}
          - {/if} - {/foreach} - - - diff --git a/templates/carl_contest/entries_summary.tpl b/templates/carl_contest/entries_summary.tpl deleted file mode 100644 index 949a6647..00000000 --- a/templates/carl_contest/entries_summary.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{serendipity_hookPlugin hook="entries_header"} -
          {$CONST.TOPICS_OF} {$dateRange.0|@formatTime:"%B, %Y"}
          - -
          - {foreach from=$entries item="sentries"} - {foreach from=$sentries.entries item="entry"} -

          {$entry.id} - {$entry.title|truncate:80:" ..."}

          -{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}. {$CONST.POSTED_BY} {$entry.author} {if $entry.categories} {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}{$entry_category.category_name|@escape}{/foreach}{/if}
          - {/foreach} - {/foreach} - - diff --git a/templates/carl_contest/img/back.gif b/templates/carl_contest/img/back.gif deleted file mode 100755 index d207d212..00000000 Binary files a/templates/carl_contest/img/back.gif and /dev/null differ diff --git a/templates/carl_contest/img/background.png b/templates/carl_contest/img/background.png deleted file mode 100755 index f676c344..00000000 Binary files a/templates/carl_contest/img/background.png and /dev/null differ diff --git a/templates/carl_contest/img/background_alternate.png b/templates/carl_contest/img/background_alternate.png deleted file mode 100755 index 07da89e0..00000000 Binary files a/templates/carl_contest/img/background_alternate.png and /dev/null differ diff --git a/templates/carl_contest/img/forward.gif b/templates/carl_contest/img/forward.gif deleted file mode 100755 index 2a85cb20..00000000 Binary files a/templates/carl_contest/img/forward.gif and /dev/null differ diff --git a/templates/carl_contest/img/graph_bar_horisontal.png b/templates/carl_contest/img/graph_bar_horisontal.png deleted file mode 100755 index 82102f7b..00000000 Binary files a/templates/carl_contest/img/graph_bar_horisontal.png and /dev/null differ diff --git a/templates/carl_contest/img/info_header_text_tile.gif b/templates/carl_contest/img/info_header_text_tile.gif deleted file mode 100755 index 3054f1a1..00000000 Binary files a/templates/carl_contest/img/info_header_text_tile.gif and /dev/null differ diff --git a/templates/carl_contest/img/link_blue.gif b/templates/carl_contest/img/link_blue.gif deleted file mode 100755 index 102ddc3f..00000000 Binary files a/templates/carl_contest/img/link_blue.gif and /dev/null differ diff --git a/templates/carl_contest/img/link_ltblue.gif b/templates/carl_contest/img/link_ltblue.gif deleted file mode 100755 index 41145615..00000000 Binary files a/templates/carl_contest/img/link_ltblue.gif and /dev/null differ diff --git a/templates/carl_contest/img/link_orange.gif b/templates/carl_contest/img/link_orange.gif deleted file mode 100755 index 1265914e..00000000 Binary files a/templates/carl_contest/img/link_orange.gif and /dev/null differ diff --git a/templates/carl_contest/img/xml.gif b/templates/carl_contest/img/xml.gif deleted file mode 100755 index 8f7eb6a4..00000000 Binary files a/templates/carl_contest/img/xml.gif and /dev/null differ diff --git a/templates/carl_contest/index.tpl b/templates/carl_contest/index.tpl deleted file mode 100755 index 67c05c7a..00000000 --- a/templates/carl_contest/index.tpl +++ /dev/null @@ -1,69 +0,0 @@ -{if $is_embedded != true} -{if $is_xhtml} - -{else} - -{/if} - - - - {$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if} - - -{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')} - -{else} - -{/if} -{if ($view == "entry")} - -{/if} -{if ($view == "start")} - -{/if} - - - -{if $entry_id} - -{/if} - -{serendipity_hookPlugin hook="frontend_header"} - - - -{else} -{serendipity_hookPlugin hook="frontend_header"} -{/if} - -{if $is_raw_mode != true} -
          - -{if $leftSidebarElements > 0} - -{/if} - -{if $rightSidebarElements > 0} - -{/if} - -
          {serendipity_printSidebar side="left"}{$CONTENT}{serendipity_printSidebar side="right"}
          -{/if} -{$raw_data} -{serendipity_hookPlugin hook="frontend_footer"} -{if $is_embedded != true} - - - - -{/if} diff --git a/templates/carl_contest/info.txt b/templates/carl_contest/info.txt deleted file mode 100755 index 42270afe..00000000 --- a/templates/carl_contest/info.txt +++ /dev/null @@ -1,3 +0,0 @@ -Name: Serendipity v3.0 -Author: Carl Galloway -Date: 26-01-2006 diff --git a/templates/carl_contest/plugin_calendar.tpl b/templates/carl_contest/plugin_calendar.tpl deleted file mode 100755 index 39d3a8f5..00000000 --- a/templates/carl_contest/plugin_calendar.tpl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - {foreach from=$plugin_calendar_dow item="dow"} - - {/foreach} - - - {foreach from=$plugin_calendar_weeks item="week"} - - {foreach from=$week.days item="day"} - - {/foreach} - - {/foreach} -
          -{if $plugin_calendar_head.minScroll le $plugin_calendar_head.month_date} - {$CONST.BACK} -{/if} - - {$plugin_calendar_head.month_date|formatTime:"%B '%y":false} - -{if $plugin_calendar_head.maxScroll ge $plugin_calendar_head.month_date} - {$CONST.FORWARD} -{/if} -
          {$dow.date|@formatTime:"%a":false}
          {if isset($day.properties.Active) and $day.properties.Active}{/if}{$day.name|@default:" "}{if isset($day.properties.Active) and $day.properties.Active}{/if}
          diff --git a/templates/carl_contest/preview.png b/templates/carl_contest/preview.png deleted file mode 100755 index d4b7429d..00000000 Binary files a/templates/carl_contest/preview.png and /dev/null differ diff --git a/templates/carl_contest/preview_fullsize.jpg b/templates/carl_contest/preview_fullsize.jpg deleted file mode 100644 index 559dae03..00000000 Binary files a/templates/carl_contest/preview_fullsize.jpg and /dev/null differ diff --git a/templates/carl_contest/screenshot.png b/templates/carl_contest/screenshot.png deleted file mode 100755 index ed28646b..00000000 Binary files a/templates/carl_contest/screenshot.png and /dev/null differ diff --git a/templates/carl_contest/style.css b/templates/carl_contest/style.css deleted file mode 100644 index 1dcddcfb..00000000 --- a/templates/carl_contest/style.css +++ /dev/null @@ -1,675 +0,0 @@ -/******************************************************/ -/* Theme by Carl Galloway */ -/* http://www.carlgalloway.com */ -/* This is a structured and commented version */ -/* of the serendipity blog default theme. */ -/* */ -/* Styles have been organised into the following */ -/* groups; general, header, footer, entry, comments */ -/* commentform, sidebar, calendar, image media, and */ -/* plugins. */ -/* */ -/* My comments are inside the /* */, these can */ -/* safely be deleted if you do not require them. */ -/******************************************************/ - - - - -/********* General Styles *********/ - - /* used in entry/sidebar titles */ -h4, h3 { - margin: 0; } - -/* the input boxes used in forms */ -input, textarea, select { - font-size: 10pt; } - -/* all table headers and rows */ -th, td { - font-size: 10pt; } - -/* style for lists */ -li { - list-style-position: inside; } - -/* style for blockquotes inserted into posts */ -blockquote { - margin: 15px 30px 0 15px; - padding-left: 15px; - border-left: 4px solid #2a5a8a; } - -/* all links are blue with no underline */ -a:link, a:visited, a:active { - color: #235587; - text-decoration: none; } - -/* change link color to dark blue and underline when hovered over */ -a:hover { - color: #5f90ba; - text-decoration: underline; } - -/* used when s9y needs to center something */ -.serendipity_center { - margin-left: auto; - margin-right: auto; - text-align: center; } - -/* warning messages from s9y */ -.serendipity_msg_important { - color: red; } - -/* messages letting you know something has happened eg comment saved */ -.serendipity_msg_notice { - color: green; } - -/* style to temporarily change something to grey */ -.grey { - color:#999; } - -/********* End of General Styles *********/ - - - - -/********* Structural Styles *********/ - -/* preset styles for entire blog unless overruled elsewhere, page footer is here as well */ -body { - direction: {LANG_DIRECTION}; - font-size: 0.9em; - background-color: #f1f6fb; - margin: 0; - padding:0; - font-family: "trebuchet ms", "bitstream vera sans", arial, sans-serif; } - -/* wrapper for page */ -#wrap { - width:90%; - margin:0 auto; } - -/* container for banner */ -#serendipity_banner { - margin: auto; - width: 100%; - height: 72px; - background-image: url({TEMPLATE_PATH}img/background.png); } - -/* container for content and sidebar */ -#mainpane { - border-right:1px solid #235587; - border-left:1px solid #235587; - border-bottom:1px solid #235587; - margin: 0 auto; - width: 100%; - border-top: 0px; - background-color: #FFFFFF; } - -/* container for entries column */ -#content { - padding: 0 10px 10px 10px; - margin: 0 10px 10px 10px; - width: auto; } - -/* container for right sidebar */ -#serendipityRightSideBar { - width: 170px; - padding: 0 0 0 10px; - margin:0; - vertical-align: top; } - -/* container for left sidebar */ -#serendipityLeftSideBar { - width: 170px; - padding:0 10px 0 1px; - margin:0; - vertical-align: top; } - -/* container for page footer */ -#footer { - padding:0; - margin:0; - background-color: #ecf3fd; } - -/********* End of Structural Styles *********/ - - - - -/********* Header/Banner Styles *********/ - -/* the big link in the banner, blog name/entry title */ -a.homelink1, a.homelink1:hover, a.homelink1:link, a.homelink1:visited, #serendipity_banner h1 { - color: #fff; - font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; - font-size : 20px; - padding-left:15px; - padding-top: 20px; - margin: 0px; - text-decoration: none; } - -/* the smaller link in the banner, blog description */ -a.homelink2, a.homelink2:hover, a.homelink2:link, a.homelink2:visited, #serendipity_banner h2 { - color: #fff; - padding-left: 15px; - font-size: 14px; - margin: 0px; - text-decoration: none; } - -/********* End of Header/Banner Styles *********/ - - - - -/********* Footer Styles *********/ - -/* footer paragraph text */ -#footer p { - color:#666; - text-transform:lowercase; - font-size: 9pt; - font-weight:bold; - line-height: 1.5; } - -/* make footer links blue, no underline */ -#footer a { - color:#215385; - text-decoration:none; } - -/* underline footer links when hovered over */ -#footer a:hover { - text-decoration:underline; } - -/********* End of Footer Styles *********/ - - - - - -/********* Entry Styles *********/ - -/* container for the entry/post */ -.serendipity_entry { - font-family: arial, helvetica, sans-serif; - color: #333; - font-size: 9.5pt; - font-weight: normal; - margin: 10px 0 40px 0; } - -/* container for entry title and date */ -.serendipity_Entry_Date { - clear:both; } - -/* style for the actual date below entry title */ -.serendipity_date { - text-align:right; - line-height:0.85em; - color: #999; - margin:10px 0 0 0; - text-transform:lowercase; - display:block; - font-size:.9em; - border-bottom: 1px solid #ddd; - padding: 10px 12px 0 0; } - -/* entry title */ -.serendipity_title { - font-size: medium; - font-weight: bold; - margin-top: 5px; - color: #235587; } - -/* style for the meta box title */ -.serendipity_meta_title { - font-size: small; - font-weight: bold; - margin: 0; padding:0; - color: #235587; } - -/* entry title link, regular color is black */ -.serendipity_title a:link, .serendipity_title a:visited { - text-decoration: none; - font-weight: bold; - border: 0; - background:none; - color: #235587; } - -/*entry title link when hovered over, changes to orange */ -.serendipity_title a:hover { - color: #e37235; } - -/* additional styles used for entry text */ -.serendipity_entry p { - margin-top: 0px; - padding-bottom: 0px; } - -/* style for extended body */ -.serendipity_entry_extended { - margin-top:20px; } - -/* prevent styling of the extended placeholder, otherwise the background image is visible */ -#extended { - background:none; - display:none; } - -/* the meta box that includes links to comments, trackbacks etc */ -div.serendipity_entryFooter { - margin: 0 0 10px 10px; - width:170px; - float:right; - border:1px solid #ddecfb; - background-color:#f6f8fb; - font-size: 0.8em; - color: #000000; - padding-bottom: 4px; } - -/* style for links within the page footer */ -div.serendipity_entryFooter a { - font-weight:bolder; } - -/* style for hovered over links within page footer */ -div.serendipity_entryFooter a:hover { - color: #e37235; - text-decoration:none; } - -/* styles for category icon if used */ -img.serendipity_entryIcon { - float: right; - border: 0px; - margin-top:1px; } - -/* styling the continue reading byline, needed to stop firefox making the link 100% wide */ -.continue_reading { - display:block; - margin-top:10px; - clear:left; } - -/* styling the continue reading byline link */ -.continue_reading a { - font-weight:normal; - background:none; } - -/* styling the continue reading byline when hovered over */ -.continue_reading a:hover { - color: #5f90ba; - background:none; - text-decoration: underline; } - -/* not used, but allows additional style to show author's posts in multi-author blogs */ -.serendipity_entry_author_self { - } - -/* styles for the next/previous links above footer, includes start page and archives links */ -.serendipity_pageFooter { - clear:both; - margin-top:10px; } - -/* container for summary listings in archives */ -.archive_summary { - clear:both; - margin:15px 0 0 10px; - font-size:0.9em;} - -/* style for entry title in summary archives overview */ -.archive_summary_title { - font-size: 1.0em; - font-weight: bold; - margin: 0; padding:0; } - -/********* End of Entry Styles *********/ - - - - -/********* Comment Styles *********/ - -/* container for all comments, not styled separately in default theme */ -.serendipity_comments { - } - -/* comments, trackbacks and commentform titles */ -.serendipity_commentsTitle { - font-size: medium; - font-weight: bold; - margin-top: 10px; - color: #336d9f; - clear:left; } - -/* container for individual comments */ -.serendipity_comment { - padding: 3px; } - -/* style for comment author, date commented etc */ -.serendipity_comment_source { - margin-top: 5px; - padding-left: 5px; - margin-bottom: 5px; - padding-bottom: 3px; } - -/* style for comment author if logged in */ -.serendipity_comment_author_self { - border-top:3px solid #e37235; - border-bottom:3px solid #e37235; } - -/* style for even numbered comments*/ -.comment_evenbox { - margin:0 0 20px 0; - border-top:1px solid #5f90ba; - border-bottom:1px solid #5f90ba; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; } - -/* style for odd numbered comments*/ -.comment_oddbox { - margin:0 0 20px 0; - border-top:1px solid #c0c0c0; - border-bottom:1px solid #c0c0c0; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; } - -/********* End of Comment Styles *********/ - - - -/********* Comment Form *********/ - -/* container style for entire comment form */ -.serendipity_commentForm { - font-size: 13px; - color: #404040; - margin-bottom: 13px; - margin-right: 10px; - margin-left: 10px; - background-color: #FFFFFF; } - -/* style for name, email etc fields in comments form */ -td.serendipity_commentsLabel { - font-size: 12px; - font-weight: bold; - vertical-align: top; } - -/* styles for input boxes in comments form */ -td.serendipity_commentsValue input, td.serendipity_commentsValue select, td.serendipity_commentsValue textarea { - font-size: 12px; - padding: 2px; } - -/********* End of Comment Form *********/ - - - - -/********* Sidebar Styles *********/ - -/* container style for individual sidebar blocks */ -div.serendipitySideBarContent { - padding-bottom: 12px; - margin-bottom: 12px; - font-size: 12px; - font-weight:normal; } - -/* style for each sidebar title */ -.serendipitySideBarTitle { - line-height:0.85em; - color: #999; - margin:10px 0 4px 0; - text-transform:lowercase; - display:block; - font-size:.9em; - border-bottom: 1px solid #ddd; - padding: 10px 0 0 12px; } - -/* style for the powered by sidebar entry */ -div.serendipityPlug img { - padding-left:5px; } - -/* style for the powered by link */ -div.serendipityPlug a { - text-decoration: none; - border: 0px; } - -/* style for input and select drop downs in sidebar */ -.serendipitySideBarContent input, .serendipitySideBarContent select { - width:150px; } - -/* style for side bar date eg recent entries plugin */ -.serendipitySideBarDate { - line-height:0.9em; } - -/********* End of Sidebar Styles *********/ - - - - -/********* Calendar Styles *********/ - -/* style for entire table in calendar plugin */ -table.serendipity_calendar { - border-bottom:1px solid #ddecfb; - border-left:1px solid #ddecfb; - border-right:1px solid #ddecfb; } - -/* container style for calendar table rows */ -table.serendipity_calendar td { - text-align:center; - padding: 3px; } - -/* style for calendar date links */ -table.serendipity_calendar a { - font-weight: bold; - text-decoration:none; } - -/* style for calendar links when hovered over */ -table.serendipity_calendar a:hover { - text-decoration: underline; } - -/* style for calender header row */ -.serendipity_calendarHeader {background:#235587; } - -/* styles for month name and arrows in calendar */ -td.serendipity_calendarHeader a:link, td.serendipity_calendarHeader a:visited, td.serendipity_calendarHeader a:hover { - border: 0; - color:#fff; - text-decoration: none; } - -/* style for calendar weekday names */ -td.serendipity_weekDayName { - font-size:95%!important; - font-size:90%; - font-weight:575; - color:#fff; - background:#5f90ba; } - -/* style for calendar day rows */ -td.serendipity_calendarDay { - color:#888; - font-size:90%; } - -/* separate style for today's date */ -td.Today {color: #444; text-decoration: overline; } - -/* styles for calendar days rows */ -.row1 {background: #ddecfb; } -.row2 {background: #e2eefb; } -.row3 {background: #e7f1fb; } -.row4 {background: #ecf3fb; } -.row5 {background: #f1f6fb; } -.row6 {background: #f6f8fb; } - -/********* End of Calendar Styles *********/ - - - - - -/********* Embedded images with the s9y image manager *********/ - -/* container for images and text */ -.serendipity_imageComment_center, .serendipity_imageComment_left, .serendipity_imageComment_right { - border: 1px solid #DDDDDD; - background-color: #EFEFEF; - margin: 3px; - padding: 3px; - text-align: center; } - -/* style to center image and text within entry */ -.serendipity_imageComment_center { - margin: auto; } - -/* style to left align image and text within entry */ -.serendipity_imageComment_left { - float: left; } - -/* style to right align image and text within entry */ -.serendipity_imageComment_right { - float: right; } - -/* styles for the images */ -.serendipity_imageComment_img, .serendipity_imageComment_img img { - margin: 0px; - padding: 0px; - border:none; - text-align: center; } - -/* styles for the text below the image if used */ -.serendipity_imageComment_txt { - border-top: 1px solid #DDDDDD; - margin: 0px; - padding: 3px; - clear: both; - font-size: 8pt; - text-align: center; } - -/********* End of Media Manager Styles *********/ - - - - - -/********* Plugin Styles *********/ - -/* container for search results, static page navigation and s9y no entries message */ -.serendipity_search, .staticpage_navigation, .serendipity_overview_noentries { - margin:10px 0 20px 0; - padding:10px; - border:1px solid #c0c0c0; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; - clear:both; } - -/* style for input box for quicksearch */ -#serendipityQuickSearchTermField { - width:70%; - margin-top:10px!important; - margin:0; - padding:0; } - -/* style for the seearch term and number of results using quicksearch */ -.searchterm, .searchresults {color:#235587;font-weight:bold; } - -/* style for freetag items above entries */ -.serendipity_freetag_taglist { - margin:10px 0 20px 0; - padding:15px; - font-size: 80%; - color:#505050; - border: 1px solid #c0c0c0; - background-color: #fafbfc; - line-height:1.5em; - text-align: justify; } - -/* container for freetag plugin in entry footer */ -.serendipity_freeTag { - margin-top:10px;} - -/* style for the rss feed image in freetag plugin */ -img.serendipity_freeTag_xmlButton { - border:none; - padding-left:2px; } - -/* container for karma vote plugin */ -.serendipity_karmaVoting { - margin-top: 10px; } - -/* allows additional styling for top exits text in karma plugin */ -.serendipity_karmaVoting_exits { - } - -/* style for number of top exits in karma plugin */ -.serendipity_karmaVoting_exits_num { - } - -/* style for karma plugin 'Karma for this article:' and vote links */ -.serendipity_karmaVoting_text {} - -/* style for vote links in karma plugin */ -.serendipity_karmaVoting_links { - display:block; - clear:left; } - -/* style for karma plugin text and vote line */ -.serendipity_karmaVoting_current, .serendipity_karmaVoting_visits {} - -/* style for the separator '|' in the karma plugin top exits */ -.serendipity_karmaVoting_exits_sep, .serendipity_karmaVoting br { - display:none; } - -/* container for comments plugin within sidebar */ -.container_serendipity_plugin_comments { - color:#333; } - -/* style for line break in comments plugin */ -.container_serendipity_plugin_comments br { - line-height:0.5em; } - -/* container for individual comment within sidebar */ -.plugin_comment_wrap { - display:block; - margin:15px 0 0 0; - border-top:1px solid #ddecfb; - border-bottom:1px solid #ddecfb; - background-color:#fafbfc; - color:#505050; } - -/* style for comment body within sidebar */ -.plugin_comment_body { - font-style:oblique; } - -/********* End Plugin Styles *********/ - - -/*** Additional plugin styles needed for the modernized output code ***/ -/*** added by Matthias 'YellowLed' Mees ***/ - -.plainList { - list-style: none; - margin-left: 0; - padding-left: 12px; -} - -.container_serendipity_authors_plugin .serendipitySideBarContent div { - margin: 5px 0; - padding-left: 12px; -} - -.serendipity_history_author { font-weight: bolder; } - -.serendipity_history_intro, -.serendipity_history_info { margin-bottom: 3px; } - -.serendipity_history_body { margin-bottom: 10px; } - -.serendipity_recententries_entrylink { margin-bottom: 2px; } - -.serendipity_recententries_entrydate { margin: 0 0 4px 0; } - -.plugin_comment_body { padding: 3px 0; } - -.serendipity_shoutbox_date { margin: 5px 0 2px 0; } - -.serendipity_shoutbox_comment { padding: 3px 0; } - -/*** End Additional plugin styles ***/ diff --git a/templates/clean-blog/UTF-8/lang_de.inc.php b/templates/clean-blog/UTF-8/lang_de.inc.php index a24ada38..254805a6 100644 --- a/templates/clean-blog/UTF-8/lang_de.inc.php +++ b/templates/clean-blog/UTF-8/lang_de.inc.php @@ -21,6 +21,7 @@ @define('THEME_CUSTOM_FIELD_DEFINITION','Diese optionalen Felder sind nur verfügbar, wenn dieses Theme (clean blog) verwendet wird. Das Ereignis-Plugin serendipity_event_entryproperties (Erweiterte Eigenschaften für Einträge) muss installiert sein, um diese Felder zu verwenden. Der Eintrags-Untertitel wird unter dem Titel des Eintrags ausgegeben und sollte eine kurze Zusammenfassung des Eintrags enthalten. Das Header-Bild eines Eintrags überschreibt das Standard-Header-Bild für Einträge.'); @define('THEME_ENTRY_SUBTITLE','Untertitel des Eintrags'); @define('THEME_ENTRY_HEADER_IMAGE','Header-Bild der Eintrags'); +@define('THEME_DEMO_AVAILBLE', 'Eine komplette englische Anleitung zur Konfiguration und Benutzung von Clean Blog findet sich in der Clean Blog-Demo.'); // Header Images @define('DEFAULT_HEADER_IMAGE', 'Standard-Header-Bild'); diff --git a/templates/clean-blog/archive_categories.tpl b/templates/clean-blog/archive_categories.tpl index be7337e8..0f805f6b 100644 --- a/templates/clean-blog/archive_categories.tpl +++ b/templates/clean-blog/archive_categories.tpl @@ -29,4 +29,6 @@ {assign var="prevdepth" value=$plugin_category.catdepth} {/foreach}
        +{else} +

        {$CONST.CATEGORIES_ON_ARCHIVE_DESC}

        {/if} \ No newline at end of file diff --git a/templates/clean-blog/archive_freetag.tpl b/templates/clean-blog/archive_freetag.tpl index 4db40923..8901c2b9 100644 --- a/templates/clean-blog/archive_freetag.tpl +++ b/templates/clean-blog/archive_freetag.tpl @@ -1,6 +1,10 @@ -

        {$CONST.EDITOR_TAGS}

        -
        -{foreach from=$tags key="tag_name" item="plugin_tags" name="each_tag"} - {$tag_name}{if !$smarty.foreach.each_tag.last}{/if} -{/foreach} -
        \ No newline at end of file +{if $tags} +

        {$CONST.EDITOR_TAGS}

        +
        + {foreach from=$tags key="tag_name" item="plugin_tags" name="each_tag"} + {$tag_name}{if !$smarty.foreach.each_tag.last}{/if} + {/foreach} +
        +{else} +

        {$CONST.TAGS_ON_ARCHIVE_DESC}

        +{/if} \ No newline at end of file diff --git a/templates/clean-blog/backend_templates/default_staticpage_backend.tpl b/templates/clean-blog/backend_templates/default_staticpage_backend.tpl index d57bc753..b63c80e8 100644 --- a/templates/clean-blog/backend_templates/default_staticpage_backend.tpl +++ b/templates/clean-blog/backend_templates/default_staticpage_backend.tpl @@ -129,24 +129,6 @@
        -{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE AUTHOR NAME *} -
        -
        - - - - -
        -{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE DATE *} -
        -
        - - - - -
        -
        -

        {staticpage_input item="pre_content"} @@ -212,6 +194,24 @@ {staticpage_input item="articleformat"}
        +{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE AUTHOR NAME *} +
        +
        +
        + + + + +
        +{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE DATE *} +
        +
        + + + + +
        +
        diff --git a/templates/clean-blog/config.inc.php b/templates/clean-blog/config.inc.php index db791210..73c174e0 100644 --- a/templates/clean-blog/config.inc.php +++ b/templates/clean-blog/config.inc.php @@ -70,7 +70,7 @@ $template_config = array( array( 'var' => 'theme_instructions', 'type' => 'content', - 'default' => $ep_msg . THEME_INSTRUCTIONS . '

        ' . CATEGORIES_ON_ARCHIVE_DESC . '

        ' . TAGS_ON_ARCHIVE_DESC . '

        ', + 'default' => '

        ' . THEME_DEMO_AVAILABLE . '

        ' . $ep_msg . THEME_INSTRUCTIONS . '

        ' . CATEGORIES_ON_ARCHIVE_DESC . '

        ' . TAGS_ON_ARCHIVE_DESC . '

        ', ), array( 'var' => 'default_header_image', diff --git a/templates/clean-blog/index.tpl b/templates/clean-blog/index.tpl index 1b4553a4..59591361 100644 --- a/templates/clean-blog/index.tpl +++ b/templates/clean-blog/index.tpl @@ -20,7 +20,7 @@ {/if} {* BOOTSTRAP CORE CSS *} - + {* S9Y CSS *} @@ -29,8 +29,8 @@ {/if} {* CUSTOM FONTS *} - - + + @@ -231,4 +231,4 @@ {if $is_embedded != true} -{/if} \ No newline at end of file +{/if} diff --git a/templates/clean-blog/info.txt b/templates/clean-blog/info.txt index a0b0c2b0..4c8d7ba1 100644 --- a/templates/clean-blog/info.txt +++ b/templates/clean-blog/info.txt @@ -1,5 +1,6 @@ Name: Clean Blog Author: s9y theme by Don Chambers. Original bootstrap theme by Iron Summit Media Strategies, LLC. -Date: 2015-06-18 +Date: 2016-02-02 Require Serendipity: 2.0 -Backend: No \ No newline at end of file +Backend: No +Recommended: Yes \ No newline at end of file diff --git a/templates/clean-blog/lang_de.inc.php b/templates/clean-blog/lang_de.inc.php index aabf508b..03daf334 100644 --- a/templates/clean-blog/lang_de.inc.php +++ b/templates/clean-blog/lang_de.inc.php @@ -21,6 +21,7 @@ @define('THEME_CUSTOM_FIELD_DEFINITION','Diese optionalen Felder sind nur verfügbar, wenn dieses Theme (clean blog) verwendet wird. Das Ereignis-Plugin serendipity_event_entryproperties (Erweiterte Eigenschaften für Einträge) muss installiert sein, um diese Felder zu verwenden. Der Eintrags-Untertitel wird unter dem Titel des Eintrags ausgegeben und sollte eine kurze Zusammenfassung des Eintrags enthalten. Das Header-Bild eines Eintrags überschreibt das Standard-Header-Bild für Einträge.'); @define('THEME_ENTRY_SUBTITLE','Untertitel des Eintrags'); @define('THEME_ENTRY_HEADER_IMAGE','Header-Bild der Eintrags'); +@define('THEME_DEMO_AVAILBLE', 'Eine komplette englische Anleitung zur Konfiguration und Benutzung von Clean Blog findet sich in der Clean Blog-Demo.'); // Header Images @define('DEFAULT_HEADER_IMAGE', 'Standard-Header-Bild'); diff --git a/templates/clean-blog/lang_en.inc.php b/templates/clean-blog/lang_en.inc.php index 87fa89df..3be64435 100644 --- a/templates/clean-blog/lang_en.inc.php +++ b/templates/clean-blog/lang_en.inc.php @@ -21,6 +21,8 @@ @define('THEME_CUSTOM_FIELD_DEFINITION','These optional fields are only available when using this theme (clean blog). The event plugin serendipity_event_entryproperties (extended properties for entries) must also be installed to use these fields. The Entry Subtitle field is displayed below the entry title and should be a brief post summary. The entry header image field will overide the default entry header image for this specific entry.'); @define('THEME_ENTRY_SUBTITLE','Entry Subtitle'); @define('THEME_ENTRY_HEADER_IMAGE','Entry Header Image'); +@define('THEME_DEMO_AVAILABLE', 'A complete English explanation of configuring and using Clean Blog can be found on the Clean Blog demo.'); + // Header Images @define('DEFAULT_HEADER_IMAGE', 'Default header image'); diff --git a/templates/clean-blog/plugin_staticpage.tpl b/templates/clean-blog/plugin_staticpage.tpl index 80d8b4ce..4a779756 100644 --- a/templates/clean-blog/plugin_staticpage.tpl +++ b/templates/clean-blog/plugin_staticpage.tpl @@ -43,20 +43,12 @@ {/if} {if $staticpage_navigation AND $staticpage_shownavi} - {/if} - {if $staticpage_navigation AND $staticpage_shownavi} - - {/if} + {/if} {if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true' || ($staticpage_adminlink && $staticpage_adminlink.page_user)}