1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-04-09 10:15:44 +02:00

Merge branch 'master' into gallery

This commit is contained in:
Robin Appelman 2012-10-30 22:46:51 +01:00
commit ac1caceacf
100 changed files with 686 additions and 73 deletions

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
/**
* SimplePie Version
*/
define('SIMPLEPIE_VERSION', '1.3');
define('SIMPLEPIE_VERSION', '1.3.1');
/**
* SimplePie Build
@ -636,7 +636,19 @@ class SimplePie
if (func_num_args() > 0)
{
trigger_error('Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly.');
$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
trigger_error('Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly.', $level);
$args = func_get_args();
switch (count($args)) {
case 3:
$this->set_cache_duration($args[2]);
case 2:
$this->set_cache_location($args[1]);
case 1:
$this->set_feed_url($args[0]);
$this->init();
}
}
}
@ -1263,7 +1275,7 @@ class SimplePie
// Decide whether to enable caching
if ($this->cache && $parsed_feed_url['scheme'] !== '')
{
$cache = $this->registry->call('Cache', 'create', array($this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc'));
$cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc'));
}
// Fetch the data via SimplePie_File into $this->raw_data
@ -1500,10 +1512,20 @@ class SimplePie
{
// We need to unset this so that if SimplePie::set_file() has been called that object is untouched
unset($file);
if (!($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds)))
try
{
$this->error = "A feed could not be found at $this->feed_url. A feed with an invalid mime type may fall victim to this error, or " . SIMPLEPIE_NAME . " was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.";
$this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, __FILE__, __LINE__));
if (!($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds)))
{
$this->error = "A feed could not be found at $this->feed_url. A feed with an invalid mime type may fall victim to this error, or " . SIMPLEPIE_NAME . " was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.";
$this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, __FILE__, __LINE__));
return false;
}
}
catch (SimplePie_Exception $e)
{
// This is usually because DOMDocument doesn't exist
$this->error = $e->getMessage();
$this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, $e->getFile(), $e->getLine()));
return false;
}
if ($cache)
@ -1513,7 +1535,7 @@ class SimplePie
{
trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
}
$cache = $this->registry->call('Cache', 'create', array($this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc'));
$cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc'));
}
$this->feed_url = $file->url;
}
@ -2901,6 +2923,65 @@ class SimplePie
}
}
/**
* Set the favicon handler
*
* @deprecated Use your own favicon handling instead
*/
public function set_favicon_handler($page = false, $qs = 'i')
{
$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
trigger_error('Favicon handling has been removed, please use your own handling', $level);
return false;
}
/**
* Get the favicon for the current feed
*
* @deprecated Use your own favicon handling instead
*/
public function get_favicon()
{
$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
trigger_error('Favicon handling has been removed, please use your own handling', $level);
if (($url = $this->get_link()) !== null)
{
return 'http://g.etfv.co/' . urlencode($url);
}
return false;
}
/**
* Magic method handler
*
* @param string $method Method name
* @param array $args Arguments to the method
* @return mixed
*/
public function __call($method, $args)
{
if (strpos($method, 'subscribe_') === 0)
{
$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
trigger_error('subscribe_*() has been deprecated, implement the callback yourself', $level);
return '';
}
if ($method === 'enable_xml_dump')
{
$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
trigger_error('enable_xml_dump() has been deprecated, use get_raw_data() instead', $level);
return false;
}
$class = get_class($this);
$trace = debug_backtrace();
$file = $trace[0]['file'];
$line = $trace[0]['line'];
trigger_error("Call to undefined method $class::$method() in $file on line $line", E_USER_ERROR);
}
/**
* Sorting callback for items
*

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -154,3 +154,4 @@ class SimplePie_Author
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -79,7 +79,7 @@ class SimplePie_Cache
* @param string $extension 'spi' or 'spc'
* @return SimplePie_Cache_Base Type of object depends on scheme of `$location`
*/
public static function create($location, $filename, $extension)
public static function get_handler($location, $filename, $extension)
{
$type = explode(':', $location, 2);
$type = $type[0];
@ -92,6 +92,17 @@ class SimplePie_Cache
return new SimplePie_Cache_File($location, $filename, $extension);
}
/**
* Create a new SimplePie_Cache object
*
* @deprecated Use {@see get_handler} instead
*/
public function create($location, $filename, $extension)
{
trigger_error('Cache::create() has been replaced with Cache::get_handler(). Switch to the registry system to use this.', E_USER_DEPRECATED);
return self::get_handler($location, $filename, $extension);
}
/**
* Register a handler
*

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -207,3 +207,4 @@ class SimplePie_Caption
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -154,3 +154,4 @@ class SimplePie_Category
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -329,3 +329,4 @@ class SimplePie_Content_Type_Sniffer
return 'text/html';
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -127,3 +127,4 @@ class SimplePie_Copyright
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -153,3 +153,4 @@ class SimplePie_Credit
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -614,3 +614,4 @@ class SimplePie_Decode_HTML_Entities
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -1377,3 +1377,4 @@ class SimplePie_Enclosure
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -390,8 +390,8 @@ class SimplePie_IRI
}
else
{
trigger_error('This should never happen', E_USER_ERROR);
die;
// This can occur when a paragraph is accidentally parsed as a URI
return false;
}
}
@ -824,6 +824,10 @@ class SimplePie_IRI
else
{
$parsed = $this->parse_iri((string) $iri);
if (!$parsed)
{
return false;
}
$return = $this->set_scheme($parsed['scheme'])
&& $this->set_authority($parsed['authority'])

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -2961,3 +2961,4 @@ class SimplePie_Item
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -72,11 +72,18 @@ class SimplePie_Locator
$this->timeout = $timeout;
$this->max_checked_feeds = $max_checked_feeds;
$this->dom = new DOMDocument();
if (class_exists('DOMDocument'))
{
$this->dom = new DOMDocument();
set_error_handler(array('SimplePie_Misc', 'silence_errors'));
$this->dom->loadHTML($this->file->body);
restore_error_handler();
set_error_handler(array('SimplePie_Misc', 'silence_errors'));
$this->dom->loadHTML($this->file->body);
restore_error_handler();
}
else
{
$this->dom = null;
}
}
public function set_registry(SimplePie_Registry $registry)
@ -162,6 +169,10 @@ class SimplePie_Locator
public function get_base()
{
if ($this->dom === null)
{
throw new SimplePie_Exception('DOMDocument not found, unable to use locator');
}
$this->http_base = $this->file->url;
$this->base = $this->http_base;
$elements = $this->dom->getElementsByTagName('base');
@ -169,7 +180,12 @@ class SimplePie_Locator
{
if ($element->hasAttribute('href'))
{
$this->base = $this->registry->call('Misc', 'absolutize_url', array(trim($element->getAttribute('href')), $this->http_base));
$base = $this->registry->call('Misc', 'absolutize_url', array(trim($element->getAttribute('href')), $this->http_base));
if ($base === false)
{
continue;
}
$this->base = $base;
$this->base_location = method_exists($element, 'getLineNo') ? $element->getLineNo() : 0;
break;
}
@ -196,6 +212,11 @@ class SimplePie_Locator
protected function search_elements_by_tag($name, &$done, $feeds)
{
if ($this->dom === null)
{
throw new SimplePie_Exception('DOMDocument not found, unable to use locator');
}
$links = $this->dom->getElementsByTagName($name);
foreach ($links as $link)
{
@ -216,6 +237,10 @@ class SimplePie_Locator
{
$href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->http_base));
}
if ($href === false)
{
continue;
}
if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !in_array('stylesheet', $rel) && $link->hasAttribute('type') && in_array(strtolower($this->registry->call('Misc', 'parse_mime', array($link->getAttribute('type')))), array('application/rss+xml', 'application/atom+xml'))) && !isset($feeds[$href]))
{
@ -238,6 +263,11 @@ class SimplePie_Locator
public function get_links()
{
if ($this->dom === null)
{
throw new SimplePie_Exception('DOMDocument not found, unable to use locator');
}
$links = $this->dom->getElementsByTagName('a');
foreach ($links as $link)
{
@ -255,6 +285,10 @@ class SimplePie_Locator
{
$href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->http_base));
}
if ($href === false)
{
continue;
}
$current = $this->registry->call('Misc', 'parse_url', array($this->file->url));
@ -335,3 +369,4 @@ class SimplePie_Locator
return null;
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -80,13 +80,11 @@ class SimplePie_Misc
public static function absolutize_url($relative, $base)
{
$iri = SimplePie_IRI::absolutize(new SimplePie_IRI($base), $relative);
//NOTE: this is temporary commented out to bypass issue #214: https://github.com/simplepie/simplepie/issues/214
if ( is_object( $iri ) ) {
return $iri->get_uri();
} else {
return FALSE;
if ($iri === false)
{
return false;
}
return $iri->get_uri();
}
/**
@ -277,9 +275,7 @@ class SimplePie_Misc
*/
public static function windows_1252_to_utf8($string)
{
static $convert_table = array("\x80" => "\xE2\x82\xAC", "\x81" => "\xEF\xBF\xBD", "\x82" => "\xE2\x80\x9A", "\x83" => "\xC6\x92", "\x84" => "\xE2\x80\x9E", "\x85" => "\xE2\x80\xA6", "\x86" => "\xE2\x80\xA0", "\x87" => "\xE2\x80\xA1", "\x88" => "\xCB\x86", "\x89" => "\xE2\x80\xB0", "\x8A" => "\xC5\xA0", "\x8B" => "\xE2\x80\xB9", "\x8C" => "\xC5\x92", "\x8D" => "\xEF\xBF\xBD", "\x8E" => "\xC5\xBD", "\x8F" => "\xEF\xBF\xBD", "\x90" => "\xEF\xBF\xBD", "\x91" => "\xE2\x80\x98", "\x92" => "\xE2\x80\x99", "\x93" => "\xE2\x80\x9C", "\x94" => "\xE2\x80\x9D", "\x95" => "\xE2\x80\xA2", "\x96" => "\xE2\x80\x93", "\x97" => "\xE2\x80\x94", "\x98" => "\xCB\x9C", "\x99" => "\xE2\x84\xA2", "\x9A" => "\xC5\xA1", "\x9B" => "\xE2\x80\xBA", "\x9C" => "\xC5\x93", "\x9D" => "\xEF\xBF\xBD", "\x9E" => "\xC5\xBE", "\x9F" => "\xC5\xB8", "\xA0" => "\xC2\xA0", "\xA1" => "\xC2\xA1", "\xA2" => "\xC2\xA2", "\xA3" => "\xC2\xA3", "\xA4" => "\xC2\xA4", "\xA5" => "\xC2\xA5", "\xA6" => "\xC2\xA6", "\xA7" => "\xC2\xA7", "\xA8" => "\xC2\xA8", "\
xA9" => "\xC2\xA9", "\xAA" => "\xC2\xAA", "\xAB" => "\xC2\xAB", "\xAC" => "\xC2\xAC", "\xAD" => "\xC2\xAD", "\xAE" => "\xC2\xAE", "\xAF" => "\xC2\xAF", "\xB0" => "\xC2\xB0", "\xB1" => "\xC2\xB1", "\xB2" => "\xC2\xB2", "\xB3" => "\xC2\xB3", "\xB4" => "\xC2\xB4", "\xB5" => "\xC2\xB5", "\xB6" => "\xC2\xB6", "\xB7" => "\xC2\xB7", "\xB8" => "\xC2\xB8", "\xB9" => "\xC2\xB9", "\xBA" => "\xC2\xBA", "\xBB" => "\xC2\xBB", "\xBC" => "\xC2\xBC", "\xBD" => "\xC2\xBD", "\xBE" => "\xC2\xBE", "\xBF" => "\xC2\xBF", "\xC0" => "\xC3\x80", "\xC1" => "\xC3\x81", "\xC2" => "\xC3\x82", "\xC3" => "\xC3\x83", "\xC4" => "\xC3\x84", "\xC5" => "\xC3\x85", "\xC6" => "\xC3\x86", "\xC7" => "\xC3\x87", "\xC8" => "\xC3\x88", "\xC9" => "\xC3\x89", "\xCA" => "\xC3\x8A", "\xCB" => "\xC3\x8B", "\xCC" => "\xC3\x8C", "\xCD" => "\xC3\x8D", "\xCE" => "\xC3\x8E", "\xCF" => "\xC3\x8F", "\xD0" => "\xC3\x90", "\xD1" => "\xC3\x91", "\xD2" => "\xC3\x92", "\xD3" => "\xC3\x93", "\xD4" => "\xC3\x94", "\xD5" => "\xC3\x95", "\xD6" => "\xC3\x96", "\xD7" => "\
xC3\x97", "\xD8" => "\xC3\x98", "\xD9" => "\xC3\x99", "\xDA" => "\xC3\x9A", "\xDB" => "\xC3\x9B", "\xDC" => "\xC3\x9C", "\xDD" => "\xC3\x9D", "\xDE" => "\xC3\x9E", "\xDF" => "\xC3\x9F", "\xE0" => "\xC3\xA0", "\xE1" => "\xC3\xA1", "\xE2" => "\xC3\xA2", "\xE3" => "\xC3\xA3", "\xE4" => "\xC3\xA4", "\xE5" => "\xC3\xA5", "\xE6" => "\xC3\xA6", "\xE7" => "\xC3\xA7", "\xE8" => "\xC3\xA8", "\xE9" => "\xC3\xA9", "\xEA" => "\xC3\xAA", "\xEB" => "\xC3\xAB", "\xEC" => "\xC3\xAC", "\xED" => "\xC3\xAD", "\xEE" => "\xC3\xAE", "\xEF" => "\xC3\xAF", "\xF0" => "\xC3\xB0", "\xF1" => "\xC3\xB1", "\xF2" => "\xC3\xB2", "\xF3" => "\xC3\xB3", "\xF4" => "\xC3\xB4", "\xF5" => "\xC3\xB5", "\xF6" => "\xC3\xB6", "\xF7" => "\xC3\xB7", "\xF8" => "\xC3\xB8", "\xF9" => "\xC3\xB9", "\xFA" => "\xC3\xBA", "\xFB" => "\xC3\xBB", "\xFC" => "\xC3\xBC", "\xFD" => "\xC3\xBD", "\xFE" => "\xC3\xBE", "\xFF" => "\xC3\xBF");
static $convert_table = array("\x80" => "\xE2\x82\xAC", "\x81" => "\xEF\xBF\xBD", "\x82" => "\xE2\x80\x9A", "\x83" => "\xC6\x92", "\x84" => "\xE2\x80\x9E", "\x85" => "\xE2\x80\xA6", "\x86" => "\xE2\x80\xA0", "\x87" => "\xE2\x80\xA1", "\x88" => "\xCB\x86", "\x89" => "\xE2\x80\xB0", "\x8A" => "\xC5\xA0", "\x8B" => "\xE2\x80\xB9", "\x8C" => "\xC5\x92", "\x8D" => "\xEF\xBF\xBD", "\x8E" => "\xC5\xBD", "\x8F" => "\xEF\xBF\xBD", "\x90" => "\xEF\xBF\xBD", "\x91" => "\xE2\x80\x98", "\x92" => "\xE2\x80\x99", "\x93" => "\xE2\x80\x9C", "\x94" => "\xE2\x80\x9D", "\x95" => "\xE2\x80\xA2", "\x96" => "\xE2\x80\x93", "\x97" => "\xE2\x80\x94", "\x98" => "\xCB\x9C", "\x99" => "\xE2\x84\xA2", "\x9A" => "\xC5\xA1", "\x9B" => "\xE2\x80\xBA", "\x9C" => "\xC5\x93", "\x9D" => "\xEF\xBF\xBD", "\x9E" => "\xC5\xBE", "\x9F" => "\xC5\xB8", "\xA0" => "\xC2\xA0", "\xA1" => "\xC2\xA1", "\xA2" => "\xC2\xA2", "\xA3" => "\xC2\xA3", "\xA4" => "\xC2\xA4", "\xA5" => "\xC2\xA5", "\xA6" => "\xC2\xA6", "\xA7" => "\xC2\xA7", "\xA8" => "\xC2\xA8", "\xA9" => "\xC2\xA9", "\xAA" => "\xC2\xAA", "\xAB" => "\xC2\xAB", "\xAC" => "\xC2\xAC", "\xAD" => "\xC2\xAD", "\xAE" => "\xC2\xAE", "\xAF" => "\xC2\xAF", "\xB0" => "\xC2\xB0", "\xB1" => "\xC2\xB1", "\xB2" => "\xC2\xB2", "\xB3" => "\xC2\xB3", "\xB4" => "\xC2\xB4", "\xB5" => "\xC2\xB5", "\xB6" => "\xC2\xB6", "\xB7" => "\xC2\xB7", "\xB8" => "\xC2\xB8", "\xB9" => "\xC2\xB9", "\xBA" => "\xC2\xBA", "\xBB" => "\xC2\xBB", "\xBC" => "\xC2\xBC", "\xBD" => "\xC2\xBD", "\xBE" => "\xC2\xBE", "\xBF" => "\xC2\xBF", "\xC0" => "\xC3\x80", "\xC1" => "\xC3\x81", "\xC2" => "\xC3\x82", "\xC3" => "\xC3\x83", "\xC4" => "\xC3\x84", "\xC5" => "\xC3\x85", "\xC6" => "\xC3\x86", "\xC7" => "\xC3\x87", "\xC8" => "\xC3\x88", "\xC9" => "\xC3\x89", "\xCA" => "\xC3\x8A", "\xCB" => "\xC3\x8B", "\xCC" => "\xC3\x8C", "\xCD" => "\xC3\x8D", "\xCE" => "\xC3\x8E", "\xCF" => "\xC3\x8F", "\xD0" => "\xC3\x90", "\xD1" => "\xC3\x91", "\xD2" => "\xC3\x92", "\xD3" => "\xC3\x93", "\xD4" => "\xC3\x94", "\xD5" => "\xC3\x95", "\xD6" => "\xC3\x96", "\xD7" => "\xC3\x97", "\xD8" => "\xC3\x98", "\xD9" => "\xC3\x99", "\xDA" => "\xC3\x9A", "\xDB" => "\xC3\x9B", "\xDC" => "\xC3\x9C", "\xDD" => "\xC3\x9D", "\xDE" => "\xC3\x9E", "\xDF" => "\xC3\x9F", "\xE0" => "\xC3\xA0", "\xE1" => "\xC3\xA1", "\xE2" => "\xC3\xA2", "\xE3" => "\xC3\xA3", "\xE4" => "\xC3\xA4", "\xE5" => "\xC3\xA5", "\xE6" => "\xC3\xA6", "\xE7" => "\xC3\xA7", "\xE8" => "\xC3\xA8", "\xE9" => "\xC3\xA9", "\xEA" => "\xC3\xAA", "\xEB" => "\xC3\xAB", "\xEC" => "\xC3\xAC", "\xED" => "\xC3\xAD", "\xEE" => "\xC3\xAE", "\xEF" => "\xC3\xAF", "\xF0" => "\xC3\xB0", "\xF1" => "\xC3\xB1", "\xF2" => "\xC3\xB2", "\xF3" => "\xC3\xB3", "\xF4" => "\xC3\xB4", "\xF5" => "\xC3\xB5", "\xF6" => "\xC3\xB6", "\xF7" => "\xC3\xB7", "\xF8" => "\xC3\xB8", "\xF9" => "\xC3\xB9", "\xFA" => "\xC3\xBA", "\xFB" => "\xC3\xBB", "\xFC" => "\xC3\xBC", "\xFD" => "\xC3\xBD", "\xFE" => "\xC3\xBE", "\xFF" => "\xC3\xBF");
return strtr($string, $convert_table);
}
@ -2248,3 +2244,4 @@ function embed_wmedia(width, height, link) {
// No-op
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -980,3 +980,4 @@ class SimplePie_Parse_Date
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -278,8 +278,12 @@ class SimplePie_Parser
if (isset($attribs[SIMPLEPIE_NAMESPACE_XML]['base']))
{
$this->xml_base[] = $this->registry->call('Misc', 'absolutize_url', array($attribs[SIMPLEPIE_NAMESPACE_XML]['base'], end($this->xml_base)));
$this->xml_base_explicit[] = true;
$base = $this->registry->call('Misc', 'absolutize_url', array($attribs[SIMPLEPIE_NAMESPACE_XML]['base'], end($this->xml_base)));
if ($base !== false)
{
$this->xml_base[] = $base;
$this->xml_base_explicit[] = true;
}
}
else
{

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -203,6 +203,22 @@ class SimplePie_Registry
{
$class = $this->get_class($type);
if (in_array($class, $this->legacy))
{
switch ($type)
{
case 'Cache':
// For backwards compatibility with old non-static
// Cache::create() methods
if ($method === 'get_handler')
{
$result = @call_user_func_array(array($class, 'create'), $parameters);
return $result;
}
break;
}
}
$result = call_user_func_array(array($class, $method), $parameters);
return $result;
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -302,7 +302,7 @@ class SimplePie_Sanitize
if ($img->hasAttribute('src'))
{
$image_url = call_user_func($this->cache_name_function, $img->getAttribute('src'));
$cache = $this->registry->call('Cache', 'create', array($this->cache_location, $image_url, 'spi'));
$cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, $image_url, 'spi'));
if ($cache->load())
{
@ -356,7 +356,11 @@ class SimplePie_Sanitize
if ($type & SIMPLEPIE_CONSTRUCT_IRI)
{
$data = $this->registry->call('Misc', 'absolutize_url', array($data, $base));
$absolute = $this->registry->call('Misc', 'absolutize_url', array($data, $base));
if ($absolute !== false)
{
$data = $absolute;
}
}
if ($type & (SIMPLEPIE_CONSTRUCT_TEXT | SIMPLEPIE_CONSTRUCT_IRI))
@ -412,7 +416,10 @@ class SimplePie_Sanitize
if ($element->hasAttribute($attribute))
{
$value = $this->registry->call('Misc', 'absolutize_url', array($element->getAttribute($attribute), $this->base));
$element->setAttribute($attribute, $value);
if ($value !== false)
{
$element->setAttribute($attribute, $value);
}
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@ -608,3 +608,4 @@ class SimplePie_Source
}
}
}

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.3
* @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon

View File

@ -28,6 +28,8 @@ OC::$CLASSPATH['OC_Search_Provider_News'] = 'apps/news/lib/search.php';
OC::$CLASSPATH['OCA\News\Backgroundjob'] = 'apps/news/lib/backgroundjob.php';
OCP\Backgroundjob::addRegularTask( 'OCA\News\Backgroundjob', 'run' );
OC::$CLASSPATH['OCA\News\Share_Backend_News_Item'] = 'apps/news/lib/share/item.php';
OCP\App::addNavigationEntry( array(
'id' => 'news',
'order' => 74,
@ -37,3 +39,5 @@ OCP\App::addNavigationEntry( array(
));
OC_Search::registerProvider('OC_Search_Provider_News');
OCP\Share::registerBackend('news_item', 'OCA\News\Share_Backend_News_Item');

View File

@ -664,15 +664,20 @@ div.add_parentfolder {
.feed_item:hover .secondary_item_utils {
display: block;
}
}
/*
.feed_item a.share {
background:url('%webroot%/core/img/actions/share.svg') no-repeat center;
}
*/
.feed_item:hover .secondary_item_utils li.keep_unread {
cursor: pointer;
}
.feed_item .secondary_item_utils li input[type=checkbox]{
}
/* dialog/menues */
#addfolder_dialog, #addfeed_dialog, #changefolder_dialog {

View File

@ -346,6 +346,7 @@ var News = News || {};
}
});
break;
}
return pairs;
};

View File

@ -51,11 +51,8 @@ News.Settings={
});
},
exportOpml:function(button){
$(button).attr("disabled", true);
$(button).prop('value', t('news', 'Downloading...'));
document.location.href = OC.linkTo('news', 'opmlexporter.php');
$(button).prop('value', t('news', 'Download'));
$(button).attr("disabled", false);
$('#appsettings_popup').remove();
}
}

10
l10n/ar.php Normal file
View File

@ -0,0 +1,10 @@
<?php $TRANSLATIONS = array(
"Import" => "إدخال",
"Download" => "انزال",
"Address" => "عنوان",
"Upload" => "إرفع",
"Folder" => "مجلد",
"Settings" => "تعديلات",
"Add" => "أدخل",
"Share" => "شارك"
);

9
l10n/bg_BG.php Normal file
View File

@ -0,0 +1,9 @@
<?php $TRANSLATIONS = array(
"Error" => "Грешка",
"Import" => "Внасяне",
"Download" => "Изтегляне",
"Address" => "Адрес",
"Folder" => "Папка",
"Add" => "Добавяне",
"Share" => "Споделяне"
);

View File

@ -84,6 +84,7 @@
"Mark as important" => "Marca com a important",
"from" => "des de",
"by" => "per",
"Share" => "Comparteix",
"Keep unread" => "Mantén com a sense llegir",
"Delete feed" => "Elimina font",
"Collapse" => "Col·lapsa",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Označit jako důležité",
"from" => "z",
"by" => "od",
"Share" => "Sdílet",
"Keep unread" => "Ponechat nepřečteno",
"Delete feed" => "Smazat kanál",
"Collapse" => "Svinout",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Markér som vigtig",
"from" => "fra",
"by" => "af",
"Share" => "Del",
"Keep unread" => "Behold ulæste",
"Delete feed" => "Slet feed",
"Collapse" => "Sammenfold",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Als wichtig kennzeichnen",
"from" => "von",
"by" => "von",
"Share" => "Teilen",
"Keep unread" => "Ungelesenes behalten",
"Delete feed" => "Feed löschen",
"Collapse" => "Zuklappen",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Als wichtig kennzeichnen",
"from" => "von",
"by" => "von",
"Share" => "Teilen",
"Keep unread" => "Ungelesenes behalten",
"Delete feed" => "Feed löschen",
"Collapse" => "Zuklappen",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Σήμανση ως σημαντικού",
"from" => "από",
"by" => "από",
"Share" => "Διαμοιρασμός",
"Keep unread" => "Διατήρηση αδιάβαστου",
"Delete feed" => "Διαγραφή ροής",
"Collapse" => "Σύμπτυξη",

View File

@ -79,7 +79,9 @@
"Mark all read" => "Marki ĉion kiel legita",
"Mark as unimportant" => "Marki kiel negrava",
"Mark as important" => "Marki kiel grava",
"from" => "el",
"by" => "de",
"Share" => "Kunhavigi",
"Keep unread" => "Lasi legota",
"Delete feed" => "Forigi fluon",
"Collapse" => "Maletendi",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Marcar como importante",
"from" => "desde",
"by" => "por",
"Share" => "Compartir",
"Keep unread" => "Dejar como no leido",
"Delete feed" => "Eliminar fuente",
"Collapse" => "Colapsar",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Marcar como importante",
"from" => "de",
"by" => "por",
"Share" => "Compartir",
"Keep unread" => "Mantener como no leido",
"Delete feed" => "Borrar fuente",
"Collapse" => "Colapsar",

View File

@ -19,9 +19,12 @@
"Error updating feed." => "Viga uudisvoo uuendamisel.",
"Feed updated!" => "Uudisvoog on uuendatud!",
"News" => "Uudised",
"Error while loading the feed" => "Viga uudisvoo laadimisel",
"Error" => "Viga",
"None" => "Pole",
"Show only unread" => "Näita ainult lugemata",
"Show everything" => "Näita kõike",
"Warning" => "Hoiatus",
"Name of the folder cannot be empty." => "Kausta nimi ei saa olla tühi.",
"Adding..." => "Lisamine...",
"Add folder" => "Lisa kaust",
@ -78,6 +81,7 @@
"Mark as unimportant" => "Märgi mitteoluliseks",
"Mark as important" => "Märgi oluliseks",
"by" => "lisas",
"Share" => "Jaga",
"Keep unread" => "Hoia kui lugemata",
"Delete feed" => "Kustuta uudisvoog",
"Collapse" => "Sulge",

View File

@ -81,7 +81,9 @@
"Starred" => "Izardunak",
"Mark as unimportant" => "Markatu garrantzigabekoa",
"Mark as important" => "Markatu garrantzitsua",
"from" => "lekua",
"by" => "egilea",
"Share" => "Elkarbanatu",
"Keep unread" => "Mantendu irakurri gabea",
"Delete feed" => "Ezabatu iturburua",
"Collapse" => "Tolestu",

14
l10n/fa.php Normal file
View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "پرونده وجود ندارد",
"Error" => "خطا",
"None" => "هیچ‌کدام",
"Warning" => "اخطار",
"Import" => "وارد کردن",
"Download" => "بارگیری",
"Address" => "آدرس",
"Upload" => "بارگزاری",
"Folder" => "پوشه",
"Settings" => "تنظیمات",
"Add" => "افزودن",
"Share" => "اشتراک‌گزاری"
);

View File

@ -18,7 +18,9 @@
"Error updating feed." => "Virhe syötettä päivittäessä.",
"Feed updated!" => "Syöte päivitetty!",
"News" => "Uutiset",
"Error while loading the feed" => "Virhe syötettä ladatessa.",
"Error" => "Virhe",
"None" => "Ei mitään",
"Show only unread" => "Näytä vain lukemattomat",
"Show everything" => "Näytä kaikki",
"Are you sure you want to delete this feed?" => "Haluatko varmasti poistaa tämän syötteen?",
@ -79,7 +81,9 @@
"Starred" => "Tähdellä varustettu",
"Mark as unimportant" => "Merkitse ei-tärkeäksi",
"Mark as important" => "Merkitse tärkeäksi",
"from" => "lähettäjältä",
"by" => "kirjoittajalta",
"Share" => "Jaa",
"Keep unread" => "Pidä ei-luettuna",
"Delete feed" => "Poista syöte",
"Collapse" => "Kutista näkymää",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Marquer comme important",
"from" => "de",
"by" => "par",
"Share" => "Partager",
"Keep unread" => "Garder non lu",
"Delete feed" => "Supprimer le flux",
"Collapse" => "Replier",

View File

@ -20,6 +20,7 @@
"Feed updated!" => "Fonte actualizada!",
"News" => "Novas",
"Error" => "Erro",
"None" => "Nada",
"Show only unread" => "Amosar so o non lido",
"Show everything" => "Amosar todo",
"Are you sure you want to delete this feed?" => "Está seguro de querer borrar esta fonte?",
@ -81,6 +82,7 @@
"Mark as unimportant" => "Marcar como non importante",
"Mark as important" => "Marcar como importante",
"by" => "por",
"Share" => "Compartir",
"Keep unread" => "Manter sen ler",
"Delete feed" => "Eliminar fonte",
"Collapse" => "Pechar",

12
l10n/he.php Normal file
View File

@ -0,0 +1,12 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "קובץ לא קיים:",
"Error" => "שגיאה",
"Import" => "יבא",
"Download" => "הורדה",
"Address" => "כתובת",
"Upload" => "העלאה",
"Folder" => "תיקייה",
"Settings" => "הגדרות",
"Add" => "הוספה",
"Share" => "שתף"
);

12
l10n/hr.php Normal file
View File

@ -0,0 +1,12 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "Datoteka ne postoji:",
"Error" => "Greška",
"Import" => "Uvezi",
"Download" => "Preuzimanje",
"Address" => "Adresa",
"Upload" => "Učitaj",
"Folder" => "mapa",
"Settings" => "Postavke",
"Add" => "Dodaj",
"Share" => "Podijeli"
);

14
l10n/hu_HU.php Normal file
View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "A fájl nem létezik:",
"Error" => "Hiba",
"None" => "Egyik sem",
"Warning" => "Figyelmeztetés",
"Import" => "Import",
"Download" => "Letöltés",
"Address" => "Cím",
"Upload" => "Feltöltés",
"Folder" => "Mappa",
"Settings" => "Beállítások",
"Add" => "Hozzáad",
"Share" => "Megosztás"
);

10
l10n/ia.php Normal file
View File

@ -0,0 +1,10 @@
<?php $TRANSLATIONS = array(
"Import" => "Importar",
"Download" => "Discargar",
"Address" => "Adresse",
"Upload" => "Incargar",
"Folder" => "Dossier",
"Settings" => "Configurationes",
"Add" => "Adder",
"Share" => "Compartir"
);

View File

@ -5,8 +5,10 @@
"Error marking item as read." => "kesalahan menandai item sebagai terbaca",
"News" => "berita",
"Error" => "kesalahan",
"None" => "tidak ada",
"Show only unread" => "tampilkan yang belum dibaca saja",
"Show everything" => "tampilkan semua",
"Warning" => "peringatan",
"Adding..." => "menambahkan...",
"Add folder" => "tambah berkas",
"URL cannot be empty." => "tautan tidak boleh kosong",
@ -21,6 +23,11 @@
"no title" => "tidak ada judul",
"no name" => "tidak bernama",
"no body" => "tidak berisi",
"Address" => "alamat",
"Folder" => "Folder",
"Settings" => "pengaturan",
"Add" => "tambah",
"New articles" => "artikel baru",
"Starred" => "dibintangi"
"Starred" => "dibintangi",
"Share" => "berbagi"
);

View File

@ -84,6 +84,7 @@
"Mark as important" => "Marca come importante",
"from" => "da",
"by" => "di",
"Share" => "Condividi",
"Keep unread" => "Mantieni non letto",
"Delete feed" => "Elimina la fonte",
"Collapse" => "Contrai",

View File

@ -84,6 +84,7 @@
"Mark as important" => "重要マークを付ける",
"from" => "送信元",
"by" => "により",
"Share" => "共有",
"Keep unread" => "未読のままにする",
"Delete feed" => "フィードを削除",
"Collapse" => "折りたたむ",

12
l10n/ka_GE.php Normal file
View File

@ -0,0 +1,12 @@
<?php $TRANSLATIONS = array(
"Error" => "შეცდომა",
"Warning" => "გაფრთხილება",
"Import" => "იმპორტი",
"Download" => "ჩამოტვირთვა",
"Address" => "მისამართი",
"Upload" => "ატვირთვა",
"Folder" => "საქაღალდე",
"Settings" => "პარამეტრები",
"Add" => "დამატება",
"Share" => "გაზიარება"
);

13
l10n/ko.php Normal file
View File

@ -0,0 +1,13 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "파일이 존재하지 않습니다. ",
"Error" => "에러",
"Warning" => "경고",
"Import" => "가져오기",
"Download" => "다운로드",
"Address" => "주소",
"Upload" => "업로드",
"Folder" => "폴더",
"Settings" => "설정",
"Add" => "추가",
"Share" => "공유"
);

12
l10n/lb.php Normal file
View File

@ -0,0 +1,12 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "Fichier existéiert net:",
"Error" => "Fehler",
"Warning" => "Warnung",
"Import" => "Import",
"Download" => "Download",
"Address" => "Adress",
"Folder" => "Dossier",
"Settings" => "Astellungen",
"Add" => "Dobäisetzen",
"Share" => "Deelen"
);

View File

@ -1,20 +1,27 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "Failas neegzistuoja:",
"News" => "Naujienos",
"Error" => "Klaida",
"None" => "Nieko",
"Warning" => "Įspėjimas",
"Adding..." => "PRodedama...",
"Add folder" => "Pridėti katalogą",
"File " => "Failas",
"Importing..." => "Importuojama...",
"Import" => "Importuoti",
"Downloading..." => "Atsiunčiama...",
"Download" => "Atsisiųsti",
"Address" => "Adresas",
"Subscribe" => "Prenumeruoti",
"Import OPML" => "Importuoti OPML",
"Upload" => "Įkelti",
"Folder" => "Katalogas",
"Settings" => "Nustatymai",
"Add Folder" => "Pridėti katalogą",
"Folder name" => "Katalogo pavadinimas",
"Choose folder" => "Pasirinkite katalogą",
"Add" => "Pridėti",
"Share" => "Dalintis",
"Delete folder" => "Ištrinti katalogą",
"Rename folder" => "Pervadinti katalogą",
"Download OPML" => "Atsisiųsti OPML"

8
l10n/lv.php Normal file
View File

@ -0,0 +1,8 @@
<?php $TRANSLATIONS = array(
"Error" => "Kļūme",
"Download" => "Lejuplādēt",
"Upload" => "Augšuplādet",
"Folder" => "Mape",
"Settings" => "Iestatījumi",
"Share" => "Līdzdalīt"
);

13
l10n/mk.php Normal file
View File

@ -0,0 +1,13 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "Не постои датотеката:",
"Error" => "Грешка",
"Warning" => "Предупредување",
"Import" => "Внеси",
"Download" => "Преземање",
"Address" => "Адреса",
"Upload" => "Подигни",
"Folder" => "Папка",
"Settings" => "Параметри",
"Add" => "Додади",
"Share" => "Сподели"
);

13
l10n/ms_MY.php Normal file
View File

@ -0,0 +1,13 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "Fail tidak wujud:",
"Error" => "Ralat",
"Warning" => "Amaran",
"Import" => "Import",
"Download" => "Muat turun",
"Address" => "Alamat",
"Upload" => "Muat naik",
"Folder" => "Folder",
"Settings" => "Tetapan",
"Add" => "Tambah",
"Share" => "Kongsi"
);

View File

@ -14,9 +14,14 @@
"Error updating feed." => "Kunne ikke oppdatere nyhetskilde.",
"Feed updated!" => "Nyhetskilde oppdatert!",
"News" => "Nyheter",
"Error while loading the feed" => "Kunne ikke laste nyhetskilden",
"Error" => "Feil",
"None" => "Ingen",
"Show only unread" => "Vis kun uleste",
"Show everything" => "Vis alt",
"Are you sure you want to delete this feed?" => "Er du sikker på at du vil slette denne nyhetskilden?",
"Are you sure you want to delete this folder and all its feeds?" => "Er du sikker på at du vil slette mappen og alt dets innhold?",
"Warning" => "Advarsel",
"Name of the folder cannot be empty." => "Mappenavnet kan ikke være tomt.",
"Adding..." => "Legger til...",
"Add folder" => "Legg til mappe",
@ -60,7 +65,9 @@
"Starred" => "Merket",
"Mark as unimportant" => "Merk som uviktig",
"Mark as important" => "Merk som viktig",
"from" => "fra",
"by" => "av",
"Share" => "Del",
"Keep unread" => "Merk som ulest",
"Delete feed" => "Slett nyhetskilden",
"Delete folder" => "Slett mappe",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Markeer als belangrijk",
"from" => "van",
"by" => "door ",
"Share" => "Delen",
"Keep unread" => "Bewaar ongelezen",
"Delete feed" => "Verwijder feed",
"Collapse" => "Inklappen",

10
l10n/nn_NO.php Normal file
View File

@ -0,0 +1,10 @@
<?php $TRANSLATIONS = array(
"Error" => "Feil",
"Import" => "Importer",
"Download" => "Last ned",
"Address" => "Adresse",
"Upload" => "Last opp",
"Folder" => "Mappe",
"Settings" => "Innstillingar",
"Add" => "Legg til"
);

10
l10n/oc.php Normal file
View File

@ -0,0 +1,10 @@
<?php $TRANSLATIONS = array(
"Error" => "Error",
"Import" => "Importa",
"Download" => "Avalcarga",
"Upload" => "Amontcarga",
"Folder" => "Dorsièr",
"Settings" => "Configuracion",
"Add" => "Ajusta",
"Share" => "Parteja"
);

View File

@ -84,6 +84,7 @@
"Mark as important" => "Oznacz jako ważne",
"from" => "z",
"by" => "przez",
"Share" => "Udostępnij",
"Keep unread" => "Pozostaw nieprzeczytane",
"Delete feed" => "Usuń feed",
"Collapse" => "Zwiń",

3
l10n/pl_PL.php Normal file
View File

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Settings" => "Ustawienia"
);

View File

@ -84,6 +84,7 @@
"Mark as important" => "Marcar como importante",
"from" => "de",
"by" => "por",
"Share" => "Compartilhar",
"Keep unread" => "Manter não lido",
"Delete feed" => "Excluir feed",
"Collapse" => "Retrair",

View File

@ -63,6 +63,7 @@
"Mark as important" => "Marcar como importante",
"from" => "de",
"by" => "por",
"Share" => "Partilhar",
"Keep unread" => "Manter como não lido",
"Collapse" => "Expandir",
"Delete folder" => "Apagar pasta",

View File

@ -16,6 +16,7 @@
"Feed updated!" => "Fluxul a fost actualizat!",
"News" => "Noutăți",
"Error" => "Eroare",
"None" => "Niciuna",
"Show only unread" => "Arată doar necitite",
"Show everything" => "Arată tot",
"Are you sure you want to delete this feed?" => "Sigur vrei să ștergi acest flux?",
@ -46,6 +47,7 @@
"You had already subcribed to this feed!" => "Ești deja abonat la acest flux!",
"Address" => "Adresă",
"Subscribe" => "Abonare",
"Upload" => "Încărcare",
"Add feed or folder" => "Adaugă flux sau director",
"Add Feed/Folder" => "Adaugă flux/director",
"Feed" => "Flux",
@ -62,6 +64,7 @@
"Mark as unimportant" => "Marchează ca neimportant",
"Mark as important" => "Marchează ca important",
"by" => "de",
"Share" => "Partajează",
"Keep unread" => "Păstrează necitite",
"Delete feed" => "Șterge flux",
"Collapse" => "Restrânge",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Пометить как важное",
"from" => "из",
"by" => "от",
"Share" => "Открыть доступ",
"Keep unread" => "Оставить непрочитанным",
"Delete feed" => "Удалить ленту",
"Collapse" => "Свернуть",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Отметить как важное",
"from" => "из",
"by" => "к",
"Share" => "Сделать общим",
"Keep unread" => "Оставить непрочитанным",
"Delete feed" => "Удалить поток",
"Collapse" => "Свернуть",

View File

@ -73,6 +73,7 @@
"Mark as important" => "වැදගත් යයි ලකුණු කරන්න",
"from" => "වෙතින්",
"by" => "විසින්",
"Share" => "බෙදා හදාගන්න",
"Delete feed" => "සංග්‍රහය මකන්න",
"Delete folder" => "ෆොල්ඩරය මකන්න",
"Rename folder" => "ෆොල්ඩරය නැවත නම් කරන්න",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Označiť ako dôležté",
"from" => "od",
"by" => "od",
"Share" => "Zdieľaj",
"Keep unread" => "Ponechať neprečítané",
"Delete feed" => "Odstrániť kanál",
"Collapse" => "Zvinúť",

View File

@ -84,6 +84,7 @@
"Mark as important" => "Označi kot pomembno",
"from" => "od",
"by" => "od",
"Share" => "Souporaba",
"Keep unread" => "Obdrži neprebrano",
"Delete feed" => "Izbriši vir",
"Collapse" => "Skrči",

8
l10n/sr.php Normal file
View File

@ -0,0 +1,8 @@
<?php $TRANSLATIONS = array(
"Download" => "Преузимање",
"Address" => "Адреса",
"Upload" => "Пошаљи",
"Folder" => "фасцикла",
"Settings" => "Подешавања",
"Add" => "Додај"
);

6
l10n/sr@latin.php Normal file
View File

@ -0,0 +1,6 @@
<?php $TRANSLATIONS = array(
"Download" => "Preuzmi",
"Address" => "Adresa",
"Upload" => "Pošalji",
"Settings" => "Podešavanja"
);

View File

@ -84,6 +84,7 @@
"Mark as important" => "Markera som viktigt",
"from" => "från",
"by" => "av",
"Share" => "Dela",
"Keep unread" => "Behåll som oläst",
"Delete feed" => "Ta bort flöde",
"Collapse" => "Dölj",

11
l10n/ta_LK.php Normal file
View File

@ -0,0 +1,11 @@
<?php $TRANSLATIONS = array(
"Error" => "வழு",
"Warning" => "எச்சரிக்கை",
"Import" => "இறக்குமதி",
"Download" => "பதிவிறக்குக",
"Upload" => "பதிவேற்றுக",
"Folder" => "கோப்புறை",
"Settings" => "அமைப்புகள்",
"Add" => "சேர்க்க",
"Share" => "பகிர்வு"
);

View File

@ -82,7 +82,9 @@
"Starred" => "ติดดาวแล้ว",
"Mark as unimportant" => "ทำเครื่องหมายว่าไม่สำคัญ",
"Mark as important" => "ทำเครื่องหมายว่าสำคัญ",
"from" => "จาก",
"by" => "โดย",
"Share" => "แชร์",
"Keep unread" => "รักษาสถานะว่ายังไม่ได้เปิดอ่านไว้",
"Delete feed" => "ลบ feed",
"Collapse" => "ย่อ",

14
l10n/tr.php Normal file
View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "Dosya mevcut değil:",
"Error" => "Hata",
"Warning" => "Uyarı",
"Importing..." => "İçeri aktarılıyor...",
"Import" => "İçe aktar",
"Download" => "İndir",
"Address" => "Adres",
"Upload" => "Yükle",
"Folder" => "Klasör",
"Settings" => "Ayarlar",
"Add" => "Ekle",
"Share" => "Paylaş"
);

View File

@ -18,6 +18,7 @@
"Feed updated!" => "Канал оновлено!",
"News" => "Новини",
"Error" => "Помилка",
"None" => "Жоден",
"Show only unread" => "Показати тільки не прочитане",
"Show everything" => "Показати все",
"Name of the folder cannot be empty." => "Ім'я папки не може бути пустим.",
@ -46,9 +47,13 @@
"An error occurred" => "Виникла помилка",
"Nice! You have subscribed to " => "Чудово! Ви підписались на",
"You had already subcribed to this feed!" => "Ви вже підписані на цей канал!",
"Address" => "Адреса",
"Upload" => "Відвантажити",
"Add feed or folder" => "Додати канал в папку",
"Folder" => "Папка",
"Settings" => "Налаштування",
"Add" => "Додати",
"New articles" => "Нові статті",
"Starred" => "Помічені зірочко"
"Starred" => "Помічені зірочко",
"Share" => "Поділитися"
);

View File

@ -6,6 +6,7 @@
"File doesn't exist:" => "Tập tin không tồn tại",
"News" => "Tin tức",
"Error" => "Lỗi",
"None" => "none",
"Show only unread" => "Hiển thị chưa đọc",
"Show everything" => "Hiện tất cả",
"Adding..." => "Đang thêm...",
@ -17,12 +18,14 @@
"File " => "Tập tin",
"No files selected." => "Không có tập tin được chọn.",
"Success" => "Thành công",
"Import" => "Nhập",
"Downloading..." => "Đang tải ...",
"Download" => "Tải về",
"Select file" => "Chọn tập tin",
"An error occurred" => "Một lỗi đã xảy ra",
"Nice! You have subscribed to " => "Tuyệt! Bạn đã đăng ký",
"Address" => "Địa chỉ",
"Upload" => "Tải lên",
"Select file from <a href=\"#\" class=\"settings\" id=\"browselink\">local filesystem</a> or <a href=\"#\" class=\"settings\" id=\"cloudlink\">cloud</a>" => "Chọn tập tin từ <a href=\"#\" class=\"settings\" id=\"browselink\">hệ thống tập tin trên máy tính</a> hoặc <a href=\"#\" class=\"settings\" id=\"cloudlink\">điện toán đám mây</a>",
"Folder" => "Thư mục",
"Settings" => "Cài đặt",
@ -34,6 +37,7 @@
"New articles" => "Bài viết mới",
"Mark as unimportant" => "Đánh dấu là không quan trọng",
"Mark as important" => "Đánh dấu là quan trọng",
"Share" => "Chia sẻ",
"Keep unread" => "Giữ chưa đọc",
"Collapse" => "Thu gọn"
);

View File

@ -84,6 +84,7 @@
"Mark as important" => "标记为重要",
"from" => "",
"by" => "",
"Share" => "分享",
"Keep unread" => "保持未读",
"Delete feed" => "删除种子",
"Collapse" => "收缩",

View File

@ -84,6 +84,7 @@
"Mark as important" => "标志为重要",
"from" => "",
"by" => "",
"Share" => "共享",
"Keep unread" => "保持未读",
"Delete feed" => "删除Feed",
"Collapse" => "折叠",

13
l10n/zh_TW.php Normal file
View File

@ -0,0 +1,13 @@
<?php $TRANSLATIONS = array(
"File doesn't exist:" => "檔案不存在",
"Error" => "錯誤",
"None" => "",
"Import" => "匯入",
"Download" => "下載",
"Address" => "網址",
"Upload" => "上傳",
"Folder" => "資料夾",
"Settings" => "設定",
"Add" => "新增",
"Share" => "分享"
);

View File

@ -18,4 +18,5 @@ class FeedType {
const FOLDER = 1;
const STARRED = 2;
const SUBSCRIPTIONS = 3;
const SHARED = 4;
};

View File

@ -36,6 +36,7 @@ class ItemMapper {
* @returns an object of the class OC_News_Item
*/
public function fromRow($row) {
$url = $row['url'];
$title = $row['title'];
$guid = $row['guid'];
@ -171,8 +172,10 @@ class ItemMapper {
$status,
$itemid
);
$stmt->execute($params);
$result = $stmt->execute($params);
return true;
}
@ -236,11 +239,21 @@ class ItemMapper {
/**
* @brief Retrieve an item from the database
* @param id The id of the feed in the database table.
* @param id The id of the item in the database table.
*/
public function findById($id) {
$stmt = \OCP\DB::prepare('SELECT ' . self::tableName . '.id AS id, ' . self::tableName .
'.url AS url, ' . self::tableName . '.title AS title, guid, body, status, author, feed_id, pub_date' .
' FROM ' . self::tableName . ' JOIN ' . FeedMapper::tableName .
' ON ' . self::tableName . '.feed_id = ' . FeedMapper::tableName . '.id WHERE (' . self::tableName .
'.id = ? AND ' . FeedMapper::tableName . '.user_id = ? )');
$result = $stmt->execute(array($id, $this->userid));
/*
$stmt = \OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE id = ?');
$result = $stmt->execute(array($id));
*/
$row = $result->fetchRow();
$item = $this->fromRow($row);

44
lib/share/item.php Normal file
View File

@ -0,0 +1,44 @@
<?php
/**
* ownCloud - News app
*
* @author Alessandro Cosentino
* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com>
*
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file
*
*/
namespace OCA\News;
class Share_Backend_News_Item implements \OCP\Share_Backend {
const FORMAT_ITEM = 0;
private static $item;
public function isValidSource($itemSource, $uidOwner) {
$itemMapper = new ItemMapper($uidOwner);
$this->item = $itemMapper->findById($itemSource);
if ($this->item !== null) {
return true;
}
return false;
}
public function generateTarget($itemSource, $shareWith, $exclude = null) {
return $this->item->getTitle();
}
public function formatItems($items, $format, $parameters = null) {
$formattedItems = array();
foreach ($items as $item) {
$itemMapper = new ItemMapper($item['uid_owner']);
$formattedItem = $itemMapper->findById($item['item_source']);
$formattedItems[] = $formattedItem;
}
return $formattedItems;
}
}

View File

@ -52,6 +52,7 @@ echo $this->inc("part.dialogues");
<div id="rightcontent" class="rightcontent">
<?php
echo '<div id="feed_items">';
//echo $this->inc("part.shared");
echo $this->inc("part.items");
echo '</div>';
?>

View File

@ -40,6 +40,7 @@ $allfeeds = isset($_['allfeeds']) ? $_['allfeeds'] : '';
$lastViewedFeedId = $_['lastViewedFeedId'];
$lastViewedFeedType = $_['lastViewedFeedType'];
$starredCount = $_['starredCount'];
//$sharedCount = $_['sharedCount'];
?>
@ -54,5 +55,14 @@ $starredCount = $_['starredCount'];
<span class="unread_items_counter"><?php echo $starredCount ?></span>
</li>
<?php
/*
<li class="shared <?php if($lastViewedFeedType == OCA\News\FeedType::SHARED) { echo "active"; }; ?>">
<a class="title" href="#" ><?php echo $l->t('Shared'); ?></a>
<span class="unread_items_counter"><?php echo $sharedCount ?></span>
</li>
*/
?>
<?php
print_collection_list($allfeeds, $lastViewedFeedId, $lastViewedFeedType);

View File

@ -51,11 +51,15 @@ foreach($items as $item) {
echo '<div class="body">' . $item->getBody() . '</div>';
echo '<div><a class="share" data-item-type="news_item" data-item="' . $item->getId() . '" title="' . $l->t('Share') .
'" data-possible-permissions="' . (OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE) . '"/></div>';
echo '<div class="bottom_utils">';
echo '<ul class="secondary_item_utils">';
echo '<ul class="secondary_item_utils">';
echo '<li class="keep_unread">' . $l->t('Keep unread') . '<input type="checkbox" /></li>';
echo '</ul>';
echo '</div>';
echo '</li>';

68
templates/part.shared.php Normal file
View File

@ -0,0 +1,68 @@
<?php
$items = OCP\Share::getItemsSharedWith('news_item', 1);
//print_r($items);
echo '<ul>';
foreach($items as $item) {
if($item->isRead()) {
$newsItemClass = "read";
} else {
$newsItemClass = "";
}
if($item->isImportant()) {
$starClass = 'important';
$startTitle = $l->t('Mark as unimportant');
} else {
$starClass = '';
$startTitle = $l->t('Mark as important');
}
echo '<li class="feed_item ' . $newsItemClass .'" data-id="' . $item->getId() . '" data-feedid="' . $item->getFeedId() . '">';
echo '<span class="timestamp">' . $item->getDate() . '</span>';
echo '<h2 class="item_date"><time class="timeago" datetime="' .
date('c', $item->getDate()) . '">' . date('F j, Y, g:i a', $item->getDate()) . '</time>' . '</h2>';
echo '<div class="utils">';
echo '<ul class="primary_item_utils">';
echo '<li class="star ' . $starClass . '" title="' . $startTitle . '"></li>';
echo '</ul>';
echo '</div>';
echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . htmlspecialchars($item->getTitle(), ENT_QUOTES, 'UTF-8') . '</a></h1>';
if ((int)$lastViewedFeedType !== OCA\News\FeedType::FEED) {
$feedTitle = $l->t('from') . ' ' . '<a href="#" class="from_feed"> ' . $item->getFeedTitle() . '</a> ';
} else {
$feedTitle = '';
}
if(($item->getAuthor() !== null) && (trim($item->getAuthor()) !== '')) {
$author = $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8');
} else {
$author = '';
}
if(!($feedTitle === '' && $author === '')){
echo '<h2 class="item_author">'. $feedTitle . $author . '</h2>';
}
echo '<div class="body">' . $item->getBody() . '</div>';
echo '<div><a class="share" data-item-type="news_item" data-item="' . $item->getId() . '" title="' . $l->t('Share') .
'" data-possible-permissions="' . (OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE) . '"/></div>';
echo '<div class="bottom_utils">';
echo '<ul class="secondary_item_utils">';
echo '<li class="keep_unread">' . $l->t('Keep unread') . '<input type="checkbox" /></li>';
echo '</ul>';
echo '</div>';
echo '</li>';
}
echo '</ul>';