mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Move lessc and Emogrifier classes to RainLoopVendor namespace
This commit is contained in:
parent
253a19987f
commit
d0ec3320c8
|
@ -9970,15 +9970,15 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
$fAdditionalDomReader = null;
|
||||
if (0 < \strlen($sHtml) && $this->Config()->Get('labs', 'emogrifier', false))
|
||||
{
|
||||
if (!\class_exists('Pelago\Emogrifier', false))
|
||||
if (!\class_exists('RainLoopVendor\Pelago\Emogrifier', false))
|
||||
{
|
||||
include_once APP_VERSION_ROOT_PATH.'app/libraries/emogrifier/Emogrifier.php';
|
||||
}
|
||||
|
||||
if (\class_exists('Pelago\Emogrifier', false))
|
||||
if (\class_exists('RainLoopVendor\Pelago\Emogrifier', false))
|
||||
{
|
||||
$fAdditionalDomReader = function ($oDom) {
|
||||
$oEmogrifier = new \Pelago\Emogrifier();
|
||||
$oEmogrifier = new \RainLoopVendor\Pelago\Emogrifier();
|
||||
$oEmogrifier->preserveEncoding = false;
|
||||
return $oEmogrifier->emogrify($oDom);
|
||||
};
|
||||
|
|
|
@ -731,7 +731,7 @@ class ServiceActions
|
|||
include_once APP_VERSION_ROOT_PATH.'app/libraries/lessphp/ctype.php';
|
||||
include_once APP_VERSION_ROOT_PATH.'app/libraries/lessphp/lessc.inc.php';
|
||||
|
||||
$oLess = new \lessc();
|
||||
$oLess = new \RainLoopVendor\lessc();
|
||||
$oLess->setFormatter('compressed');
|
||||
|
||||
$aResult = array();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
namespace Pelago;
|
||||
namespace RainLoopVendor\Pelago;
|
||||
|
||||
/**
|
||||
* This class provides functions for converting CSS styles into inline style attributes in your HTML code.
|
||||
|
@ -320,7 +320,7 @@ class Emogrifier
|
|||
{
|
||||
return $xmlDocument;
|
||||
}
|
||||
|
||||
|
||||
if ($this->preserveEncoding) {
|
||||
return mb_convert_encoding($xmlDocument->saveHTML(), self::ENCODING, 'HTML-ENTITIES');
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace RainLoopVendor;
|
||||
|
||||
class stdClass extends \stdClass {};
|
||||
class Exception extends \Exception {};
|
||||
|
||||
/**
|
||||
* lessphp v0.3.9
|
||||
* http://leafo.net/lessphp
|
||||
|
@ -1814,6 +1819,7 @@ class lessc {
|
|||
$className = "lessc_formatter_$this->formatterName";
|
||||
}
|
||||
|
||||
$className = 'RainLoopVendor\\'.$className;
|
||||
return new $className;
|
||||
}
|
||||
|
||||
|
@ -2093,7 +2099,7 @@ class lessc_parser {
|
|||
|
||||
if (!self::$operatorString) {
|
||||
self::$operatorString =
|
||||
'('.implode('|', array_map(array('lessc', 'preg_quote'),
|
||||
'('.implode('|', array_map(array('RainLoopVendor\\lessc', 'preg_quote'),
|
||||
array_keys(self::$precedence))).')';
|
||||
|
||||
$commentSingle = lessc::preg_quote(self::$commentSingle);
|
||||
|
@ -2322,8 +2328,8 @@ class lessc_parser {
|
|||
|
||||
protected function isDirective($dirname, $directives) {
|
||||
// TODO: cache pattern in parser
|
||||
$pattern = implode("|",
|
||||
array_map(array("lessc", "preg_quote"), $directives));
|
||||
$pattern = implode('|',
|
||||
array_map(array('RainLoopVendor\\lessc', 'preg_quote'), $directives));
|
||||
$pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i';
|
||||
|
||||
return preg_match($pattern, $dirname);
|
||||
|
@ -2611,7 +2617,7 @@ class lessc_parser {
|
|||
$this->eatWhiteDefault = false;
|
||||
|
||||
$stop = array("'", '"', "@{", $end);
|
||||
$stop = array_map(array("lessc", "preg_quote"), $stop);
|
||||
$stop = array_map(array('RainLoopVendor\\lessc', 'preg_quote'), $stop);
|
||||
// $stop[] = self::$commentMulti;
|
||||
|
||||
if (!is_null($rejectStrs)) {
|
||||
|
|
Loading…
Reference in a new issue