Completed
Branch master (a35b70)
by Tim
04:45
created
ext_tables.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 if (!defined('TYPO3_MODE')) {
9
-	die('Access denied.');
9
+    die('Access denied.');
10 10
 }
11 11
 
12 12
 \HDNET\Autoloader\Loader::extTables('FRUIT', 'ink');
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
ext_localconf.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 if (!defined('TYPO3_MODE')) {
9
-	die('Access denied.');
9
+    die('Access denied.');
10 10
 }
11 11
 
12 12
 \HDNET\Autoloader\Loader::extLocalconf('FRUIT', 'ink');
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
ext_emconf.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
 
9 9
 
10 10
 $EM_CONF[$_EXTKEY] = array(
11
-	'title'            => 'Ink',
12
-	'description'      => 'Build stable and flexible newsletter templates. Incl. also the plain text rendering for plain text e-Mails. Please contribute at https://github.com/lochmueller/ink',
13
-	'category'         => 'fe',
14
-	'version'          => '0.1.1',
15
-	'state'            => 'beta',
16
-	'clearcacheonload' => 1,
17
-	'author'           => 'Tim Lochmüller',
18
-	'author_email'     => '[email protected]',
19
-	'constraints'      => array(
20
-		'depends' => array(
21
-			'typo3'              => '6.2.0-7.99.99',
22
-			'css_styled_content' => '6.2.0-7.99.99',
23
-			'autoloader'         => '1.6.0-0.0.0',
24
-		),
25
-	),
11
+    'title'            => 'Ink',
12
+    'description'      => 'Build stable and flexible newsletter templates. Incl. also the plain text rendering for plain text e-Mails. Please contribute at https://github.com/lochmueller/ink',
13
+    'category'         => 'fe',
14
+    'version'          => '0.1.1',
15
+    'state'            => 'beta',
16
+    'clearcacheonload' => 1,
17
+    'author'           => 'Tim Lochmüller',
18
+    'author_email'     => '[email protected]',
19
+    'constraints'      => array(
20
+        'depends' => array(
21
+            'typo3'              => '6.2.0-7.99.99',
22
+            'css_styled_content' => '6.2.0-7.99.99',
23
+            'autoloader'         => '1.6.0-0.0.0',
24
+        ),
25
+    ),
26 26
 );
Please login to merge, or discard this patch.
Classes/Configuration.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -12,31 +12,31 @@
 block discarded – undo
12 12
  */
13 13
 class Configuration {
14 14
 
15
-	/**
16
-	 * get the plaintext width
17
-	 *
18
-	 * @return int
19
-	 */
20
-	static public function getPlainTextWith() {
21
-		return isset($GLOBALS['TSFE']->config['config']['plainTextWith']) ? (int)$GLOBALS['TSFE']->config['config']['plainTextWith'] : 76;
22
-	}
15
+    /**
16
+     * get the plaintext width
17
+     *
18
+     * @return int
19
+     */
20
+    static public function getPlainTextWith() {
21
+        return isset($GLOBALS['TSFE']->config['config']['plainTextWith']) ? (int)$GLOBALS['TSFE']->config['config']['plainTextWith'] : 76;
22
+    }
23 23
 
24
-	/**
25
-	 * get the table mode
26
-	 *
27
-	 * @return string
28
-	 */
29
-	static public function getTableMode() {
30
-		return isset($GLOBALS['TSFE']->config['config']['tableMode']) && trim($GLOBALS['TSFE']->config['config']['tableMode']) !== '' ? trim($GLOBALS['TSFE']->config['config']['tableMode']) : 'default';
31
-	}
24
+    /**
25
+     * get the table mode
26
+     *
27
+     * @return string
28
+     */
29
+    static public function getTableMode() {
30
+        return isset($GLOBALS['TSFE']->config['config']['tableMode']) && trim($GLOBALS['TSFE']->config['config']['tableMode']) !== '' ? trim($GLOBALS['TSFE']->config['config']['tableMode']) : 'default';
31
+    }
32 32
 
33
-	/**
34
-	 * check if the plain tables are 100 displayed
35
-	 *
36
-	 * @return string
37
-	 */
38
-	static public function isPlainTable100() {
39
-		return isset($GLOBALS['TSFE']->config['config']['plainTable100']) && trim($GLOBALS['TSFE']->config['config']['plainTable100']) !== '' ? (bool)$GLOBALS['TSFE']->config['config']['plainTable100'] : TRUE;
40
-	}
33
+    /**
34
+     * check if the plain tables are 100 displayed
35
+     *
36
+     * @return string
37
+     */
38
+    static public function isPlainTable100() {
39
+        return isset($GLOBALS['TSFE']->config['config']['plainTable100']) && trim($GLOBALS['TSFE']->config['config']['plainTable100']) !== '' ? (bool)$GLOBALS['TSFE']->config['config']['plainTable100'] : TRUE;
40
+    }
41 41
 
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Postprocessing/RemoveJavaScript.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@
 block discarded – undo
12 12
  */
13 13
 class RemoveJavaScript implements PostprocessingInterface {
14 14
 
15
-	/**
16
-	 * Run the replacement
17
-	 *
18
-	 * @param string $content
19
-	 *
20
-	 * @return string
21
-	 * @todo remove also onchange etc.
22
-	 */
23
-	public function process($content) {
24
-		return preg_replace('#<script(.*?)>(.*?)</script>#is', '', $content);
25
-	}
15
+    /**
16
+     * Run the replacement
17
+     *
18
+     * @param string $content
19
+     *
20
+     * @return string
21
+     * @todo remove also onchange etc.
22
+     */
23
+    public function process($content) {
24
+        return preg_replace('#<script(.*?)>(.*?)</script>#is', '', $content);
25
+    }
26 26
 }
Please login to merge, or discard this patch.
Classes/Postprocessing/RemoveGenerator.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
  */
13 13
 class RemoveGenerator implements PostprocessingInterface {
14 14
 
15
-	/**
16
-	 * Remove the generator tag
17
-	 *
18
-	 * @param string $content
19
-	 *
20
-	 * @return string
21
-	 */
22
-	public function process($content) {
23
-		return preg_replace('/<meta name="?generator"?.+?>/is', '', $content);
24
-	}
15
+    /**
16
+     * Remove the generator tag
17
+     *
18
+     * @param string $content
19
+     *
20
+     * @return string
21
+     */
22
+    public function process($content) {
23
+        return preg_replace('/<meta name="?generator"?.+?>/is', '', $content);
24
+    }
25 25
 }
Please login to merge, or discard this patch.
Classes/Postprocessing/RemoveHtmlComments.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
  */
13 13
 class RemoveHtmlComments implements PostprocessingInterface {
14 14
 
15
-	/**
16
-	 * Run the replacement of the comments
17
-	 *
18
-	 * @param string $content
19
-	 *
20
-	 * @return string
21
-	 */
22
-	public function process($content) {
23
-		return preg_replace('/<!--(.*?)-->/s', '', $content);
24
-	}
15
+    /**
16
+     * Run the replacement of the comments
17
+     *
18
+     * @param string $content
19
+     *
20
+     * @return string
21
+     */
22
+    public function process($content) {
23
+        return preg_replace('/<!--(.*?)-->/s', '', $content);
24
+    }
25 25
 }
Please login to merge, or discard this patch.
Classes/Postprocessing/RemoveMultipleEmptyLines.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
  */
13 13
 class RemoveMultipleEmptyLines implements PostprocessingInterface {
14 14
 
15
-	/**
16
-	 * Run the cleanup of the empty lines
17
-	 *
18
-	 * @param string $content
19
-	 *
20
-	 * @return string
21
-	 */
22
-	public function process($content) {
23
-		return preg_replace('/\n{4,}/', "\n\n\n", $content);
24
-	}
15
+    /**
16
+     * Run the cleanup of the empty lines
17
+     *
18
+     * @param string $content
19
+     *
20
+     * @return string
21
+     */
22
+    public function process($content) {
23
+        return preg_replace('/\n{4,}/', "\n\n\n", $content);
24
+    }
25 25
 }
Please login to merge, or discard this patch.
Classes/Postprocessing/InlineCss.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -18,49 +18,49 @@
 block discarded – undo
18 18
  */
19 19
 class InlineCss implements PostprocessingInterface {
20 20
 
21
-	/**
22
-	 * Call the inliner CSS processor
23
-	 *
24
-	 * @param string $content
25
-	 *
26
-	 * @return string
27
-	 */
28
-	public function process($content) {
29
-		GeneralUtility::requireOnce(ExtensionManagementUtility::extPath('ink', 'Resources/Private/Php/vendor/autoload.php'));
30
-		$pattern = '%<(link|style)(?=[^<>]*?(?:type="(text/css)"|>))(?=[^<>]*?(?:media="([^<>"]*)"|>))(?=[^<>]*?(?:href="(.*?)"|>))(?=[^<>]*(?:rel="([^<>"]*)"|>))(?:.*?</\1>|[^<>]*>)%si';
31
-		$matches = array();
32
-		$css = '';
33
-		preg_match_all($pattern, $content, $matches);
34
-		if (isset($matches[0])) {
35
-			foreach ($matches[0] as $key => $match) {
36
-				if ($matches[1][$key] === 'style') {
37
-					$css .= strip_tags($match);
38
-				} elseif (strpos($match, 'type="text/css"') !== FALSE) {
21
+    /**
22
+     * Call the inliner CSS processor
23
+     *
24
+     * @param string $content
25
+     *
26
+     * @return string
27
+     */
28
+    public function process($content) {
29
+        GeneralUtility::requireOnce(ExtensionManagementUtility::extPath('ink', 'Resources/Private/Php/vendor/autoload.php'));
30
+        $pattern = '%<(link|style)(?=[^<>]*?(?:type="(text/css)"|>))(?=[^<>]*?(?:media="([^<>"]*)"|>))(?=[^<>]*?(?:href="(.*?)"|>))(?=[^<>]*(?:rel="([^<>"]*)"|>))(?:.*?</\1>|[^<>]*>)%si';
31
+        $matches = array();
32
+        $css = '';
33
+        preg_match_all($pattern, $content, $matches);
34
+        if (isset($matches[0])) {
35
+            foreach ($matches[0] as $key => $match) {
36
+                if ($matches[1][$key] === 'style') {
37
+                    $css .= strip_tags($match);
38
+                } elseif (strpos($match, 'type="text/css"') !== FALSE) {
39 39
 
40
-					$file = preg_replace('/^(.+)\.(\d+)\.css$/', '$1.css', $matches[4][$key]);
41
-					$parts = parse_url($file);
42
-					if (isset($parts['query'])) {
43
-						unset($parts['query']);
44
-					}
45
-					if (!isset($parts['host'])) {
46
-						$parts['path'] = ltrim($parts['path'], '/');
47
-					}
40
+                    $file = preg_replace('/^(.+)\.(\d+)\.css$/', '$1.css', $matches[4][$key]);
41
+                    $parts = parse_url($file);
42
+                    if (isset($parts['query'])) {
43
+                        unset($parts['query']);
44
+                    }
45
+                    if (!isset($parts['host'])) {
46
+                        $parts['path'] = ltrim($parts['path'], '/');
47
+                    }
48 48
 
49
-					if($parts['host'] === GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY')) {
50
-						unset($parts['scheme']);
51
-						unset($parts['host']);
52
-						$parts['path'] = ltrim($parts['path'], '/');
53
-					}
49
+                    if($parts['host'] === GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY')) {
50
+                        unset($parts['scheme']);
51
+                        unset($parts['host']);
52
+                        $parts['path'] = ltrim($parts['path'], '/');
53
+                    }
54 54
 
55
-					$file = HttpUtility::buildUrl($parts);
56
-					$css .= GeneralUtility::getUrl($file);
57
-				} else {
58
-					continue;
59
-				}
60
-				$content = str_replace($match, '', $content);
61
-			}
62
-		}
63
-		$format = new CssToInlineStyles($content, $css);
64
-		return $format->convert();
65
-	}
55
+                    $file = HttpUtility::buildUrl($parts);
56
+                    $css .= GeneralUtility::getUrl($file);
57
+                } else {
58
+                    continue;
59
+                }
60
+                $content = str_replace($match, '', $content);
61
+            }
62
+        }
63
+        $format = new CssToInlineStyles($content, $css);
64
+        return $format->convert();
65
+    }
66 66
 }
Please login to merge, or discard this patch.