diff --git a/config/xml/themes/default.xml b/config/xml/themes/default.xml
index 66a593bcb..4424a500f 100644
--- a/config/xml/themes/default.xml
+++ b/config/xml/themes/default.xml
@@ -70,7 +70,6 @@
-
diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php
index d6969afc6..43088a9d4 100644
--- a/controllers/admin/AdminThemesController.php
+++ b/controllers/admin/AdminThemesController.php
@@ -2099,7 +2099,6 @@ class AdminThemesControllerCore extends AdminController
'blocknewsletter',
'blockpaymentlogo',
'blockpermanentlinks',
- 'blockrss',
'blocksearch',
'blocksharefb',
'blocksocial',
diff --git a/modules/blockrss/CHANGELOG.txt b/modules/blockrss/CHANGELOG.txt
deleted file mode 100644
index b35122501..000000000
--- a/modules/blockrss/CHANGELOG.txt
+++ /dev/null
@@ -1,13 +0,0 @@
------------------------------
-# V1.3.2 to V1.3.3
------------------------------
-
-## Improved/Changed Features:
-
-* [CO] : [#268] Added xml parser library in module.
-
-
-2014-04-22 18:57:39 +0200 // Changelog updated
-2014-03-24 11:43:28 +0100 / MO blockrss : ps_versions_compliancy modified (1.5.6.1 => 1.6)
-2014-03-24 11:03:34 +0100 // MO blockrss/ : ps_versions_compliancy added
-2014-03-20 14:24:52 +0100 Initial commit
diff --git a/modules/blockrss/blockrss.php b/modules/blockrss/blockrss.php
deleted file mode 100644
index 3bd70482d..000000000
--- a/modules/blockrss/blockrss.php
+++ /dev/null
@@ -1,252 +0,0 @@
-
-* @copyright 2007-2016 PrestaShop SA
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-if (!defined('_PS_VERSION_'))
- exit;
-
-include_once _PS_CLASS_DIR_.'../tools/pear/PEAR.php';
-require_once dirname(__FILE__).'/vendor/autoload.php';
-
-
-class Blockrss extends Module
-{
-
- private static $xmlFields = array('title', 'guid', 'description', 'author', 'comments', 'pubDate', 'source', 'link', 'content');
-
- function __construct()
- {
- $this->name = 'blockrss';
- $this->tab = 'front_office_features';
- $this->need_instance = 0;
-
- $this->bootstrap = true;
- parent::__construct();
-
- $this->displayName = $this->l('RSS feed block');
- $this->description = $this->l('Adds a block displaying a RSS feed.');
-
- $this->version = '1.3.3';
- $this->author = 'PrestaShop';
- $this->error = false;
- $this->valid = false;
- $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99');
- }
-
- function install()
- {
- if (!parent::install())
- return false;
-
- Configuration::updateValue('RSS_FEED_TITLE', $this->l('RSS feed'));
- Configuration::updateValue('RSS_FEED_NBR', 5);
-
- return ($this->registerHook('header') && $this->registerHook('leftColumn'));
- }
-
- public function getContent()
- {
- $output = '';
-
- if (Tools::isSubmit('submitBlockRss'))
- {
- $errors = array();
- $urlfeed = Tools::getValue('RSS_FEED_URL');
- $title = Tools::getValue('RSS_FEED_TITLE');
- $nbr = (int)Tools::getValue('RSS_FEED_NBR');
-
- if ($urlfeed AND !Validate::isAbsoluteUrl($urlfeed))
- $errors[] = $this->l('Invalid feed URL');
- elseif (!$title OR empty($title) OR !Validate::isGenericName($title))
- $errors[] = $this->l('Invalid title');
- elseif (!$nbr OR $nbr <= 0 OR !Validate::isInt($nbr))
- $errors[] = $this->l('Invalid number of feeds');
- elseif (stristr($urlfeed, $_SERVER['HTTP_HOST'].__PS_BASE_URI__))
- $errors[] = $this->l('You have selected a feed URL from your own website. Please choose another URL.');
- elseif (!($contents = Tools::file_get_contents($urlfeed)))
- $errors[] = $this->l('Feed is unreachable, check your URL');
- /* Even if the feed was reachable, We need to make sure that the feed is well formated */
- else
- {
- try
- {
- $xmlFeed = new XML_Feed_Parser($contents);
- }
- catch (XML_Feed_Parser_Exception $e)
- {
- $errors[] = $this->l('Invalid feed:').' '.$e->getMessage();
- }
- }
-
- if (!sizeof($errors))
- {
- Configuration::updateValue('RSS_FEED_URL', $urlfeed);
- Configuration::updateValue('RSS_FEED_TITLE', $title);
- Configuration::updateValue('RSS_FEED_NBR', $nbr);
-
- $output .= $this->displayConfirmation($this->l('Settings updated'));
- }
- else
- $output .= $this->displayError(implode('
', $errors));
- }
- else
- {
- $errors = array();
- if (stristr(Configuration::get('RSS_FEED_URL'), $_SERVER['HTTP_HOST'].__PS_BASE_URI__))
- $errors[] = $this->l('You have selected a feed URL from your own website. Please choose another URL.');
-
- if (sizeof($errors))
- $output .= $this->displayError(implode('
', $errors));
- }
- return $output.$this->renderForm();
- }
-
- function hookLeftColumn($params)
- {
- // Conf
- $title = strval(Configuration::get('RSS_FEED_TITLE'));
- $url = strval(Configuration::get('RSS_FEED_URL'));
- $nb = (int)(Configuration::get('RSS_FEED_NBR'));
-
- $cacheId = $this->getCacheId($this->name.'-'.date("YmdH"));
- if (!$this->isCached('blockrss.tpl', $cacheId))
- {
- // Getting data
- $rss_links = array();
- if ($url && ($contents = Tools::file_get_contents($url)))
- try
- {
- if (@$src = new XML_Feed_Parser($contents))
- for ($i = 0; $i < ($nb ? $nb : 5); $i++)
- if (@$item = $src->getEntryByOffset($i))
- {
- $xmlValues = array();
- foreach (self::$xmlFields as $xmlField)
- $xmlValues[$xmlField] = $item->__get($xmlField);
- $xmlValues['enclosure'] = $item->getEnclosure();
-
- // First image
- if (isset($xmlValues['content']) && $xmlValues['content'])
- {
- preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/', $xmlValues['content'], $image);
- if (array_key_exists(1, $image) && $image[1])
- {
- if ($image[1][0] == '/')
- $image[1] = 'http:'.$image[1];
- // Try if distant image exist : timeout 0.3s
- $context = stream_context_create(array('http' => array('timeout' => 0.3)));
- if (file_get_contents($image[1], false, $context, -1, 1) !== false)
- $xmlValues['image'] = $image[1];
- }
- }
-
- // Compatibility
- $xmlValues['url'] = $xmlValues['link'];
- $rss_links[] = $xmlValues;
- }
- }
- catch (XML_Feed_Parser_Exception $e)
- {
- Tools::dieOrLog(sprintf($this->l('Error: invalid RSS feed in "blockrss" module: %s'), $e->getMessage()), false);
- }
- // Display smarty
- $this->smarty->assign(array('title' => ($title ? $title : $this->l('RSS feed')), 'rss_links' => $rss_links));
- }
- return $this->display(__FILE__, 'blockrss.tpl', $cacheId);
- }
-
- function hookRightColumn($params)
- {
- return $this->hookLeftColumn($params);
- }
-
- function hookHeader($params)
- {
- $this->context->controller->addCSS(($this->_path).'blockrss.css', 'all');
- }
-
- public function renderForm()
- {
- $fields_form = array(
- 'form' => array(
- 'legend' => array(
- 'title' => $this->l('Settings'),
- 'icon' => 'icon-cogs'
- ),
- 'input' => array(
- array(
- 'type' => 'text',
- 'label' => $this->l('Block title'),
- 'name' => 'RSS_FEED_TITLE',
- 'desc' => $this->l('Create a title for the block (default: \'RSS feed\').'),
- ),
- array(
- 'type' => 'text',
- 'label' => $this->l('Add a feed URL'),
- 'name' => 'RSS_FEED_URL',
- 'desc' => $this->l('Add the URL of the feed you want to use (sample: http://news.google.com/?output=rss).'),
- ),
- array(
- 'type' => 'text',
- 'label' => $this->l('Number of threads displayed'),
- 'name' => 'RSS_FEED_NBR',
- 'class' => 'fixed-width-sm',
- 'desc' => $this->l('Number of threads displayed in the block (default value: 5).'),
- ),
- ),
- 'submit' => array(
- 'title' => $this->l('Save'),
- )
- ),
- );
-
- $helper = new HelperForm();
- $helper->show_toolbar = false;
- $helper->table = $this->table;
- $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
- $helper->default_form_language = $lang->id;
- $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
- $helper->identifier = $this->identifier;
- $helper->submit_action = 'submitBlockRss';
- $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
- $helper->token = Tools::getAdminTokenLite('AdminModules');
- $helper->tpl_vars = array(
- 'fields_value' => $this->getConfigFieldsValues(),
- 'languages' => $this->context->controller->getLanguages(),
- 'id_language' => $this->context->language->id
- );
-
- return $helper->generateForm(array($fields_form));
- }
-
- public function getConfigFieldsValues()
- {
- return array(
- 'RSS_FEED_TITLE' => Tools::getValue('RSS_FEED_TITLE', Configuration::get('RSS_FEED_TITLE')),
- 'RSS_FEED_URL' => Tools::getValue('RSS_FEED_URL', Configuration::get('RSS_FEED_URL')),
- 'RSS_FEED_NBR' => Tools::getValue('RSS_FEED_NBR', Configuration::get('RSS_FEED_NBR')),
- );
- }
-}
diff --git a/modules/blockrss/blockrss.tpl b/modules/blockrss/blockrss.tpl
deleted file mode 100644
index 0fe1d2c15..000000000
--- a/modules/blockrss/blockrss.tpl
+++ /dev/null
@@ -1,41 +0,0 @@
-{*
-* 2007-2016 PrestaShop
-*
-* NOTICE OF LICENSE
-*
-* This source file is subject to the Academic Free License (AFL 3.0)
-* that is bundled with this package in the file LICENSE.txt.
-* It is also available through the world-wide-web at this URL:
-* http://opensource.org/licenses/afl-3.0.php
-* If you did not receive a copy of the license and are unable to
-* obtain it through the world-wide-web, please send an email
-* to license@prestashop.com so we can send you a copy immediately.
-*
-* DISCLAIMER
-*
-* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
-* versions in the future. If you wish to customize PrestaShop for your
-* needs please refer to http://www.prestashop.com for more information.
-*
-* @author PrestaShop SA
-* @copyright 2007-2016 PrestaShop SA
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*}
-
-
-
-
diff --git a/modules/blockrss/img/arrow_right_2.png b/modules/blockrss/img/arrow_right_2.png
deleted file mode 100644
index 6b076ee2f..000000000
Binary files a/modules/blockrss/img/arrow_right_2.png and /dev/null differ
diff --git a/modules/blockrss/img/index.php b/modules/blockrss/img/index.php
deleted file mode 100644
index 19a328b3b..000000000
--- a/modules/blockrss/img/index.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
-* @copyright 2007-2016 PrestaShop SA
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
-
-header('Cache-Control: no-store, no-cache, must-revalidate');
-header('Cache-Control: post-check=0, pre-check=0', false);
-header('Pragma: no-cache');
-
-header('Location: ../../../');
-exit;
\ No newline at end of file
diff --git a/modules/blockrss/index.php b/modules/blockrss/index.php
deleted file mode 100644
index e5064df41..000000000
--- a/modules/blockrss/index.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
-* @copyright 2007-2016 PrestaShop SA
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
-
-header("Cache-Control: no-store, no-cache, must-revalidate");
-header("Cache-Control: post-check=0, pre-check=0", false);
-header("Pragma: no-cache");
-
-header("Location: ../");
-exit;
\ No newline at end of file
diff --git a/modules/blockrss/logo.gif b/modules/blockrss/logo.gif
deleted file mode 100644
index 7a5e0099f..000000000
Binary files a/modules/blockrss/logo.gif and /dev/null differ
diff --git a/modules/blockrss/logo.png b/modules/blockrss/logo.png
deleted file mode 100644
index 519118125..000000000
Binary files a/modules/blockrss/logo.png and /dev/null differ
diff --git a/modules/blockrss/translations/index.php b/modules/blockrss/translations/index.php
deleted file mode 100644
index e5064df41..000000000
--- a/modules/blockrss/translations/index.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
-* @copyright 2007-2016 PrestaShop SA
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
-
-header("Cache-Control: no-store, no-cache, must-revalidate");
-header("Cache-Control: post-check=0, pre-check=0", false);
-header("Pragma: no-cache");
-
-header("Location: ../");
-exit;
\ No newline at end of file
diff --git a/modules/blockrss/vendor/autoload.php b/modules/blockrss/vendor/autoload.php
deleted file mode 100644
index f3772b7aa..000000000
--- a/modules/blockrss/vendor/autoload.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
- * Jordi Boggiano
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Composer\Autoload;
-
-/**
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
- *
- * $loader = new \Composer\Autoload\ClassLoader();
- *
- * // register classes with namespaces
- * $loader->add('Symfony\Component', __DIR__.'/component');
- * $loader->add('Symfony', __DIR__.'/framework');
- *
- * // activate the autoloader
- * $loader->register();
- *
- * // to enable searching the include path (eg. for PEAR packages)
- * $loader->setUseIncludePath(true);
- *
- * In this example, if you try to use a class in the Symfony\Component
- * namespace or one of its children (Symfony\Component\Console for instance),
- * the autoloader will first look for the class under the component/
- * directory, and it will then fallback to the framework/ directory if not
- * found before giving up.
- *
- * This class is loosely based on the Symfony UniversalClassLoader.
- *
- * @author Fabien Potencier
- * @author Jordi Boggiano
- * @see http://www.php-fig.org/psr/psr-0/
- * @see http://www.php-fig.org/psr/psr-4/
- */
-class ClassLoader
-{
- // PSR-4
- private $prefixLengthsPsr4 = array();
- private $prefixDirsPsr4 = array();
- private $fallbackDirsPsr4 = array();
-
- // PSR-0
- private $prefixesPsr0 = array();
- private $fallbackDirsPsr0 = array();
-
- private $useIncludePath = false;
- private $classMap = array();
- private $classMapAuthoritative = false;
- private $missingClasses = array();
- private $apcuPrefix;
-
- public function getPrefixes()
- {
- if (!empty($this->prefixesPsr0)) {
- return call_user_func_array('array_merge', $this->prefixesPsr0);
- }
-
- return array();
- }
-
- public function getPrefixesPsr4()
- {
- return $this->prefixDirsPsr4;
- }
-
- public function getFallbackDirs()
- {
- return $this->fallbackDirsPsr0;
- }
-
- public function getFallbackDirsPsr4()
- {
- return $this->fallbackDirsPsr4;
- }
-
- public function getClassMap()
- {
- return $this->classMap;
- }
-
- /**
- * @param array $classMap Class to filename map
- */
- public function addClassMap(array $classMap)
- {
- if ($this->classMap) {
- $this->classMap = array_merge($this->classMap, $classMap);
- } else {
- $this->classMap = $classMap;
- }
- }
-
- /**
- * Registers a set of PSR-0 directories for a given prefix, either
- * appending or prepending to the ones previously set for this prefix.
- *
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
- */
- public function add($prefix, $paths, $prepend = false)
- {
- if (!$prefix) {
- if ($prepend) {
- $this->fallbackDirsPsr0 = array_merge(
- (array) $paths,
- $this->fallbackDirsPsr0
- );
- } else {
- $this->fallbackDirsPsr0 = array_merge(
- $this->fallbackDirsPsr0,
- (array) $paths
- );
- }
-
- return;
- }
-
- $first = $prefix[0];
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
-
- return;
- }
- if ($prepend) {
- $this->prefixesPsr0[$first][$prefix] = array_merge(
- (array) $paths,
- $this->prefixesPsr0[$first][$prefix]
- );
- } else {
- $this->prefixesPsr0[$first][$prefix] = array_merge(
- $this->prefixesPsr0[$first][$prefix],
- (array) $paths
- );
- }
- }
-
- /**
- * Registers a set of PSR-4 directories for a given namespace, either
- * appending or prepending to the ones previously set for this namespace.
- *
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
- *
- * @throws \InvalidArgumentException
- */
- public function addPsr4($prefix, $paths, $prepend = false)
- {
- if (!$prefix) {
- // Register directories for the root namespace.
- if ($prepend) {
- $this->fallbackDirsPsr4 = array_merge(
- (array) $paths,
- $this->fallbackDirsPsr4
- );
- } else {
- $this->fallbackDirsPsr4 = array_merge(
- $this->fallbackDirsPsr4,
- (array) $paths
- );
- }
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
- // Register directories for a new namespace.
- $length = strlen($prefix);
- if ('\\' !== $prefix[$length - 1]) {
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
- }
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
- } elseif ($prepend) {
- // Prepend directories for an already registered namespace.
- $this->prefixDirsPsr4[$prefix] = array_merge(
- (array) $paths,
- $this->prefixDirsPsr4[$prefix]
- );
- } else {
- // Append directories for an already registered namespace.
- $this->prefixDirsPsr4[$prefix] = array_merge(
- $this->prefixDirsPsr4[$prefix],
- (array) $paths
- );
- }
- }
-
- /**
- * Registers a set of PSR-0 directories for a given prefix,
- * replacing any others previously set for this prefix.
- *
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 base directories
- */
- public function set($prefix, $paths)
- {
- if (!$prefix) {
- $this->fallbackDirsPsr0 = (array) $paths;
- } else {
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
- }
- }
-
- /**
- * Registers a set of PSR-4 directories for a given namespace,
- * replacing any others previously set for this namespace.
- *
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
- *
- * @throws \InvalidArgumentException
- */
- public function setPsr4($prefix, $paths)
- {
- if (!$prefix) {
- $this->fallbackDirsPsr4 = (array) $paths;
- } else {
- $length = strlen($prefix);
- if ('\\' !== $prefix[$length - 1]) {
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
- }
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
- }
- }
-
- /**
- * Turns on searching the include path for class files.
- *
- * @param bool $useIncludePath
- */
- public function setUseIncludePath($useIncludePath)
- {
- $this->useIncludePath = $useIncludePath;
- }
-
- /**
- * Can be used to check if the autoloader uses the include path to check
- * for classes.
- *
- * @return bool
- */
- public function getUseIncludePath()
- {
- return $this->useIncludePath;
- }
-
- /**
- * Turns off searching the prefix and fallback directories for classes
- * that have not been registered with the class map.
- *
- * @param bool $classMapAuthoritative
- */
- public function setClassMapAuthoritative($classMapAuthoritative)
- {
- $this->classMapAuthoritative = $classMapAuthoritative;
- }
-
- /**
- * Should class lookup fail if not found in the current class map?
- *
- * @return bool
- */
- public function isClassMapAuthoritative()
- {
- return $this->classMapAuthoritative;
- }
-
- /**
- * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
- *
- * @param string|null $apcuPrefix
- */
- public function setApcuPrefix($apcuPrefix)
- {
- $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
- }
-
- /**
- * The APCu prefix in use, or null if APCu caching is not enabled.
- *
- * @return string|null
- */
- public function getApcuPrefix()
- {
- return $this->apcuPrefix;
- }
-
- /**
- * Registers this instance as an autoloader.
- *
- * @param bool $prepend Whether to prepend the autoloader or not
- */
- public function register($prepend = false)
- {
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
- }
-
- /**
- * Unregisters this instance as an autoloader.
- */
- public function unregister()
- {
- spl_autoload_unregister(array($this, 'loadClass'));
- }
-
- /**
- * Loads the given class or interface.
- *
- * @param string $class The name of the class
- * @return bool|null True if loaded, null otherwise
- */
- public function loadClass($class)
- {
- if ($file = $this->findFile($class)) {
- includeFile($file);
-
- return true;
- }
- }
-
- /**
- * Finds the path to the file where the class is defined.
- *
- * @param string $class The name of the class
- *
- * @return string|false The path if found, false otherwise
- */
- public function findFile($class)
- {
- // class map lookup
- if (isset($this->classMap[$class])) {
- return $this->classMap[$class];
- }
- if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
- return false;
- }
- if (null !== $this->apcuPrefix) {
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
- if ($hit) {
- return $file;
- }
- }
-
- $file = $this->findFileWithExtension($class, '.php');
-
- // Search for Hack files if we are running on HHVM
- if (false === $file && defined('HHVM_VERSION')) {
- $file = $this->findFileWithExtension($class, '.hh');
- }
-
- if (null !== $this->apcuPrefix) {
- apcu_add($this->apcuPrefix.$class, $file);
- }
-
- if (false === $file) {
- // Remember that this class does not exist.
- $this->missingClasses[$class] = true;
- }
-
- return $file;
- }
-
- private function findFileWithExtension($class, $ext)
- {
- // PSR-4 lookup
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
-
- $first = $class[0];
- if (isset($this->prefixLengthsPsr4[$first])) {
- $subPath = $class;
- while (false !== $lastPos = strrpos($subPath, '\\')) {
- $subPath = substr($subPath, 0, $lastPos);
- $search = $subPath . '\\';
- if (isset($this->prefixDirsPsr4[$search])) {
- $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
- foreach ($this->prefixDirsPsr4[$search] as $dir) {
- if (file_exists($file = $dir . $pathEnd)) {
- return $file;
- }
- }
- }
- }
- }
-
- // PSR-4 fallback dirs
- foreach ($this->fallbackDirsPsr4 as $dir) {
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
- return $file;
- }
- }
-
- // PSR-0 lookup
- if (false !== $pos = strrpos($class, '\\')) {
- // namespaced class name
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
- } else {
- // PEAR-like class name
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
- }
-
- if (isset($this->prefixesPsr0[$first])) {
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
- if (0 === strpos($class, $prefix)) {
- foreach ($dirs as $dir) {
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
- return $file;
- }
- }
- }
- }
- }
-
- // PSR-0 fallback dirs
- foreach ($this->fallbackDirsPsr0 as $dir) {
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
- return $file;
- }
- }
-
- // PSR-0 include paths.
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
- return $file;
- }
-
- return false;
- }
-}
-
-/**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- */
-function includeFile($file)
-{
- include $file;
-}
diff --git a/modules/blockrss/vendor/composer/LICENSE b/modules/blockrss/vendor/composer/LICENSE
deleted file mode 100644
index f27399a04..000000000
--- a/modules/blockrss/vendor/composer/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Copyright (c) Nils Adermann, Jordi Boggiano
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
diff --git a/modules/blockrss/vendor/composer/autoload_classmap.php b/modules/blockrss/vendor/composer/autoload_classmap.php
deleted file mode 100644
index 8b46d5171..000000000
--- a/modules/blockrss/vendor/composer/autoload_classmap.php
+++ /dev/null
@@ -1,10 +0,0 @@
- $vendorDir . '/pear/pear_exception/PEAR/Exception.php',
-);
diff --git a/modules/blockrss/vendor/composer/autoload_namespaces.php b/modules/blockrss/vendor/composer/autoload_namespaces.php
deleted file mode 100644
index f3dc5248f..000000000
--- a/modules/blockrss/vendor/composer/autoload_namespaces.php
+++ /dev/null
@@ -1,11 +0,0 @@
- array($vendorDir . '/pear/xml_feed_parser'),
- 'Log' => array($vendorDir . '/pear/log'),
-);
diff --git a/modules/blockrss/vendor/composer/autoload_psr4.php b/modules/blockrss/vendor/composer/autoload_psr4.php
deleted file mode 100644
index b265c64a2..000000000
--- a/modules/blockrss/vendor/composer/autoload_psr4.php
+++ /dev/null
@@ -1,9 +0,0 @@
-= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
- if ($useStaticLoader) {
- require_once __DIR__ . '/autoload_static.php';
-
- call_user_func(\Composer\Autoload\ComposerStaticInit573edf418ff486f71fdaa7e03e5841ca::getInitializer($loader));
- } else {
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
-
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
-
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
- }
- }
-
- $loader->register(true);
-
- return $loader;
- }
-}
diff --git a/modules/blockrss/vendor/composer/autoload_static.php b/modules/blockrss/vendor/composer/autoload_static.php
deleted file mode 100644
index d4f3a4a4d..000000000
--- a/modules/blockrss/vendor/composer/autoload_static.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- array (
- 'XML' =>
- array (
- 0 => __DIR__ . '/..' . '/pear/xml_feed_parser',
- ),
- ),
- 'L' =>
- array (
- 'Log' =>
- array (
- 0 => __DIR__ . '/..' . '/pear/log',
- ),
- ),
- );
-
- public static $classMap = array (
- 'PEAR_Exception' => __DIR__ . '/..' . '/pear/pear_exception/PEAR/Exception.php',
- );
-
- public static function getInitializer(ClassLoader $loader)
- {
- return \Closure::bind(function () use ($loader) {
- $loader->prefixesPsr0 = ComposerStaticInit573edf418ff486f71fdaa7e03e5841ca::$prefixesPsr0;
- $loader->classMap = ComposerStaticInit573edf418ff486f71fdaa7e03e5841ca::$classMap;
-
- }, null, ClassLoader::class);
- }
-}
diff --git a/modules/blockrss/vendor/composer/include_paths.php b/modules/blockrss/vendor/composer/include_paths.php
deleted file mode 100644
index abbc02ccf..000000000
--- a/modules/blockrss/vendor/composer/include_paths.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
-* @copyright 2010-2021 Webkul IN
-* @license https://store.webkul.com/license.html
-*/
-
-header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
-
-header('Cache-Control: no-store, no-cache, must-revalidate');
-header('Cache-Control: post-check=0, pre-check=0', false);
-header('Pragma: no-cache');
-
-header('Location: ../../../');
-exit;
diff --git a/modules/blockrss/vendor/composer/installed.json b/modules/blockrss/vendor/composer/installed.json
deleted file mode 100644
index a01ae047d..000000000
--- a/modules/blockrss/vendor/composer/installed.json
+++ /dev/null
@@ -1,166 +0,0 @@
-[
- {
- "name": "pear/log",
- "version": "1.13.3",
- "version_normalized": "1.13.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/pear/Log.git",
- "reference": "21af0be11669194d72d88b5ee9d5f176dc75d9a3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/pear/Log/zipball/21af0be11669194d72d88b5ee9d5f176dc75d9a3",
- "reference": "21af0be11669194d72d88b5ee9d5f176dc75d9a3",
- "shasum": ""
- },
- "require": {
- "pear/pear_exception": "1.0.1 || 1.0.2",
- "php": ">5.2"
- },
- "require-dev": {
- "phpunit/phpunit": "*"
- },
- "suggest": {
- "pear/db": "Install optionally via your project's composer.json"
- },
- "time": "2021-05-04T23:51:30+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "Log": "./"
- },
- "exclude-from-classmap": [
- "/examples/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jon Parise",
- "email": "jon@php.net",
- "homepage": "http://www.indelible.org",
- "role": "Developer"
- }
- ],
- "description": "PEAR Logging Framework",
- "homepage": "http://pear.github.io/Log/",
- "keywords": [
- "log",
- "logging"
- ]
- },
- {
- "name": "pear/pear_exception",
- "version": "v1.0.2",
- "version_normalized": "1.0.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/pear/PEAR_Exception.git",
- "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
- "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
- "shasum": ""
- },
- "require": {
- "php": ">=5.2.0"
- },
- "require-dev": {
- "phpunit/phpunit": "<9"
- },
- "time": "2021-03-21T15:43:46+00:00",
- "type": "class",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "PEAR/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- "."
- ],
- "license": [
- "BSD-2-Clause"
- ],
- "authors": [
- {
- "name": "Helgi Thormar",
- "email": "dufuz@php.net"
- },
- {
- "name": "Greg Beaver",
- "email": "cellog@php.net"
- }
- ],
- "description": "The PEAR Exception base class.",
- "homepage": "https://github.com/pear/PEAR_Exception",
- "keywords": [
- "exception"
- ]
- },
- {
- "name": "pear/xml_feed_parser",
- "version": "v1.0.5",
- "version_normalized": "1.0.5.0",
- "source": {
- "type": "git",
- "url": "https://github.com/pear/XML_Feed_Parser.git",
- "reference": "d8ad454742acba786738b39cbcc7c10f7b57adbe"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/pear/XML_Feed_Parser/zipball/d8ad454742acba786738b39cbcc7c10f7b57adbe",
- "reference": "d8ad454742acba786738b39cbcc7c10f7b57adbe",
- "shasum": ""
- },
- "require": {
- "pear/log": "*",
- "pear/pear_exception": "*"
- },
- "require-dev": {
- "phpunit/phpunit": "*"
- },
- "suggest": {
- "ext-tidy": "May require the tidy PHP extension"
- },
- "time": "2019-02-11T14:09:14+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "XML": "./"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- "./"
- ],
- "license": [
- "LGPL"
- ],
- "authors": [
- {
- "name": "James Stewart",
- "email": "james@jystewart.net",
- "role": "Lead"
- }
- ],
- "description": "More info available on: http://pear.php.net/package/XML_Feed_Parser"
- }
-]
diff --git a/modules/blockrss/vendor/index.php b/modules/blockrss/vendor/index.php
deleted file mode 100644
index 051e0122d..000000000
--- a/modules/blockrss/vendor/index.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
-* @copyright 2010-2021 Webkul IN
-* @license https://store.webkul.com/license.html
-*/
-
-header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
-
-header('Cache-Control: no-store, no-cache, must-revalidate');
-header('Cache-Control: post-check=0, pre-check=0', false);
-header('Pragma: no-cache');
-
-header('Location: ../../../');
-exit;
diff --git a/modules/blockrss/vendor/pear/index.php b/modules/blockrss/vendor/pear/index.php
deleted file mode 100644
index 051e0122d..000000000
--- a/modules/blockrss/vendor/pear/index.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
-* @copyright 2010-2021 Webkul IN
-* @license https://store.webkul.com/license.html
-*/
-
-header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
-
-header('Cache-Control: no-store, no-cache, must-revalidate');
-header('Cache-Control: post-check=0, pre-check=0', false);
-header('Pragma: no-cache');
-
-header('Location: ../../../');
-exit;
diff --git a/modules/blockrss/vendor/pear/log/.github/workflows/ci.yml b/modules/blockrss/vendor/pear/log/.github/workflows/ci.yml
deleted file mode 100644
index 5c17cfef6..000000000
--- a/modules/blockrss/vendor/pear/log/.github/workflows/ci.yml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-name: CI
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-jobs:
- test:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
-
- steps:
- - uses: actions/checkout@v2
- - name: Set up PHP ${{ matrix.php-version }}
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php-version }}
- extensions: sqlite
- ini-values: include_path=.:/usr/share/php
- - name: Run tests
- run: |
- pear run-tests -d tests/
diff --git a/modules/blockrss/vendor/pear/log/.gitignore b/modules/blockrss/vendor/pear/log/.gitignore
deleted file mode 100644
index 1cb564d81..000000000
--- a/modules/blockrss/vendor/pear/log/.gitignore
+++ /dev/null
@@ -1,18 +0,0 @@
-
-# /
-/*.tgz
-
-# /docs/
-/docs/api
-
-# /tests/
-/tests/*.diff
-/tests/*.exp
-/tests/*.log
-/tests/*.out
-/tests/sqlite-log.db
-
-# composer related
-composer.lock
-composer.phar
-vendor
diff --git a/modules/blockrss/vendor/pear/log/LICENSE b/modules/blockrss/vendor/pear/log/LICENSE
deleted file mode 100644
index 18847aa36..000000000
--- a/modules/blockrss/vendor/pear/log/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2001-2016 Jon Parise, Chuck Hagenbuch, and Jan Schneider.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/modules/blockrss/vendor/pear/log/Log.php b/modules/blockrss/vendor/pear/log/Log.php
deleted file mode 100644
index b1c67a4da..000000000
--- a/modules/blockrss/vendor/pear/log/Log.php
+++ /dev/null
@@ -1,872 +0,0 @@
-
- * @author Jon Parise
- * @since Horde 1.3
- * @package Log
- */
-class Log
-{
- /**
- * Indicates whether or not the log can been opened / connected.
- *
- * @var boolean
- * @access protected
- */
- var $_opened = false;
-
- /**
- * Instance-specific unique identification number.
- *
- * @var integer
- * @access protected
- */
- var $_id = 0;
-
- /**
- * The label that uniquely identifies this set of log messages.
- *
- * @var string
- * @access protected
- */
- var $_ident = '';
-
- /**
- * The default priority to use when logging an event.
- *
- * @var integer
- * @access protected
- */
- var $_priority = PEAR_LOG_INFO;
-
- /**
- * The bitmask of allowed log levels.
- *
- * @var integer
- * @access protected
- */
- var $_mask = PEAR_LOG_ALL;
-
- /**
- * Holds all Log_observer objects that wish to be notified of new messages.
- *
- * @var array
- * @access protected
- */
- var $_listeners = array();
-
- /**
- * Starting depth to use when walking a backtrace in search of the
- * function that invoked the log system.
- *
- * @var integer
- * @access protected
- */
- var $_backtrace_depth = 0;
-
- /**
- * Maps canonical format keys to position arguments for use in building
- * "line format" strings.
- *
- * @var array
- * @access protected
- */
- var $_formatMap = array('%{timestamp}' => '%1$s',
- '%{ident}' => '%2$s',
- '%{priority}' => '%3$s',
- '%{message}' => '%4$s',
- '%{file}' => '%5$s',
- '%{line}' => '%6$s',
- '%{function}' => '%7$s',
- '%{class}' => '%8$s',
- '%\{' => '%%{');
-
- public function __construct()
- {
- }
-
- /**
- * Attempts to return a concrete Log instance of type $handler.
- *
- * @param string $handler The type of concrete Log subclass to return.
- * Attempt to dynamically include the code for
- * this subclass. Currently, valid values are
- * 'console', 'syslog', 'sql', 'file', and 'mcal'.
- *
- * @param string $name The name of the actually log file, table, or
- * other specific store to use. Defaults to an
- * empty string, with which the subclass will
- * attempt to do something intelligent.
- *
- * @param string $ident The identity reported to the log system.
- *
- * @param array $conf A hash containing any additional configuration
- * information that a subclass might need.
- *
- * @param int $level Log messages up to and including this level.
- *
- * @return object Log The newly created concrete Log instance, or
- * null on an error.
- * @access public
- * @since Log 1.0
- */
- public static function factory($handler, $name = '', $ident = '',
- $conf = array(), $level = PEAR_LOG_DEBUG)
- {
- $handler = strtolower($handler);
- $class = 'Log_' . $handler;
- $classfile = 'Log/' . $handler . '.php';
-
- /*
- * Attempt to include our version of the named class, but don't treat
- * a failure as fatal. The caller may have already included their own
- * version of the named class.
- */
- if (!class_exists($class, false)) {
- include_once $classfile;
- }
-
- /* If the class exists, return a new instance of it. */
- if (class_exists($class, false)) {
- $obj = new $class($name, $ident, $conf, $level);
- return $obj;
- }
-
- $null = null;
- return $null;
- }
-
- /**
- * Attempts to return a reference to a concrete Log instance of type
- * $handler, only creating a new instance if no log instance with the same
- * parameters currently exists.
- *
- * You should use this if there are multiple places you might create a
- * logger, you don't want to create multiple loggers, and you don't want to
- * check for the existance of one each time. The singleton pattern does all
- * the checking work for you.
- *
- * You MUST call this method with the $var = &Log::singleton() syntax.
- * Without the ampersand (&) in front of the method name, you will not get
- * a reference, you will get a copy.
- *
- * @param string $handler The type of concrete Log subclass to return.
- * Attempt to dynamically include the code for
- * this subclass. Currently, valid values are
- * 'console', 'syslog', 'sql', 'file', and 'mcal'.
- *
- * @param string $name The name of the actually log file, table, or
- * other specific store to use. Defaults to an
- * empty string, with which the subclass will
- * attempt to do something intelligent.
- *
- * @param string $ident The identity reported to the log system.
- *
- * @param array $conf A hash containing any additional configuration
- * information that a subclass might need.
- *
- * @param int $level Log messages up to and including this level.
- *
- * @return object Log The newly created concrete Log instance, or
- * null on an error.
- * @access public
- * @since Log 1.0
- */
- public static function singleton($handler, $name = '', $ident = '',
- $conf = array(), $level = PEAR_LOG_DEBUG)
- {
- static $instances;
- if (!isset($instances)) $instances = array();
-
- $signature = serialize(array($handler, $name, $ident, $conf, $level));
- if (!isset($instances[$signature])) {
- $instances[$signature] = Log::factory($handler, $name, $ident,
- $conf, $level);
- }
-
- return $instances[$signature];
- }
-
- /**
- * Abstract implementation of the open() method.
- * @since Log 1.0
- */
- function open()
- {
- return false;
- }
-
- /**
- * Abstract implementation of the close() method.
- * @since Log 1.0
- */
- function close()
- {
- return false;
- }
-
- /**
- * Abstract implementation of the flush() method.
- * @since Log 1.8.2
- */
- function flush()
- {
- return false;
- }
-
- /**
- * Abstract implementation of the log() method.
- * @since Log 1.0
- */
- function log($message, $priority = null)
- {
- return false;
- }
-
- /**
- * A convenience function for logging a emergency event. It will log a
- * message at the PEAR_LOG_EMERG log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function emerg($message)
- {
- return $this->log($message, PEAR_LOG_EMERG);
- }
-
- /**
- * A convenience function for logging an alert event. It will log a
- * message at the PEAR_LOG_ALERT log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function alert($message)
- {
- return $this->log($message, PEAR_LOG_ALERT);
- }
-
- /**
- * A convenience function for logging a critical event. It will log a
- * message at the PEAR_LOG_CRIT log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function crit($message)
- {
- return $this->log($message, PEAR_LOG_CRIT);
- }
-
- /**
- * A convenience function for logging a error event. It will log a
- * message at the PEAR_LOG_ERR log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function err($message)
- {
- return $this->log($message, PEAR_LOG_ERR);
- }
-
- /**
- * A convenience function for logging a warning event. It will log a
- * message at the PEAR_LOG_WARNING log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function warning($message)
- {
- return $this->log($message, PEAR_LOG_WARNING);
- }
-
- /**
- * A convenience function for logging a notice event. It will log a
- * message at the PEAR_LOG_NOTICE log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function notice($message)
- {
- return $this->log($message, PEAR_LOG_NOTICE);
- }
-
- /**
- * A convenience function for logging a information event. It will log a
- * message at the PEAR_LOG_INFO log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function info($message)
- {
- return $this->log($message, PEAR_LOG_INFO);
- }
-
- /**
- * A convenience function for logging a debug event. It will log a
- * message at the PEAR_LOG_DEBUG log level.
- *
- * @param mixed $message String or object containing the message
- * to log.
- *
- * @return boolean True if the message was successfully logged.
- *
- * @access public
- * @since Log 1.7.0
- */
- function debug($message)
- {
- return $this->log($message, PEAR_LOG_DEBUG);
- }
-
- /**
- * Returns the string representation of the message data.
- *
- * If $message is an object, _extractMessage() will attempt to extract
- * the message text using a known method (such as a PEAR_Error object's
- * getMessage() method). If a known method, cannot be found, the
- * serialized representation of the object will be returned.
- *
- * If the message data is already a string, it will be returned unchanged.
- *
- * @param mixed $message The original message data. This may be a
- * string or any object.
- *
- * @return string The string representation of the message.
- *
- * @access protected
- */
- function _extractMessage($message)
- {
- /*
- * If we've been given an object, attempt to extract the message using
- * a known method. If we can't find such a method, default to the
- * "human-readable" version of the object.
- *
- * We also use the human-readable format for arrays.
- */
- if (is_object($message)) {
- if (method_exists($message, 'getmessage')) {
- $message = $message->getMessage();
- } else if (method_exists($message, 'tostring')) {
- $message = $message->toString();
- } else if (method_exists($message, '__tostring')) {
- $message = (string)$message;
- } else {
- $message = var_export($message, true);
- }
- } else if (is_array($message)) {
- if (isset($message['message'])) {
- if (is_scalar($message['message'])) {
- $message = $message['message'];
- } else {
- $message = var_export($message['message'], true);
- }
- } else {
- $message = var_export($message, true);
- }
- } else if (is_bool($message) || $message === NULL) {
- $message = var_export($message, true);
- }
-
- /* Otherwise, we assume the message is a string. */
- return $message;
- }
-
- /**
- * Using debug_backtrace(), returns the file, line, and enclosing function
- * name of the source code context from which log() was invoked.
- *
- * @param int $depth The initial number of frames we should step
- * back into the trace.
- *
- * @return array Array containing four strings: the filename, the line,
- * the function name, and the class name from which log()
- * was called.
- *
- * @access private
- * @since Log 1.9.4
- */
- function _getBacktraceVars($depth)
- {
- /* Start by generating a backtrace from the current call (here). */
- $bt = debug_backtrace();
-
- /* Store some handy shortcuts to our previous frames. */
- $bt0 = isset($bt[$depth]) ? $bt[$depth] : null;
- $bt1 = isset($bt[$depth + 1]) ? $bt[$depth + 1] : null;
-
- /*
- * If we were ultimately invoked by the composite handler, we need to
- * increase our depth one additional level to compensate.
- */
- $class = isset($bt1['class']) ? $bt1['class'] : null;
- if ($class !== null && strcasecmp($class, 'Log_composite') == 0) {
- $depth++;
- $bt0 = isset($bt[$depth]) ? $bt[$depth] : null;
- $bt1 = isset($bt[$depth + 1]) ? $bt[$depth + 1] : null;
- $class = isset($bt1['class']) ? $bt1['class'] : null;
- }
-
- /*
- * We're interested in the frame which invoked the log() function, so
- * we need to walk back some number of frames into the backtrace. The
- * $depth parameter tells us where to start looking. We go one step
- * further back to find the name of the encapsulating function from
- * which log() was called.
- */
- $file = isset($bt0) ? $bt0['file'] : null;
- $line = isset($bt0) ? $bt0['line'] : 0;
- $func = isset($bt1) ? $bt1['function'] : null;
-
- /*
- * However, if log() was called from one of our "shortcut" functions,
- * we're going to need to go back an additional step.
- */
- if (in_array($func, array('emerg', 'alert', 'crit', 'err', 'warning',
- 'notice', 'info', 'debug'))) {
- $bt2 = isset($bt[$depth + 2]) ? $bt[$depth + 2] : null;
-
- $file = is_array($bt1) ? $bt1['file'] : null;
- $line = is_array($bt1) ? $bt1['line'] : 0;
- $func = is_array($bt2) ? $bt2['function'] : null;
- $class = isset($bt2['class']) ? $bt2['class'] : null;
- }
-
- /*
- * If we couldn't extract a function name (perhaps because we were
- * executed from the "main" context), provide a default value.
- */
- if ($func === null) {
- $func = '(none)';
- }
-
- /* Return a 4-tuple containing (file, line, function, class). */
- return array($file, $line, $func, $class);
- }
-
- /**
- * Sets the starting depth to use when walking a backtrace in search of
- * the function that invoked the log system. This is used on conjunction
- * with the 'file', 'line', 'function', and 'class' formatters.
- *
- * @param int $depth The new backtrace depth.
- *
- * @access public
- * @since Log 1.12.7
- */
- public function setBacktraceDepth($depth)
- {
- $this->_backtrace_depth = $depth;
- }
-
- /**
- * Produces a formatted log line based on a format string and a set of
- * variables representing the current log record and state.
- *
- * @return string Formatted log string.
- *
- * @access protected
- * @since Log 1.9.4
- */
- function _format($format, $timestamp, $priority, $message)
- {
- /*
- * If the format string references any of the backtrace-driven
- * variables (%5 %6,%7,%8), generate the backtrace and fetch them.
- */
- if (preg_match('/%[5678]/', $format)) {
- /* Plus 2 to account for our internal function calls. */
- $d = $this->_backtrace_depth + 2;
- list($file, $line, $func, $class) = $this->_getBacktraceVars($d);
- }
-
- /*
- * Build the formatted string. We use the sprintf() function's
- * "argument swapping" capability to dynamically select and position
- * the variables which will ultimately appear in the log string.
- */
- return sprintf($format,
- $timestamp,
- $this->_ident,
- $this->priorityToString($priority),
- $message,
- isset($file) ? $file : '',
- isset($line) ? $line : '',
- isset($func) ? $func : '',
- isset($class) ? $class : '');
- }
-
- /**
- * Returns the string representation of a PEAR_LOG_* integer constant.
- *
- * @param int $priority A PEAR_LOG_* integer constant.
- *
- * @return string The string representation of $level.
- *
- * @access public
- * @since Log 1.0
- */
- function priorityToString($priority)
- {
- $levels = array(
- PEAR_LOG_EMERG => 'emergency',
- PEAR_LOG_ALERT => 'alert',
- PEAR_LOG_CRIT => 'critical',
- PEAR_LOG_ERR => 'error',
- PEAR_LOG_WARNING => 'warning',
- PEAR_LOG_NOTICE => 'notice',
- PEAR_LOG_INFO => 'info',
- PEAR_LOG_DEBUG => 'debug'
- );
-
- return $levels[$priority];
- }
-
- /**
- * Returns the the PEAR_LOG_* integer constant for the given string
- * representation of a priority name. This function performs a
- * case-insensitive search.
- *
- * @param string $name String containing a priority name.
- *
- * @return string The PEAR_LOG_* integer contstant corresponding
- * the the specified priority name.
- *
- * @access public
- * @since Log 1.9.0
- */
- function stringToPriority($name)
- {
- $levels = array(
- 'emergency' => PEAR_LOG_EMERG,
- 'alert' => PEAR_LOG_ALERT,
- 'critical' => PEAR_LOG_CRIT,
- 'error' => PEAR_LOG_ERR,
- 'warning' => PEAR_LOG_WARNING,
- 'notice' => PEAR_LOG_NOTICE,
- 'info' => PEAR_LOG_INFO,
- 'debug' => PEAR_LOG_DEBUG
- );
-
- return $levels[strtolower($name)];
- }
-
- /**
- * Calculate the log mask for the given priority.
- *
- * This method may be called statically.
- *
- * @param integer $priority The priority whose mask will be calculated.
- *
- * @return integer The calculated log mask.
- *
- * @access public
- * @since Log 1.7.0
- */
- public static function MASK($priority)
- {
- return (1 << $priority);
- }
-
- /**
- * Calculate the log mask for all priorities up to the given priority.
- *
- * This method may be called statically.
- *
- * @param integer $priority The maximum priority covered by this mask.
- *
- * @return integer The resulting log mask.
- *
- * @access public
- * @since Log 1.7.0
- *
- * @deprecated deprecated since Log 1.9.4; use Log::MAX() instead
- */
- public static function UPTO($priority)
- {
- return Log::MAX($priority);
- }
-
- /**
- * Calculate the log mask for all priorities greater than or equal to the
- * given priority. In other words, $priority will be the lowest priority
- * matched by the resulting mask.
- *
- * This method may be called statically.
- *
- * @param integer $priority The minimum priority covered by this mask.
- *
- * @return integer The resulting log mask.
- *
- * @access public
- * @since Log 1.9.4
- */
- public static function MIN($priority)
- {
- return PEAR_LOG_ALL ^ ((1 << $priority) - 1);
- }
-
- /**
- * Calculate the log mask for all priorities less than or equal to the
- * given priority. In other words, $priority will be the highests priority
- * matched by the resulting mask.
- *
- * This method may be called statically.
- *
- * @param integer $priority The maximum priority covered by this mask.
- *
- * @return integer The resulting log mask.
- *
- * @access public
- * @since Log 1.9.4
- */
- public static function MAX($priority)
- {
- return ((1 << ($priority + 1)) - 1);
- }
-
- /**
- * Set and return the level mask for the current Log instance.
- *
- * @param integer $mask A bitwise mask of log levels.
- *
- * @return integer The current level mask.
- *
- * @access public
- * @since Log 1.7.0
- */
- function setMask($mask)
- {
- $this->_mask = $mask;
-
- return $this->_mask;
- }
-
- /**
- * Returns the current level mask.
- *
- * @return integer The current level mask.
- *
- * @access public
- * @since Log 1.7.0
- */
- function getMask()
- {
- return $this->_mask;
- }
-
- /**
- * Check if the given priority is included in the current level mask.
- *
- * @param integer $priority The priority to check.
- *
- * @return boolean True if the given priority is included in the current
- * log mask.
- *
- * @access protected
- * @since Log 1.7.0
- */
- function _isMasked($priority)
- {
- return (Log::MASK($priority) & $this->_mask);
- }
-
- /**
- * Returns the current default priority.
- *
- * @return integer The current default priority.
- *
- * @access public
- * @since Log 1.8.4
- */
- function getPriority()
- {
- return $this->_priority;
- }
-
- /**
- * Sets the default priority to the specified value.
- *
- * @param integer $priority The new default priority.
- *
- * @access public
- * @since Log 1.8.4
- */
- function setPriority($priority)
- {
- $this->_priority = $priority;
- }
-
- /**
- * Adds a Log_observer instance to the list of observers that are listening
- * for messages emitted by this Log instance.
- *
- * @param object $observer The Log_observer instance to attach as a
- * listener.
- *
- * @return boolean True if the observer is successfully attached.
- *
- * @access public
- * @since Log 1.0
- */
- function attach(&$observer)
- {
- if (!is_a($observer, 'Log_observer')) {
- return false;
- }
-
- $this->_listeners[$observer->_id] = &$observer;
-
- return true;
- }
-
- /**
- * Removes a Log_observer instance from the list of observers.
- *
- * @param object $observer The Log_observer instance to detach from
- * the list of listeners.
- *
- * @return boolean True if the observer is successfully detached.
- *
- * @access public
- * @since Log 1.0
- */
- function detach($observer)
- {
- if (!is_a($observer, 'Log_observer') ||
- !isset($this->_listeners[$observer->_id])) {
- return false;
- }
-
- unset($this->_listeners[$observer->_id]);
-
- return true;
- }
-
- /**
- * Informs each registered observer instance that a new message has been
- * logged.
- *
- * @param array $event A hash describing the log event.
- *
- * @access protected
- */
- function _announce($event)
- {
- foreach ($this->_listeners as $id => $listener) {
- if ($event['priority'] <= $this->_listeners[$id]->_priority) {
- $this->_listeners[$id]->notify($event);
- }
- }
- }
-
- /**
- * Indicates whether this is a composite class.
- *
- * @return boolean True if this is a composite class.
- *
- * @access public
- * @since Log 1.0
- */
- function isComposite()
- {
- return false;
- }
-
- /**
- * Sets this Log instance's identification string.
- *
- * @param string $ident The new identification string.
- *
- * @access public
- * @since Log 1.6.3
- */
- function setIdent($ident)
- {
- $this->_ident = $ident;
- }
-
- /**
- * Returns the current identification string.
- *
- * @return string The current Log instance's identification string.
- *
- * @access public
- * @since Log 1.6.3
- */
- function getIdent()
- {
- return $this->_ident;
- }
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/composite.php b/modules/blockrss/vendor/pear/log/Log/composite.php
deleted file mode 100644
index 41fcd943a..000000000
--- a/modules/blockrss/vendor/pear/log/Log/composite.php
+++ /dev/null
@@ -1,274 +0,0 @@
-
- * @author Jon Parise
- *
- * @since Horde 1.3
- * @since Log 1.0
- * @package Log
- *
- * @example composite.php Using the composite handler.
- */
-class Log_composite extends Log
-{
- /**
- * Array holding all of the Log instances to which log events should be
- * sent.
- *
- * @var array
- * @access private
- */
- var $_children = array();
-
-
- /**
- * Constructs a new composite Log object.
- *
- * @param string $name This parameter is ignored.
- * @param string $ident This parameter is ignored.
- * @param array $conf This parameter is ignored.
- * @param int $level This parameter is ignored.
- *
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_ident = $ident;
- }
-
- /**
- * Opens all of the child instances.
- *
- * @return True if all of the child instances were successfully opened.
- *
- * @access public
- */
- function open()
- {
- /* Attempt to open each of our children. */
- $this->_opened = true;
- foreach ($this->_children as $child) {
- $this->_opened &= $child->open();
- }
-
- /* If all children were opened, return success. */
- return $this->_opened;
- }
-
- /**
- * Closes all open child instances.
- *
- * @return True if all of the opened child instances were successfully
- * closed.
- *
- * @access public
- */
- function close()
- {
- /* If we haven't been opened, there's nothing more to do. */
- if (!$this->_opened) {
- return true;
- }
-
- /* Attempt to close each of our children. */
- $closed = true;
- foreach ($this->_children as $child) {
- if ($child->_opened) {
- $closed &= $child->close();
- }
- }
-
- /* Clear the opened state for consistency. */
- $this->_opened = false;
-
- /* If all children were closed, return success. */
- return $closed;
- }
-
- /**
- * Flushes all child instances. It is assumed that all of the children
- * have been successfully opened.
- *
- * @return True if all of the child instances were successfully flushed.
- *
- * @access public
- * @since Log 1.8.2
- */
- function flush()
- {
- /* Attempt to flush each of our children. */
- $flushed = true;
- foreach ($this->_children as $child) {
- $flushed &= $child->flush();
- }
-
- /* If all children were flushed, return success. */
- return $flushed;
- }
-
- /**
- * Sends $message and $priority to each child of this composite. If the
- * appropriate children aren't already open, they will be opened here.
- *
- * @param mixed $message String or object containing the message
- * to log.
- * @param string $priority (optional) The priority of the message.
- * Valid values are: PEAR_LOG_EMERG,
- * PEAR_LOG_ALERT, PEAR_LOG_CRIT,
- * PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and
- * PEAR_LOG_DEBUG.
- *
- * @return boolean True if the entry is successfully logged.
- *
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /*
- * Abort early if the priority is above the composite handler's
- * maximum logging level.
- *
- * XXX: Consider whether or not introducing this change would break
- * backwards compatibility. Some users may be expecting composite
- * handlers to pass on all events to their children regardless of
- * their own priority.
- */
- #if (!$this->_isMasked($priority)) {
- # return false;
- #}
-
- /*
- * Iterate over all of our children. If a unopened child will respond
- * to this log event, we attempt to open it immediately. The composite
- * handler's opened state will be enabled as soon as the first child
- * handler is successfully opened.
- *
- * We track an overall success state that indicates whether or not all
- * of the relevant child handlers were opened and successfully logged
- * the event. If one handler fails, we still attempt any remaining
- * children, but we consider the overall result a failure.
- */
- $success = true;
- foreach ($this->_children as $child) {
- /* If this child won't respond to this event, skip it. */
- if (!$child->_isMasked($priority)) {
- continue;
- }
-
- /* If this child has yet to be opened, attempt to do so now. */
- if (!$child->_opened) {
- $success &= $child->open();
-
- /*
- * If we've successfully opened our first handler, the
- * composite handler itself is considered to be opened.
- */
- if (!$this->_opened && $success) {
- $this->_opened = true;
- }
- }
-
- /* Finally, attempt to log the message to the child handler. */
- if ($child->_opened) {
- $success &= $child->log($message, $priority);
- }
- }
-
- /* Notify the observers. */
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- /* Return success if all of the open children logged the event. */
- return $success;
- }
-
- /**
- * Returns true if this is a composite.
- *
- * @return boolean True if this is a composite class.
- *
- * @access public
- */
- function isComposite()
- {
- return true;
- }
-
- /**
- * Sets this identification string for all of this composite's children.
- *
- * @param string $ident The new identification string.
- *
- * @access public
- * @since Log 1.6.7
- */
- function setIdent($ident)
- {
- /* Call our base class's setIdent() method. */
- parent::setIdent($ident);
-
- /* ... and then call setIdent() on all of our children. */
- foreach ($this->_children as $child) {
- $child->setIdent($ident);
- }
- }
-
- /**
- * Adds a Log instance to the list of children.
- *
- * @param object $child The Log instance to add.
- *
- * @return boolean True if the Log instance was successfully added.
- *
- * @access public
- */
- function addChild(&$child)
- {
- /* Make sure this is a Log instance. */
- if (!is_a($child, 'Log')) {
- return false;
- }
-
- $this->_children[$child->_id] = $child;
-
- return true;
- }
-
- /**
- * Removes a Log instance from the list of children.
- *
- * @param object $child The Log instance to remove.
- *
- * @return boolean True if the Log instance was successfully removed.
- *
- * @access public
- */
- function removeChild($child)
- {
- if (!is_a($child, 'Log') || !isset($this->_children[$child->_id])) {
- return false;
- }
-
- unset($this->_children[$child->_id]);
-
- return true;
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/console.php b/modules/blockrss/vendor/pear/log/Log/console.php
deleted file mode 100644
index 4b5ec85b4..000000000
--- a/modules/blockrss/vendor/pear/log/Log/console.php
+++ /dev/null
@@ -1,222 +0,0 @@
-
- * @since Log 1.1
- * @package Log
- *
- * @example console.php Using the console handler.
- */
-class Log_console extends Log
-{
- /**
- * Handle to the current output stream.
- * @var resource
- * @access private
- */
- var $_stream = null;
-
- /**
- * Is this object responsible for closing the stream resource?
- * @var bool
- * @access private
- */
- var $_closeResource = false;
-
- /**
- * Should the output be buffered or displayed immediately?
- * @var string
- * @access private
- */
- var $_buffering = false;
-
- /**
- * String holding the buffered output.
- * @var string
- * @access private
- */
- var $_buffer = '';
-
- /**
- * String containing the format of a log line.
- * @var string
- * @access private
- */
- var $_lineFormat = '%1$s %2$s [%3$s] %4$s';
-
- /**
- * String containing the timestamp format. It will be passed directly to
- * strftime(). Note that the timestamp string will generated using the
- * current locale.
- * @var string
- * @access private
- */
- var $_timeFormat = '%b %d %H:%M:%S';
-
- /**
- * Constructs a new Log_console object.
- *
- * @param string $name Ignored.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- if (!empty($conf['stream'])) {
- $this->_stream = $conf['stream'];
- } elseif (defined('STDOUT')) {
- $this->_stream = STDOUT;
- } else {
- $this->_stream = fopen('php://output', 'a');
- $this->_closeResource = true;
- }
-
- if (isset($conf['buffering'])) {
- $this->_buffering = $conf['buffering'];
- }
-
- if (!empty($conf['lineFormat'])) {
- $this->_lineFormat = str_replace(array_keys($this->_formatMap),
- array_values($this->_formatMap),
- $conf['lineFormat']);
- }
-
- if (!empty($conf['timeFormat'])) {
- $this->_timeFormat = $conf['timeFormat'];
- }
-
- /*
- * If output buffering has been requested, we need to register a
- * shutdown function that will dump the buffer upon termination.
- */
- if ($this->_buffering) {
- register_shutdown_function(array(&$this, '_Log_console'));
- }
- }
-
- /**
- * Destructor
- */
- function _Log_console()
- {
- $this->close();
- }
-
- /**
- * Open the output stream.
- *
- * @access public
- * @since Log 1.9.7
- */
- function open()
- {
- $this->_opened = true;
- return true;
- }
-
- /**
- * Closes the output stream.
- *
- * This results in a call to flush().
- *
- * @access public
- * @since Log 1.9.0
- */
- function close()
- {
- $this->flush();
- $this->_opened = false;
- if ($this->_closeResource === true && is_resource($this->_stream)) {
- fclose($this->_stream);
- }
- return true;
- }
-
- /**
- * Flushes all pending ("buffered") data to the output stream.
- *
- * @access public
- * @since Log 1.8.2
- */
- function flush()
- {
- /*
- * If output buffering is enabled, dump the contents of the buffer to
- * the output stream.
- */
- if ($this->_buffering && (strlen($this->_buffer) > 0)) {
- fwrite($this->_stream, $this->_buffer);
- $this->_buffer = '';
- }
-
- if (is_resource($this->_stream)) {
- return fflush($this->_stream);
- }
-
- return false;
- }
-
- /**
- * Writes $message to the text console. Also, passes the message
- * along to any Log_observer instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Build the string containing the complete log line. */
- $line = $this->_format($this->_lineFormat,
- strftime($this->_timeFormat),
- $priority, $message) . "\n";
-
- /*
- * If buffering is enabled, append this line to the output buffer.
- * Otherwise, print the line to the output stream immediately.
- */
- if ($this->_buffering) {
- $this->_buffer .= $line;
- } else {
- fwrite($this->_stream, $line);
- }
-
- /* Notify observers about this log message. */
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/daemon.php b/modules/blockrss/vendor/pear/log/Log/daemon.php
deleted file mode 100644
index 6a24d2bf8..000000000
--- a/modules/blockrss/vendor/pear/log/Log/daemon.php
+++ /dev/null
@@ -1,234 +0,0 @@
-
- * @version $Revision$
- * @package Log
- */
-class Log_daemon extends Log
-{
- /**
- * Integer holding the log facility to use.
- * @var string
- */
- var $_name = LOG_DAEMON;
-
- /**
- * Var holding the resource pointer to the socket
- * @var resource
- */
- var $_socket;
-
- /**
- * The ip address or servername
- * @see http://www.php.net/manual/en/transports.php
- * @var string
- */
- var $_ip = '127.0.0.1';
-
- /**
- * Protocol to use (tcp, udp, etc.)
- * @see http://www.php.net/manual/en/transports.php
- * @var string
- */
- var $_proto = 'udp';
-
- /**
- * Port to connect to
- * @var int
- */
- var $_port = 514;
-
- /**
- * Maximum message length in bytes
- * @var int
- */
- var $_maxsize = 4096;
-
- /**
- * Socket timeout in seconds
- * @var int
- */
- var $_timeout = 1;
-
- /**
- * Constructs a new syslog object.
- *
- * @param string $name The syslog facility.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Maximum level at which to log.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- /* Ensure we have a valid integer value for $name. */
- if (empty($name) || !is_int($name)) {
- $name = LOG_SYSLOG;
- }
-
- $this->_id = md5(microtime().rand());
- $this->_name = $name;
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- if (isset($conf['ip'])) {
- $this->_ip = $conf['ip'];
- }
- if (isset($conf['proto'])) {
- $this->_proto = $conf['proto'];
- }
- if (isset($conf['port'])) {
- $this->_port = $conf['port'];
- }
- if (isset($conf['maxsize'])) {
- $this->_maxsize = $conf['maxsize'];
- }
- if (isset($conf['timeout'])) {
- $this->_timeout = $conf['timeout'];
- }
- $this->_proto = $this->_proto . '://';
-
- register_shutdown_function(array(&$this, '_Log_daemon'));
- }
-
- /**
- * Destructor.
- *
- * @access private
- */
- function _Log_daemon()
- {
- $this->close();
- }
-
- /**
- * Opens a connection to the system logger, if it has not already
- * been opened. This is implicitly called by log(), if necessary.
- * @access public
- */
- function open()
- {
- if (!$this->_opened) {
- $this->_opened = (bool)($this->_socket = @fsockopen(
- $this->_proto . $this->_ip,
- $this->_port,
- $errno,
- $errstr,
- $this->_timeout));
- }
- return $this->_opened;
- }
-
- /**
- * Closes the connection to the system logger, if it is open.
- * @access public
- */
- function close()
- {
- if ($this->_opened) {
- $this->_opened = false;
- return fclose($this->_socket);
- }
- return true;
- }
-
- /**
- * Sends $message to the currently open syslog connection. Calls
- * open() if necessary. Also passes the message along to any Log_observer
- * instances that are observing this Log.
- *
- * @param string $message The textual message to be logged.
- * @param int $priority (optional) The priority of the message. Valid
- * values are: LOG_EMERG, LOG_ALERT, LOG_CRIT,
- * LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO,
- * and LOG_DEBUG. The default is LOG_INFO.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If the connection isn't open and can't be opened, return failure. */
- if (!$this->_opened && !$this->open()) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Set the facility level. */
- $facility_level = intval($this->_name) +
- intval($this->_toSyslog($priority));
-
- /* Prepend ident info. */
- if (!empty($this->_ident)) {
- $message = $this->_ident . ' ' . $message;
- }
-
- /* Check for message length. */
- if (strlen($message) > $this->_maxsize) {
- $message = substr($message, 0, ($this->_maxsize) - 10) . ' [...]';
- }
-
- /* Write to socket. */
- fwrite($this->_socket, '<' . $facility_level . '>' . $message . "\n");
-
- $this->_announce(array('priority' => $priority, 'message' => $message));
- }
-
- /**
- * Converts a PEAR_LOG_* constant into a syslog LOG_* constant.
- *
- * This function exists because, under Windows, not all of the LOG_*
- * constants have unique values. Instead, the PEAR_LOG_* were introduced
- * for global use, with the conversion to the LOG_* constants kept local to
- * to the syslog driver.
- *
- * @param int $priority PEAR_LOG_* value to convert to LOG_* value.
- *
- * @return The LOG_* representation of $priority.
- *
- * @access private
- */
- function _toSyslog($priority)
- {
- static $priorities = array(
- PEAR_LOG_EMERG => LOG_EMERG,
- PEAR_LOG_ALERT => LOG_ALERT,
- PEAR_LOG_CRIT => LOG_CRIT,
- PEAR_LOG_ERR => LOG_ERR,
- PEAR_LOG_WARNING => LOG_WARNING,
- PEAR_LOG_NOTICE => LOG_NOTICE,
- PEAR_LOG_INFO => LOG_INFO,
- PEAR_LOG_DEBUG => LOG_DEBUG
- );
-
- /* If we're passed an unknown priority, default to LOG_INFO. */
- if (!is_int($priority) || !in_array($priority, $priorities)) {
- return LOG_INFO;
- }
-
- return $priorities[$priority];
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/display.php b/modules/blockrss/vendor/pear/log/Log/display.php
deleted file mode 100644
index 9711221ec..000000000
--- a/modules/blockrss/vendor/pear/log/Log/display.php
+++ /dev/null
@@ -1,181 +0,0 @@
-
- * @since Log 1.8.0
- * @package Log
- *
- * @example display.php Using the display handler.
- */
-class Log_display extends Log
-{
- /**
- * String containing the format of a log line.
- * @var string
- * @access private
- */
- var $_lineFormat = '%3$s: %4$s';
-
- /**
- * String containing the timestamp format. It will be passed directly to
- * strftime(). Note that the timestamp string will generated using the
- * current locale.
- * @var string
- * @access private
- */
- var $_timeFormat = '%b %d %H:%M:%S';
-
- /**
- * Flag indicating whether raw message text should be passed directly to
- * the log system. Otherwise, the text will be converted to an HTML-safe
- * representation.
- * @var boolean
- * @access private
- */
- var $_rawText = false;
-
- /**
- * Constructs a new Log_display object.
- *
- * @param string $name Ignored.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name = '', $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- /* Start by configuring the line format. */
- if (!empty($conf['lineFormat'])) {
- $this->_lineFormat = str_replace(array_keys($this->_formatMap),
- array_values($this->_formatMap),
- $conf['lineFormat']);
- }
-
- /* We may need to prepend a string to our line format. */
- $prepend = null;
- if (isset($conf['error_prepend'])) {
- $prepend = $conf['error_prepend'];
- } else {
- $prepend = ini_get('error_prepend_string');
- }
- if (!empty($prepend)) {
- $this->_lineFormat = $prepend . $this->_lineFormat;
- }
-
- /* We may also need to append a string to our line format. */
- $append = null;
- if (isset($conf['error_append'])) {
- $append = $conf['error_append'];
- } else {
- $append = ini_get('error_append_string');
- }
- if (!empty($append)) {
- $this->_lineFormat .= $append;
- }
-
- /* Lastly, the line ending sequence is also configurable. */
- if (isset($conf['linebreak'])) {
- $this->_lineFormat .= $conf['linebreak'];
- } else {
- $this->_lineFormat .= "
\n";
- }
-
- /* The user can also change the time format. */
- if (!empty($conf['timeFormat'])) {
- $this->_timeFormat = $conf['timeFormat'];
- }
-
- /* Message text conversion can be disabled. */
- if (isset($conf['rawText'])) {
- $this->_rawText = $conf['rawText'];
- }
- }
-
- /**
- * Opens the display handler.
- *
- * @access public
- * @since Log 1.9.6
- */
- function open()
- {
- $this->_opened = true;
- return true;
- }
-
- /**
- * Closes the display handler.
- *
- * @access public
- * @since Log 1.9.6
- */
- function close()
- {
- $this->_opened = false;
- return true;
- }
-
- /**
- * Writes $message to the text browser. Also, passes the message
- * along to any Log_observer instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Convert the message to an HTML-friendly represention unless raw
- * text has been requested. */
- if ($this->_rawText === false) {
- $message = nl2br(htmlspecialchars($message));
- }
-
- /* Build and output the complete log line. */
- echo $this->_format($this->_lineFormat,
- strftime($this->_timeFormat),
- $priority,
- $message);
-
- /* Notify observers about this log message. */
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/error_log.php b/modules/blockrss/vendor/pear/log/Log/error_log.php
deleted file mode 100644
index 602d7cd3c..000000000
--- a/modules/blockrss/vendor/pear/log/Log/error_log.php
+++ /dev/null
@@ -1,160 +0,0 @@
-
- * @since Log 1.7.0
- * @package Log
- *
- * @example error_log.php Using the error_log handler.
- */
-class Log_error_log extends Log
-{
- /**
- * The error_log() log type.
- * @var integer
- * @access private
- */
- var $_type = PEAR_LOG_TYPE_SYSTEM;
-
- /**
- * The type-specific destination value.
- * @var string
- * @access private
- */
- var $_destination = '';
-
- /**
- * Additional headers to pass to the mail() function when the
- * PEAR_LOG_TYPE_MAIL type is used.
- * @var string
- * @access private
- */
- var $_extra_headers = '';
-
- /**
- * String containing the format of a log line.
- * @var string
- * @access private
- */
- var $_lineFormat = '%2$s: %4$s';
-
- /**
- * String containing the timestamp format. It will be passed directly to
- * strftime(). Note that the timestamp string will generated using the
- * current locale.
- * @var string
- * @access private
- */
- var $_timeFormat = '%b %d %H:%M:%S';
-
- /**
- * Constructs a new Log_error_log object.
- *
- * @param string $name One of the PEAR_LOG_TYPE_* constants.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_type = $name;
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- if (!empty($conf['destination'])) {
- $this->_destination = $conf['destination'];
- }
-
- if (!empty($conf['extra_headers'])) {
- $this->_extra_headers = $conf['extra_headers'];
- }
-
- if (!empty($conf['lineFormat'])) {
- $this->_lineFormat = str_replace(array_keys($this->_formatMap),
- array_values($this->_formatMap),
- $conf['lineFormat']);
- }
-
- if (!empty($conf['timeFormat'])) {
- $this->_timeFormat = $conf['timeFormat'];
- }
- }
-
- /**
- * Opens the handler.
- *
- * @access public
- * @since Log 1.9.6
- */
- function open()
- {
- $this->_opened = true;
- return true;
- }
-
- /**
- * Closes the handler.
- *
- * @access public
- * @since Log 1.9.6
- */
- function close()
- {
- $this->_opened = false;
- return true;
- }
-
- /**
- * Logs $message using PHP's error_log() function. The message is also
- * passed along to any Log_observer instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Build the string containing the complete log line. */
- $line = $this->_format($this->_lineFormat,
- strftime($this->_timeFormat),
- $priority, $message);
-
- /* Pass the log line and parameters to the error_log() function. */
- $success = error_log($line, $this->_type, $this->_destination,
- $this->_extra_headers);
-
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return $success;
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/file.php b/modules/blockrss/vendor/pear/log/Log/file.php
deleted file mode 100644
index 3cd5fec45..000000000
--- a/modules/blockrss/vendor/pear/log/Log/file.php
+++ /dev/null
@@ -1,316 +0,0 @@
-
- * @author Roman Neuhauser
- * @since Log 1.0
- * @package Log
- *
- * @example file.php Using the file handler.
- */
-class Log_file extends Log
-{
- /**
- * String containing the name of the log file.
- * @var string
- * @access private
- */
- var $_filename = 'php.log';
-
- /**
- * Handle to the log file.
- * @var resource
- * @access private
- */
- var $_fp = false;
-
- /**
- * Should new log entries be append to an existing log file, or should the
- * a new log file overwrite an existing one?
- * @var boolean
- * @access private
- */
- var $_append = true;
-
- /**
- * Should advisory file locking (i.e., flock()) be used?
- * @var boolean
- * @access private
- */
- var $_locking = false;
-
- /**
- * Integer (in octal) containing the log file's permissions mode.
- * @var integer
- * @access private
- */
- var $_mode = 0644;
-
- /**
- * Integer (in octal) specifying the file permission mode that will be
- * used when creating directories that do not already exist.
- * @var integer
- * @access private
- */
- var $_dirmode = 0755;
-
- /**
- * String containing the format of a log line.
- * @var string
- * @access private
- */
- var $_lineFormat = '%1$s %2$s [%3$s] %4$s';
-
- /**
- * String containing the timestamp format. It will be passed directly to
- * strftime(). Note that the timestamp string will generated using the
- * current locale.
- * @var string
- * @access private
- */
- var $_timeFormat = '%b %d %H:%M:%S';
-
- /**
- * String containing the end-on-line character sequence.
- * @var string
- * @access private
- */
- var $_eol = "\n";
-
- /**
- * Constructs a new Log_file object.
- *
- * @param string $name Ignored.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_filename = $name;
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- if (isset($conf['append'])) {
- $this->_append = $conf['append'];
- }
-
- if (isset($conf['locking'])) {
- $this->_locking = $conf['locking'];
- }
-
- if (!empty($conf['mode'])) {
- if (is_string($conf['mode'])) {
- $this->_mode = octdec($conf['mode']);
- } else {
- $this->_mode = $conf['mode'];
- }
- }
-
- if (!empty($conf['dirmode'])) {
- if (is_string($conf['dirmode'])) {
- $this->_dirmode = octdec($conf['dirmode']);
- } else {
- $this->_dirmode = $conf['dirmode'];
- }
- }
-
- if (!empty($conf['lineFormat'])) {
- $this->_lineFormat = str_replace(array_keys($this->_formatMap),
- array_values($this->_formatMap),
- $conf['lineFormat']);
- }
-
- if (!empty($conf['timeFormat'])) {
- $this->_timeFormat = $conf['timeFormat'];
- }
-
- if (!empty($conf['eol'])) {
- $this->_eol = $conf['eol'];
- } else {
- $this->_eol = (strstr(PHP_OS, 'WIN')) ? "\r\n" : "\n";
- }
-
- register_shutdown_function(array(&$this, '_Log_file'));
- }
-
- /**
- * Destructor
- */
- function _Log_file()
- {
- if ($this->_opened) {
- $this->close();
- }
- }
-
- /**
- * Creates the given directory path. If the parent directories don't
- * already exist, they will be created, too.
- *
- * This implementation is inspired by Python's os.makedirs function.
- *
- * @param string $path The full directory path to create.
- * @param integer $mode The permissions mode with which the
- * directories will be created.
- *
- * @return True if the full path is successfully created or already
- * exists.
- *
- * @access private
- */
- function _mkpath($path, $mode = 0700)
- {
- /* Separate the last pathname component from the rest of the path. */
- $head = dirname($path);
- $tail = basename($path);
-
- /* Make sure we've split the path into two complete components. */
- if (empty($tail)) {
- $head = dirname($path);
- $tail = basename($path);
- }
-
- /* Recurse up the path if our current segment does not exist. */
- if (!empty($head) && !empty($tail) && !is_dir($head)) {
- $this->_mkpath($head, $mode);
- }
-
- /* Create this segment of the path. */
- return @mkdir($head, $mode);
- }
-
- /**
- * Opens the log file for output. If the specified log file does not
- * already exist, it will be created. By default, new log entries are
- * appended to the end of the log file.
- *
- * This is implicitly called by log(), if necessary.
- *
- * @access public
- */
- function open()
- {
- if (!$this->_opened) {
- /* If the log file's directory doesn't exist, create it. */
- if (!is_dir(dirname($this->_filename))) {
- $this->_mkpath($this->_filename, $this->_dirmode);
- }
-
- /* Determine whether the log file needs to be created. */
- $creating = !file_exists($this->_filename);
-
- /* Obtain a handle to the log file. */
- $this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w');
-
- /* We consider the file "opened" if we have a valid file pointer. */
- $this->_opened = ($this->_fp !== false);
-
- /* Attempt to set the file's permissions if we just created it. */
- if ($creating && $this->_opened) {
- chmod($this->_filename, $this->_mode);
- }
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the log file if it is open.
- *
- * @access public
- */
- function close()
- {
- /* If the log file is open, close it. */
- if ($this->_opened && fclose($this->_fp)) {
- $this->_opened = false;
- }
-
- return ($this->_opened === false);
- }
-
- /**
- * Flushes all pending data to the file handle.
- *
- * @access public
- * @since Log 1.8.2
- */
- function flush()
- {
- if (is_resource($this->_fp)) {
- return fflush($this->_fp);
- }
-
- return false;
- }
-
- /**
- * Logs $message to the output window. The message is also passed along
- * to any Log_observer instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If the log file isn't already open, open it now. */
- if (!$this->_opened && !$this->open()) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Build the string containing the complete log line. */
- $line = $this->_format($this->_lineFormat,
- strftime($this->_timeFormat),
- $priority, $message) . $this->_eol;
-
- /* If locking is enabled, acquire an exclusive lock on the file. */
- if ($this->_locking) {
- flock($this->_fp, LOCK_EX);
- }
-
- /* Write the log line to the log file. */
- $success = (fwrite($this->_fp, $line) !== false);
-
- /* Unlock the file now that we're finished writing to it. */
- if ($this->_locking) {
- flock($this->_fp, LOCK_UN);
- }
-
- /* Notify observers about this log message. */
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return $success;
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/firebug.php b/modules/blockrss/vendor/pear/log/Log/firebug.php
deleted file mode 100644
index b30cdbd86..000000000
--- a/modules/blockrss/vendor/pear/log/Log/firebug.php
+++ /dev/null
@@ -1,207 +0,0 @@
-
- * @since Log 1.9.11
- * @package Log
- *
- * @example firebug.php Using the firebug handler.
- */
-class Log_firebug extends Log
-{
- /**
- * Should the output be buffered or displayed immediately?
- * @var string
- * @access private
- */
- var $_buffering = false;
-
- /**
- * String holding the buffered output.
- * @var string
- * @access private
- */
- var $_buffer = array();
-
- /**
- * String containing the format of a log line.
- * @var string
- * @access private
- */
- var $_lineFormat = '%2$s [%3$s] %4$s';
-
- /**
- * String containing the timestamp format. It will be passed directly to
- * strftime(). Note that the timestamp string will generated using the
- * current locale.
- *
- * Note! Default lineFormat of this driver does not display time.
- *
- * @var string
- * @access private
- */
- var $_timeFormat = '%b %d %H:%M:%S';
-
- /**
- * Mapping of log priorities to Firebug methods.
- * @var array
- * @access private
- */
- var $_methods = array(
- PEAR_LOG_EMERG => 'error',
- PEAR_LOG_ALERT => 'error',
- PEAR_LOG_CRIT => 'error',
- PEAR_LOG_ERR => 'error',
- PEAR_LOG_WARNING => 'warn',
- PEAR_LOG_NOTICE => 'info',
- PEAR_LOG_INFO => 'info',
- PEAR_LOG_DEBUG => 'debug'
- );
-
- /**
- * Constructs a new Log_firebug object.
- *
- * @param string $name Ignored.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name = '', $ident = 'PHP', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
- if (isset($conf['buffering'])) {
- $this->_buffering = $conf['buffering'];
- }
-
- if ($this->_buffering) {
- register_shutdown_function(array(&$this, '_Log_firebug'));
- }
-
- if (!empty($conf['lineFormat'])) {
- $this->_lineFormat = str_replace(array_keys($this->_formatMap),
- array_values($this->_formatMap),
- $conf['lineFormat']);
- }
-
- if (!empty($conf['timeFormat'])) {
- $this->_timeFormat = $conf['timeFormat'];
- }
- }
-
- /**
- * Opens the firebug handler.
- *
- * @access public
- */
- function open()
- {
- $this->_opened = true;
- return true;
- }
-
- /**
- * Destructor
- */
- function _Log_firebug()
- {
- $this->close();
- }
-
- /**
- * Closes the firebug handler.
- *
- * @access public
- */
- function close()
- {
- $this->flush();
- $this->_opened = false;
- return true;
- }
-
- /**
- * Flushes all pending ("buffered") data.
- *
- * @access public
- */
- function flush() {
- if (count($this->_buffer)) {
- print '\n";
- };
- $this->_buffer = array();
- }
-
- /**
- * Writes $message to Firebug console. Also, passes the message
- * along to any Log_observer instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
- $method = $this->_methods[$priority];
-
- /* normalize line breaks and escape quotes*/
- $message = preg_replace("/\r?\n/", "\\n", addslashes($message));
-
- /* Build the string containing the complete log line. */
- $line = $this->_format($this->_lineFormat,
- strftime($this->_timeFormat),
- $priority,
- $message);
-
- if ($this->_buffering) {
- $this->_buffer[] = sprintf('console.%s("%s");', $method, $line);
- } else {
- print '\n";
- }
- /* Notify observers about this log message. */
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/index.php b/modules/blockrss/vendor/pear/log/Log/index.php
deleted file mode 100644
index 051e0122d..000000000
--- a/modules/blockrss/vendor/pear/log/Log/index.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
-* @copyright 2010-2021 Webkul IN
-* @license https://store.webkul.com/license.html
-*/
-
-header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
-
-header('Cache-Control: no-store, no-cache, must-revalidate');
-header('Cache-Control: post-check=0, pre-check=0', false);
-header('Pragma: no-cache');
-
-header('Location: ../../../');
-exit;
diff --git a/modules/blockrss/vendor/pear/log/Log/mail.php b/modules/blockrss/vendor/pear/log/Log/mail.php
deleted file mode 100644
index 5c079ee83..000000000
--- a/modules/blockrss/vendor/pear/log/Log/mail.php
+++ /dev/null
@@ -1,294 +0,0 @@
-
- * @author Jon Parise
- * @since Log 1.3
- * @package Log
- *
- * @example mail.php Using the mail handler.
- */
-class Log_mail extends Log
-{
- /**
- * String holding the recipients' email addresses. Multiple addresses
- * should be separated with commas.
- * @var string
- * @access private
- */
- var $_recipients = '';
-
- /**
- * String holding the sender's email address.
- * @var string
- * @access private
- */
- var $_from = '';
-
- /**
- * String holding the email's subject.
- * @var string
- * @access private
- */
- var $_subject = '[Log_mail] Log message';
-
- /**
- * String holding an optional preamble for the log messages.
- * @var string
- * @access private
- */
- var $_preamble = '';
-
- /**
- * String containing the format of a log line.
- * @var string
- * @access private
- */
- var $_lineFormat = '%1$s %2$s [%3$s] %4$s';
-
- /**
- * String containing the timestamp format. It will be passed directly to
- * strftime(). Note that the timestamp string will generated using the
- * current locale.
- * @var string
- * @access private
- */
- var $_timeFormat = '%b %d %H:%M:%S';
-
- /**
- * String holding the mail message body.
- * @var string
- * @access private
- */
- var $_message = '';
-
- /**
- * Flag used to indicated that log lines have been written to the message
- * body and the message should be sent on close().
- * @var boolean
- * @access private
- */
- var $_shouldSend = false;
-
- /**
- * String holding the backend name of PEAR::Mail
- * @var string
- * @access private
- */
- var $_mailBackend = '';
-
- /**
- * Array holding the params for PEAR::Mail
- * @var array
- * @access private
- */
- var $_mailParams = array();
-
- /**
- * Constructs a new Log_mail object.
- *
- * Here is how you can customize the mail driver with the conf[] hash :
- * $conf['from']: the mail's "From" header line,
- * $conf['subject']: the mail's "Subject" line.
- * $conf['mailBackend']: backend name of PEAR::Mail
- * $conf['mailParams']: parameters for the PEAR::Mail backend
- *
- * @param string $name The message's recipients.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_recipients = $name;
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- if (!empty($conf['from'])) {
- $this->_from = $conf['from'];
- } else {
- $this->_from = ini_get('sendmail_from');
- }
-
- if (!empty($conf['subject'])) {
- $this->_subject = $conf['subject'];
- }
-
- if (!empty($conf['preamble'])) {
- $this->_preamble = $conf['preamble'];
- }
-
- if (!empty($conf['lineFormat'])) {
- $this->_lineFormat = str_replace(array_keys($this->_formatMap),
- array_values($this->_formatMap),
- $conf['lineFormat']);
- }
-
- if (!empty($conf['timeFormat'])) {
- $this->_timeFormat = $conf['timeFormat'];
- }
-
- if (!empty($conf['mailBackend'])) {
- $this->_mailBackend = $conf['mailBackend'];
- }
-
- if (!empty($conf['mailParams'])) {
- $this->_mailParams = $conf['mailParams'];
- }
-
- /* register the destructor */
- register_shutdown_function(array(&$this, '_Log_mail'));
- }
-
- /**
- * Destructor. Calls close().
- *
- * @access private
- */
- function _Log_mail()
- {
- $this->close();
- }
-
- /**
- * Starts a new mail message.
- * This is implicitly called by log(), if necessary.
- *
- * @access public
- */
- function open()
- {
- if (!$this->_opened) {
- if (!empty($this->_preamble)) {
- $this->_message = $this->_preamble . "\r\n\r\n";
- }
- $this->_opened = true;
- $_shouldSend = false;
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the message, if it is open, and sends the mail.
- * This is implicitly called by the destructor, if necessary.
- *
- * @access public
- */
- function close()
- {
- if ($this->_opened) {
- if ($this->_shouldSend && !empty($this->_message)) {
- if ($this->_mailBackend === '') { // use mail()
- $headers = "From: $this->_from\r\n";
- $headers .= 'User-Agent: PEAR Log Package';
- if (mail($this->_recipients, $this->_subject,
- $this->_message, $headers) == false) {
- return false;
- }
- } else { // use PEAR::Mail
- include_once 'Mail.php';
- $headers = array('From' => $this->_from,
- 'To' => $this->_recipients,
- 'User-Agent' => 'PEAR Log Package',
- 'Subject' => $this->_subject);
- $mailer = &Mail::factory($this->_mailBackend,
- $this->_mailParams);
- $res = $mailer->send($this->_recipients, $headers,
- $this->_message);
- if (PEAR::isError($res)) {
- return false;
- }
- }
-
- /* Clear the message string now that the email has been sent. */
- $this->_message = '';
- $this->_shouldSend = false;
- }
- $this->_opened = false;
- }
-
- return ($this->_opened === false);
- }
-
- /**
- * Flushes the log output by forcing the email message to be sent now.
- * Events that are logged after flush() is called will be appended to a
- * new email message.
- *
- * @access public
- * @since Log 1.8.2
- */
- function flush()
- {
- /*
- * It's sufficient to simply call close() to flush the output.
- * The next call to log() will cause the handler to be reopened.
- */
- return $this->close();
- }
-
- /**
- * Writes $message to the currently open mail message.
- * Calls open(), if necessary.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If the message isn't open and can't be opened, return failure. */
- if (!$this->_opened && !$this->open()) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Append the string containing the complete log line. */
- $this->_message .= $this->_format($this->_lineFormat,
- strftime($this->_timeFormat),
- $priority, $message) . "\r\n";
- $this->_shouldSend = true;
-
- /* Notify observers about this log message. */
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/mcal.php b/modules/blockrss/vendor/pear/log/Log/mcal.php
deleted file mode 100644
index 57b9e6e6d..000000000
--- a/modules/blockrss/vendor/pear/log/Log/mcal.php
+++ /dev/null
@@ -1,169 +0,0 @@
-
- * @since Horde 1.3
- * @since Log 1.0
- * @package Log
- */
-class Log_mcal extends Log
-{
- /**
- * holding the calendar specification to connect to.
- * @var string
- * @access private
- */
- var $_calendar = '{localhost/mstore}';
-
- /**
- * holding the username to use.
- * @var string
- * @access private
- */
- var $_username = '';
-
- /**
- * holding the password to use.
- * @var string
- * @access private
- */
- var $_password = '';
-
- /**
- * holding the options to pass to the calendar stream.
- * @var integer
- * @access private
- */
- var $_options = 0;
-
- /**
- * ResourceID of the MCAL stream.
- * @var string
- * @access private
- */
- var $_stream = '';
-
- /**
- * Integer holding the log facility to use.
- * @var string
- * @access private
- */
- var $_name = LOG_SYSLOG;
-
- /**
- * Constructs a new Log_mcal object.
- *
- * @param string $name The category to use for our events.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_name = $name;
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
- $this->_calendar = $conf['calendar'];
- $this->_username = $conf['username'];
- $this->_password = $conf['password'];
- $this->_options = $conf['options'];
- }
-
- /**
- * Opens a calendar stream, if it has not already been
- * opened. This is implicitly called by log(), if necessary.
- * @access public
- */
- function open()
- {
- if (!$this->_opened) {
- $this->_stream = mcal_open($this->_calendar, $this->_username,
- $this->_password, $this->_options);
- $this->_opened = true;
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the calendar stream, if it is open.
- * @access public
- */
- function close()
- {
- if ($this->_opened) {
- mcal_close($this->_stream);
- $this->_opened = false;
- }
-
- return ($this->_opened === false);
- }
-
- /**
- * Logs $message and associated information to the currently open
- * calendar stream. Calls open() if necessary. Also passes the
- * message along to any Log_observer instances that are observing
- * this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If the connection isn't open and can't be opened, return failure. */
- if (!$this->_opened && !$this->open()) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- $date_str = date('Y:n:j:G:i:s');
- $dates = explode(':', $date_str);
-
- mcal_event_init($this->_stream);
- mcal_event_set_title($this->_stream, $this->_ident);
- mcal_event_set_category($this->_stream, $this->_name);
- mcal_event_set_description($this->_stream, $message);
- mcal_event_add_attribute($this->_stream, 'priority', $priority);
- mcal_event_set_start($this->_stream, $dates[0], $dates[1], $dates[2],
- $dates[3], $dates[4], $dates[5]);
- mcal_event_set_end($this->_stream, $dates[0], $dates[1], $dates[2],
- $dates[3], $dates[4], $dates[5]);
- mcal_append_event($this->_stream);
-
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/mdb2.php b/modules/blockrss/vendor/pear/log/Log/mdb2.php
deleted file mode 100644
index 6a0b45c7a..000000000
--- a/modules/blockrss/vendor/pear/log/Log/mdb2.php
+++ /dev/null
@@ -1,358 +0,0 @@
-
- * @author Jon Parise
- * @since Log 1.9.0
- * @package Log
- */
-class Log_mdb2 extends Log
-{
- /**
- * Variable containing the DSN information.
- * @var mixed
- * @access private
- */
- var $_dsn = '';
-
- /**
- * Array containing our set of DB configuration options.
- * @var array
- * @access private
- */
- var $_options = array('persistent' => true);
-
- /**
- * Object holding the database handle.
- * @var object
- * @access private
- */
- var $_db = null;
-
- /**
- * Resource holding the prepared statement handle.
- * @var resource
- * @access private
- */
- var $_statement = null;
-
- /**
- * Flag indicating that we're using an existing database connection.
- * @var boolean
- * @access private
- */
- var $_existingConnection = false;
-
- /**
- * String holding the database table to use.
- * @var string
- * @access private
- */
- var $_table = 'log_table';
-
- /**
- * String holding the name of the ID sequence.
- * @var string
- * @access private
- */
- var $_sequence = 'log_id';
-
- /**
- * Maximum length of the $ident string. This corresponds to the size of
- * the 'ident' column in the SQL table.
- * @var integer
- * @access private
- */
- var $_identLimit = 16;
-
- /**
- * Set of field types used in the database table.
- * @var array
- * @access private
- */
- var $_types = array(
- 'id' => 'integer',
- 'logtime' => 'timestamp',
- 'ident' => 'text',
- 'priority' => 'text',
- 'message' => 'clob'
- );
-
- /**
- * Constructs a new sql logging object.
- *
- * @param string $name The target SQL table.
- * @param string $ident The identification field.
- * @param array $conf The connection configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_table = $name;
- $this->_mask = Log::UPTO($level);
-
- /* If an options array was provided, use it. */
- if (isset($conf['options']) && is_array($conf['options'])) {
- $this->_options = $conf['options'];
- }
-
- /* If a specific sequence name was provided, use it. */
- if (!empty($conf['sequence'])) {
- $this->_sequence = $conf['sequence'];
- }
-
- /* If a specific sequence name was provided, use it. */
- if (isset($conf['identLimit'])) {
- $this->_identLimit = $conf['identLimit'];
- }
-
- /* Now that the ident limit is confirmed, set the ident string. */
- $this->setIdent($ident);
-
- /* If an existing database connection was provided, use it. */
- if (isset($conf['db'])) {
- $this->_db = &$conf['db'];
- $this->_existingConnection = true;
- $this->_opened = true;
- } elseif (isset($conf['singleton'])) {
- $this->_db = &MDB2::singleton($conf['singleton'], $this->_options);
- $this->_existingConnection = true;
- $this->_opened = true;
- } else {
- $this->_dsn = $conf['dsn'];
- }
- }
-
- /**
- * Opens a connection to the database, if it has not already
- * been opened. This is implicitly called by log(), if necessary.
- *
- * @return boolean True on success, false on failure.
- * @access public
- */
- function open()
- {
- if (!$this->_opened) {
- /* Use the DSN and options to create a database connection. */
- $this->_db = &MDB2::connect($this->_dsn, $this->_options);
- if (PEAR::isError($this->_db)) {
- return false;
- }
-
- /* Create a prepared statement for repeated use in log(). */
- if (!$this->_prepareStatement()) {
- return false;
- }
-
- /* We now consider out connection open. */
- $this->_opened = true;
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the connection to the database if it is still open and we were
- * the ones that opened it. It is the caller's responsible to close an
- * existing connection that was passed to us via $conf['db'].
- *
- * @return boolean True on success, false on failure.
- * @access public
- */
- function close()
- {
- /* If we have a statement object, free it. */
- if (is_object($this->_statement)) {
- $this->_statement->free();
- $this->_statement = null;
- }
-
- /* If we opened the database connection, disconnect it. */
- if ($this->_opened && !$this->_existingConnection) {
- $this->_opened = false;
- return $this->_db->disconnect();
- }
-
- return ($this->_opened === false);
- }
-
- /**
- * Sets this Log instance's identification string. Note that this
- * SQL-specific implementation will limit the length of the $ident string
- * to sixteen (16) characters.
- *
- * @param string $ident The new identification string.
- *
- * @access public
- * @since Log 1.8.5
- */
- function setIdent($ident)
- {
- $this->_ident = substr($ident, 0, $this->_identLimit);
- }
-
- /**
- * Inserts $message to the currently open database. Calls open(),
- * if necessary. Also passes the message along to any Log_observer
- * instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If the connection isn't open and can't be opened, return failure. */
- if (!$this->_opened && !$this->open()) {
- return false;
- }
-
- /* If we don't already have a statement object, create one. */
- if (!is_object($this->_statement) && !$this->_prepareStatement()) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Build our set of values for this log entry. */
- $values = array(
- 'id' => $this->_db->nextId($this->_sequence),
- 'logtime' => MDB2_Date::mdbNow(),
- 'ident' => $this->_ident,
- 'priority' => $priority,
- 'message' => $message
- );
-
- /* Execute the SQL query for this log entry insertion. */
- $this->_db->expectError(MDB2_ERROR_NOSUCHTABLE);
- $result = &$this->_statement->execute($values);
- $this->_db->popExpect();
-
- /* Attempt to handle any errors. */
- if (PEAR::isError($result)) {
- /* We can only handle MDB2_ERROR_NOSUCHTABLE errors. */
- if ($result->getCode() != MDB2_ERROR_NOSUCHTABLE) {
- return false;
- }
-
- /* Attempt to create the target table. */
- if (!$this->_createTable()) {
- return false;
- }
-
- /* Recreate our prepared statement resource. */
- $this->_statement->free();
- if (!$this->_prepareStatement()) {
- return false;
- }
-
- /* Attempt to re-execute the insertion query. */
- $result = $this->_statement->execute($values);
- if (PEAR::isError($result)) {
- return false;
- }
- }
-
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-
- /**
- * Create the log table in the database.
- *
- * @return boolean True on success or false on failure.
- * @access private
- */
- function _createTable()
- {
- $this->_db->loadModule('Manager', null, true);
- $result = $this->_db->manager->createTable(
- $this->_table,
- array(
- 'id' => array('type' => $this->_types['id']),
- 'logtime' => array('type' => $this->_types['logtime']),
- 'ident' => array('type' => $this->_types['ident']),
- 'priority' => array('type' => $this->_types['priority']),
- 'message' => array('type' => $this->_types['message'])
- )
- );
- if (PEAR::isError($result)) {
- return false;
- }
-
- $result = $this->_db->manager->createIndex(
- $this->_table,
- 'unique_id',
- array('fields' => array('id' => true), 'unique' => true)
- );
- if (PEAR::isError($result)) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Prepare the SQL insertion statement.
- *
- * @return boolean True if the statement was successfully created.
- *
- * @access private
- * @since Log 1.9.0
- */
- function _prepareStatement()
- {
- $this->_statement = &$this->_db->prepare(
- 'INSERT INTO ' . $this->_table .
- ' (id, logtime, ident, priority, message)' .
- ' VALUES(:id, :logtime, :ident, :priority, :message)',
- $this->_types, MDB2_PREPARE_MANIP);
-
- /* Return success if we didn't generate an error. */
- return (PEAR::isError($this->_statement) === false);
- }
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/null.php b/modules/blockrss/vendor/pear/log/Log/null.php
deleted file mode 100644
index 6b3a0aaa4..000000000
--- a/modules/blockrss/vendor/pear/log/Log/null.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- * @since Log 1.8.2
- * @package Log
- *
- * @example null.php Using the null handler.
- */
-class Log_null extends Log
-{
- /**
- * Constructs a new Log_null object.
- *
- * @param string $name Ignored.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
- }
-
- /**
- * Opens the handler.
- *
- * @access public
- * @since Log 1.9.6
- */
- function open()
- {
- $this->_opened = true;
- return true;
- }
-
- /**
- * Closes the handler.
- *
- * @access public
- * @since Log 1.9.6
- */
- function close()
- {
- $this->_opened = false;
- return true;
- }
-
- /**
- * Simply consumes the log event. The message will still be passed
- * along to any Log_observer instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/observer.php b/modules/blockrss/vendor/pear/log/Log/observer.php
deleted file mode 100644
index 09b01454b..000000000
--- a/modules/blockrss/vendor/pear/log/Log/observer.php
+++ /dev/null
@@ -1,129 +0,0 @@
-
- * @since Horde 1.3
- * @since Log 1.0
- * @package Log
- *
- * @example observer_mail.php An example Log_observer implementation.
- */
-class Log_observer
-{
- /**
- * Instance-specific unique identification number.
- *
- * @var integer
- * @access private
- */
- var $_id = 0;
-
- /**
- * The minimum priority level of message that we want to hear about.
- * PEAR_LOG_EMERG is the highest priority, so we will only hear messages
- * with an integer priority value less than or equal to ours. It defaults
- * to PEAR_LOG_INFO, which listens to everything except PEAR_LOG_DEBUG.
- *
- * @var string
- * @access private
- */
- var $_priority = PEAR_LOG_INFO;
-
- /**
- * Creates a new basic Log_observer instance.
- *
- * @param integer $priority The highest priority at which to receive
- * log event notifications.
- *
- * @access public
- */
- public function __construct($priority = PEAR_LOG_INFO)
- {
- $this->_id = md5(microtime().rand());
- $this->_priority = $priority;
- }
-
- /**
- * Attempts to return a new concrete Log_observer instance of the requested
- * type.
- *
- * @param string $type The type of concreate Log_observer subclass
- * to return.
- * @param integer $priority The highest priority at which to receive
- * log event notifications.
- * @param array $conf Optional associative array of additional
- * configuration values.
- *
- * @return object The newly created concrete Log_observer
- * instance, or null on an error.
- */
- function &factory($type, $priority = PEAR_LOG_INFO, $conf = array())
- {
- $type = strtolower($type);
- $class = 'Log_observer_' . $type;
-
- /*
- * If the desired class already exists (because the caller has supplied
- * it from some custom location), simply instantiate and return a new
- * instance.
- */
- if (class_exists($class)) {
- $object = new $class($priority, $conf);
- return $object;
- }
-
- /* Support both the new-style and old-style file naming conventions. */
- $newstyle = true;
- $classfile = dirname(__FILE__) . '/observer_' . $type . '.php';
-
- if (!file_exists($classfile)) {
- $classfile = 'Log/' . $type . '.php';
- $newstyle = false;
- }
-
- /*
- * Attempt to include our version of the named class, but don't treat
- * a failure as fatal. The caller may have already included their own
- * version of the named class.
- */
- @include_once $classfile;
-
- /* If the class exists, return a new instance of it. */
- if (class_exists($class)) {
- /* Support both new-style and old-style construction. */
- if ($newstyle) {
- $object = new $class($priority, $conf);
- } else {
- $object = new $class($priority);
- }
- return $object;
- }
-
- $null = null;
- return $null;
- }
-
- /**
- * This is a stub method to make sure that Log_Observer classes do
- * something when they are notified of a message. The default behavior
- * is to just print the message, which is obviously not desireable in
- * practically any situation - which is why you need to override this
- * method. :)
- *
- * @param array $event A hash describing the log event.
- */
- function notify($event)
- {
- print_r($event);
- }
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/sql.php b/modules/blockrss/vendor/pear/log/Log/sql.php
deleted file mode 100644
index a235d09f5..000000000
--- a/modules/blockrss/vendor/pear/log/Log/sql.php
+++ /dev/null
@@ -1,293 +0,0 @@
-
- * @since Horde 1.3
- * @since Log 1.0
- * @package Log
- *
- * @example sql.php Using the SQL handler.
- */
-class Log_sql extends Log
-{
- /**
- * Variable containing the DSN information.
- * @var mixed
- * @access private
- */
- var $_dsn = '';
-
- /**
- * String containing the SQL insertion statement.
- *
- * @var string
- * @access private
- */
- var $_sql = '';
-
- /**
- * Array containing our set of DB configuration options.
- * @var array
- * @access private
- */
- var $_options = array('persistent' => true);
-
- /**
- * Object holding the database handle.
- * @var object
- * @access private
- */
- var $_db = null;
-
- /**
- * Resource holding the prepared statement handle.
- * @var resource
- * @access private
- */
- var $_statement = null;
-
- /**
- * Flag indicating that we're using an existing database connection.
- * @var boolean
- * @access private
- */
- var $_existingConnection = false;
-
- /**
- * String holding the database table to use.
- * @var string
- * @access private
- */
- var $_table = 'log_table';
-
- /**
- * String holding the name of the ID sequence.
- * @var string
- * @access private
- */
- var $_sequence = 'log_id';
-
- /**
- * Maximum length of the $ident string. This corresponds to the size of
- * the 'ident' column in the SQL table.
- * @var integer
- * @access private
- */
- var $_identLimit = 16;
-
- /**
- * Constructs a new sql logging object.
- *
- * @param string $name The target SQL table.
- * @param string $ident The identification field.
- * @param array $conf The connection configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_table = $name;
- $this->_mask = Log::UPTO($level);
-
- /* Now that we have a table name, assign our SQL statement. */
- if (!empty($conf['sql'])) {
- $this->_sql = $conf['sql'];
- } else {
- $this->_sql = 'INSERT INTO ' . $this->_table .
- ' (id, logtime, ident, priority, message)' .
- ' VALUES(?, CURRENT_TIMESTAMP, ?, ?, ?)';
- }
-
- /* If an options array was provided, use it. */
- if (isset($conf['options']) && is_array($conf['options'])) {
- $this->_options = $conf['options'];
- }
-
- /* If a specific sequence name was provided, use it. */
- if (!empty($conf['sequence'])) {
- $this->_sequence = $conf['sequence'];
- }
-
- /* If a specific sequence name was provided, use it. */
- if (isset($conf['identLimit'])) {
- $this->_identLimit = $conf['identLimit'];
- }
-
- /* Now that the ident limit is confirmed, set the ident string. */
- $this->setIdent($ident);
-
- /* If an existing database connection was provided, use it. */
- if (isset($conf['db'])) {
- $this->_db = &$conf['db'];
- $this->_existingConnection = true;
- $this->_opened = true;
- } else {
- $this->_dsn = $conf['dsn'];
- }
- }
-
- /**
- * Opens a connection to the database, if it has not already
- * been opened. This is implicitly called by log(), if necessary.
- *
- * @return boolean True on success, false on failure.
- * @access public
- */
- function open()
- {
- if (!$this->_opened) {
- /* Use the DSN and options to create a database connection. */
- $this->_db = &DB::connect($this->_dsn, $this->_options);
- if (DB::isError($this->_db)) {
- return false;
- }
-
- /* Create a prepared statement for repeated use in log(). */
- if (!$this->_prepareStatement()) {
- return false;
- }
-
- /* We now consider out connection open. */
- $this->_opened = true;
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the connection to the database if it is still open and we were
- * the ones that opened it. It is the caller's responsible to close an
- * existing connection that was passed to us via $conf['db'].
- *
- * @return boolean True on success, false on failure.
- * @access public
- */
- function close()
- {
- if ($this->_opened && !$this->_existingConnection) {
- $this->_opened = false;
- $this->_db->freePrepared($this->_statement);
- return $this->_db->disconnect();
- }
-
- return ($this->_opened === false);
- }
-
- /**
- * Sets this Log instance's identification string. Note that this
- * SQL-specific implementation will limit the length of the $ident string
- * to sixteen (16) characters.
- *
- * @param string $ident The new identification string.
- *
- * @access public
- * @since Log 1.8.5
- */
- function setIdent($ident)
- {
- $this->_ident = substr($ident, 0, $this->_identLimit);
- }
-
- /**
- * Inserts $message to the currently open database. Calls open(),
- * if necessary. Also passes the message along to any Log_observer
- * instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If the connection isn't open and can't be opened, return failure. */
- if (!$this->_opened && !$this->open()) {
- return false;
- }
-
- /* If we don't already have our statement object yet, create it. */
- if (!is_object($this->_statement) && !$this->_prepareStatement()) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Build our set of values for this log entry. */
- $id = $this->_db->nextId($this->_sequence);
- $values = array($id, $this->_ident, $priority, $message);
-
- /* Execute the SQL query for this log entry insertion. */
- $result =& $this->_db->execute($this->_statement, $values);
- if (DB::isError($result)) {
- return false;
- }
-
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-
- /**
- * Prepare the SQL insertion statement.
- *
- * @return boolean True if the statement was successfully created.
- *
- * @access private
- * @since Log 1.9.1
- */
- function _prepareStatement()
- {
- $this->_statement = $this->_db->prepare($this->_sql);
-
- /* Return success if we didn't generate an error. */
- return (DB::isError($this->_statement) === false);
- }
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/sqlite.php b/modules/blockrss/vendor/pear/log/Log/sqlite.php
deleted file mode 100644
index ec7ac27e7..000000000
--- a/modules/blockrss/vendor/pear/log/Log/sqlite.php
+++ /dev/null
@@ -1,224 +0,0 @@
-
- * @author Jon Parise
- * @since Log 1.8.3
- * @package Log
- *
- * @example sqlite.php Using the Sqlite handler.
- */
-class Log_sqlite extends Log
-{
- /**
- * Array containing the connection defaults
- * @var array
- * @access private
- */
- var $_options = array('mode' => 0666,
- 'persistent' => false);
-
- /**
- * Object holding the database handle.
- * @var object
- * @access private
- */
- var $_db = null;
-
- /**
- * Flag indicating that we're using an existing database connection.
- * @var boolean
- * @access private
- */
- var $_existingConnection = false;
-
- /**
- * String holding the database table to use.
- * @var string
- * @access private
- */
- var $_table = 'log_table';
-
- /**
- * Constructs a new sql logging object.
- *
- * @param string $name The target SQL table.
- * @param string $ident The identification field.
- * @param mixed $conf Can be an array of configuration options used
- * to open a new database connection
- * or an already opened sqlite connection.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', &$conf, $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_table = $name;
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- if (is_array($conf)) {
- foreach ($conf as $k => $opt) {
- $this->_options[$k] = $opt;
- }
- } else {
- // If an existing database connection was provided, use it.
- $this->_db =& $conf;
- $this->_existingConnection = true;
- }
- }
-
- /**
- * Opens a connection to the database, if it has not already
- * been opened. This is implicitly called by log(), if necessary.
- *
- * @return boolean True on success, false on failure.
- * @access public
- */
- function open()
- {
- if (is_resource($this->_db)) {
- $this->_opened = true;
- return $this->_createTable();
- } else {
- /* Set the connection function based on the 'persistent' option. */
- if (empty($this->_options['persistent'])) {
- $connectFunction = 'sqlite_open';
- } else {
- $connectFunction = 'sqlite_popen';
- }
-
- /* Attempt to connect to the database. */
- if ($this->_db = $connectFunction($this->_options['filename'],
- (int)$this->_options['mode'],
- $error)) {
- $this->_opened = true;
- return $this->_createTable();
- }
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the connection to the database if it is still open and we were
- * the ones that opened it. It is the caller's responsible to close an
- * existing connection that was passed to us via $conf['db'].
- *
- * @return boolean True on success, false on failure.
- * @access public
- */
- function close()
- {
- /* We never close existing connections. */
- if ($this->_existingConnection) {
- return false;
- }
-
- if ($this->_opened) {
- $this->_opened = false;
- sqlite_close($this->_db);
- }
-
- return ($this->_opened === false);
- }
-
- /**
- * Inserts $message to the currently open database. Calls open(),
- * if necessary. Also passes the message along to any Log_observer
- * instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param string $priority The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If the connection isn't open and can't be opened, return failure. */
- if (!$this->_opened && !$this->open()) {
- return false;
- }
-
- // Extract the string representation of the message.
- $message = $this->_extractMessage($message);
-
- // Build the SQL query for this log entry insertion.
- $q = sprintf('INSERT INTO [%s] (logtime, ident, priority, message) ' .
- "VALUES ('%s', '%s', %d, '%s')",
- $this->_table,
- strftime('%Y-%m-%d %H:%M:%S', time()),
- sqlite_escape_string($this->_ident),
- $priority,
- sqlite_escape_string($message));
- if (!($res = @sqlite_unbuffered_query($this->_db, $q))) {
- return false;
- }
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-
- /**
- * Checks whether the log table exists and creates it if necessary.
- *
- * @return boolean True on success or false on failure.
- * @access private
- */
- function _createTable()
- {
- $q = "SELECT name FROM sqlite_master WHERE name='" . $this->_table .
- "' AND type='table'";
-
- $res = sqlite_query($this->_db, $q);
-
- if (sqlite_num_rows($res) == 0) {
- $q = 'CREATE TABLE [' . $this->_table . '] (' .
- 'id INTEGER PRIMARY KEY NOT NULL, ' .
- 'logtime NOT NULL, ' .
- 'ident CHAR(16) NOT NULL, ' .
- 'priority INT NOT NULL, ' .
- 'message)';
-
- if (!($res = sqlite_unbuffered_query($this->_db, $q))) {
- return false;
- }
- }
-
- return true;
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/syslog.php b/modules/blockrss/vendor/pear/log/Log/syslog.php
deleted file mode 100644
index 59c27fdd9..000000000
--- a/modules/blockrss/vendor/pear/log/Log/syslog.php
+++ /dev/null
@@ -1,238 +0,0 @@
-
- * @author Jon Parise
- * @since Horde 1.3
- * @since Log 1.0
- * @package Log
- *
- * @example syslog.php Using the syslog handler.
- */
-class Log_syslog extends Log
-{
- /**
- * Integer holding the log facility to use.
- * @var integer
- * @access private
- */
- var $_name = LOG_SYSLOG;
-
- /**
- * Should we inherit the current syslog connection for this process, or
- * should we call openlog() to start a new syslog connection?
- * @var boolean
- * @access private
- */
- var $_inherit = false;
-
- /**
- * Should we re-open the syslog connection for each log event?
- * @var boolean
- * @access private
- */
- var $_reopen = false;
-
- /**
- * Maximum message length that will be sent to syslog(). If the handler
- * receives a message longer than this length limit, it will be split into
- * multiple syslog() calls.
- * @var integer
- * @access private
- */
- var $_maxLength = 500;
-
- /**
- * String containing the format of a message.
- * @var string
- * @access private
- */
- var $_lineFormat = '%4$s';
-
- /**
- * String containing the timestamp format. It will be passed directly to
- * strftime(). Note that the timestamp string will generated using the
- * current locale.
- * @var string
- * @access private
- */
- var $_timeFormat = '%b %d %H:%M:%S';
-
- /**
- * Constructs a new syslog object.
- *
- * @param string $name The syslog facility.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- /* Ensure we have a valid integer value for $name. */
- if (empty($name) || !is_int($name)) {
- $name = LOG_SYSLOG;
- }
-
- if (isset($conf['inherit'])) {
- $this->_inherit = $conf['inherit'];
- $this->_opened = $this->_inherit;
- }
- if (isset($conf['reopen'])) {
- $this->_reopen = $conf['reopen'];
- }
- if (isset($conf['maxLength'])) {
- $this->_maxLength = $conf['maxLength'];
- }
- if (!empty($conf['lineFormat'])) {
- $this->_lineFormat = str_replace(array_keys($this->_formatMap),
- array_values($this->_formatMap),
- $conf['lineFormat']);
- }
- if (!empty($conf['timeFormat'])) {
- $this->_timeFormat = $conf['timeFormat'];
- }
-
- $this->_id = md5(microtime().rand());
- $this->_name = $name;
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
- }
-
- /**
- * Opens a connection to the system logger, if it has not already
- * been opened. This is implicitly called by log(), if necessary.
- * @access public
- */
- function open()
- {
- if (!$this->_opened || $this->_reopen) {
- $this->_opened = openlog($this->_ident, LOG_PID, $this->_name);
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the connection to the system logger, if it is open.
- * @access public
- */
- function close()
- {
- if ($this->_opened && !$this->_inherit) {
- closelog();
- $this->_opened = false;
- }
-
- return true;
- }
-
- /**
- * Sends $message to the currently open syslog connection. Calls
- * open() if necessary. Also passes the message along to any Log_observer
- * instances that are observing this Log.
- *
- * @param mixed $message String or object containing the message to log.
- * @param int $priority (optional) The priority of the message. Valid
- * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT,
- * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING,
- * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.
- * @return boolean True on success or false on failure.
- * @access public
- */
- function log($message, $priority = null)
- {
- /* If a priority hasn't been specified, use the default value. */
- if ($priority === null) {
- $priority = $this->_priority;
- }
-
- /* Abort early if the priority is above the maximum logging level. */
- if (!$this->_isMasked($priority)) {
- return false;
- }
-
- /* If we need to (re)open the connection and open() fails, abort. */
- if ((!$this->_opened || $this->_reopen) && !$this->open()) {
- return false;
- }
-
- /* Extract the string representation of the message. */
- $message = $this->_extractMessage($message);
-
- /* Build a syslog priority value based on our current configuration. */
- $syslogPriority = $this->_toSyslog($priority);
- if ($this->_inherit) {
- $syslogPriority |= $this->_name;
- }
-
- /* Apply the configured line format to the message string. */
- $message = $this->_format($this->_lineFormat,
- strftime($this->_timeFormat),
- $priority, $message);
-
- /* Split the string into parts based on our maximum length setting. */
- $parts = str_split($message, $this->_maxLength);
- if ($parts === false) {
- return false;
- }
-
- foreach ($parts as $part) {
- if (!syslog($syslogPriority, $part)) {
- return false;
- }
- }
-
- $this->_announce(array('priority' => $priority, 'message' => $message));
-
- return true;
- }
-
- /**
- * Converts a PEAR_LOG_* constant into a syslog LOG_* constant.
- *
- * This function exists because, under Windows, not all of the LOG_*
- * constants have unique values. Instead, the PEAR_LOG_* were introduced
- * for global use, with the conversion to the LOG_* constants kept local to
- * to the syslog driver.
- *
- * @param int $priority PEAR_LOG_* value to convert to LOG_* value.
- *
- * @return The LOG_* representation of $priority.
- *
- * @access private
- */
- function _toSyslog($priority)
- {
- static $priorities = array(
- PEAR_LOG_EMERG => LOG_EMERG,
- PEAR_LOG_ALERT => LOG_ALERT,
- PEAR_LOG_CRIT => LOG_CRIT,
- PEAR_LOG_ERR => LOG_ERR,
- PEAR_LOG_WARNING => LOG_WARNING,
- PEAR_LOG_NOTICE => LOG_NOTICE,
- PEAR_LOG_INFO => LOG_INFO,
- PEAR_LOG_DEBUG => LOG_DEBUG
- );
-
- /* If we're passed an unknown priority, default to LOG_INFO. */
- if (!is_int($priority) || !in_array($priority, $priorities)) {
- return LOG_INFO;
- }
-
- return $priorities[$priority];
- }
-
-}
diff --git a/modules/blockrss/vendor/pear/log/Log/win.php b/modules/blockrss/vendor/pear/log/Log/win.php
deleted file mode 100644
index 43d9c4a3d..000000000
--- a/modules/blockrss/vendor/pear/log/Log/win.php
+++ /dev/null
@@ -1,286 +0,0 @@
-
- * @since Log 1.7.0
- * @package Log
- *
- * @example win.php Using the window handler.
- */
-class Log_win extends Log
-{
- /**
- * The name of the output window.
- * @var string
- * @access private
- */
- var $_name = 'LogWindow';
-
- /**
- * The title of the output window.
- * @var string
- * @access private
- */
- var $_title = 'Log Output Window';
-
- /**
- * Mapping of log priorities to styles.
- * @var array
- * @access private
- */
- var $_styles = array(
- PEAR_LOG_EMERG => 'color: red;',
- PEAR_LOG_ALERT => 'color: orange;',
- PEAR_LOG_CRIT => 'color: yellow;',
- PEAR_LOG_ERR => 'color: green;',
- PEAR_LOG_WARNING => 'color: blue;',
- PEAR_LOG_NOTICE => 'color: indigo;',
- PEAR_LOG_INFO => 'color: violet;',
- PEAR_LOG_DEBUG => 'color: black;'
- );
-
- /**
- * String buffer that holds line that are pending output.
- * @var array
- * @access private
- */
- var $_buffer = array();
-
- /**
- * Constructs a new Log_win object.
- *
- * @param string $name Ignored.
- * @param string $ident The identity string.
- * @param array $conf The configuration array.
- * @param int $level Log messages up to and including this level.
- * @access public
- */
- public function __construct($name, $ident = '', $conf = array(),
- $level = PEAR_LOG_DEBUG)
- {
- $this->_id = md5(microtime().rand());
- $this->_name = str_replace(' ', '_', $name);
- $this->_ident = $ident;
- $this->_mask = Log::UPTO($level);
-
- if (isset($conf['title'])) {
- $this->_title = $conf['title'];
- }
- if (isset($conf['styles']) && is_array($conf['styles'])) {
- $this->_styles = $conf['styles'];
- }
- if (isset($conf['colors']) && is_array($conf['colors'])) {
- foreach ($conf['colors'] as $level => $color) {
- $this->_styles[$level] .= "color: $color;";
- }
- }
-
- register_shutdown_function(array(&$this, '_Log_win'));
- }
-
- /**
- * Destructor
- */
- function _Log_win()
- {
- if ($this->_opened || (count($this->_buffer) > 0)) {
- $this->close();
- }
- }
-
- /**
- * The first time open() is called, it will open a new browser window and
- * prepare it for output.
- *
- * This is implicitly called by log(), if necessary.
- *
- * @access public
- */
- function open()
- {
- if (!$this->_opened) {
- $win = $this->_name;
- $styles = $this->_styles;
-
- if (!empty($this->_ident)) {
- $identHeader = "$win.document.writeln('Ident | ')";
- } else {
- $identHeader = '';
- }
-
- echo <<< EOT
-
-EOT;
- $this->_opened = true;
- }
-
- return $this->_opened;
- }
-
- /**
- * Closes the output stream if it is open. If there are still pending
- * lines in the output buffer, the output window will be opened so that
- * the buffer can be drained.
- *
- * @access public
- */
- function close()
- {
- /*
- * If there are still lines waiting to be written, open the output
- * window so that we can drain the buffer.
- */
- if (!$this->_opened && (count($this->_buffer) > 0)) {
- $this->open();
- }
-
- if ($this->_opened) {
- $this->_writeln('');
- $this->_writeln('