Skip to content

Commit b6d243e

Browse files
committed
adds zip support
1 parent 3a25677 commit b6d243e

File tree

10 files changed

+784
-13
lines changed

10 files changed

+784
-13
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
.DS_Store
1+
.DS_Store
2+
/vendor
3+
/kirby-focus.zip
4+
/composer.lock
5+
/kirby

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Kirby Focus
22

3-
![Version](https://img.shields.io/badge/Version-3.0.0-green.svg) ![Kirby](https://img.shields.io/badge/Kirby-3.x-black.svg)
3+
![Version](https://img.shields.io/badge/Version-3.0.1-blue.svg) ![License](https://img.shields.io/badge/License-MIT-green.svg) ![Kirby](https://img.shields.io/badge/Kirby-3.x-f0c674.svg)
44

55
> **FOR THE KIRBY 2 VERSION OF THIS PLUGIN, PLEASE CHECK OUT THE [KIRBY-2](https://github.com/flokosiol/kirby-focus/tree/kirby-2) BRANCH**
66
@@ -16,6 +16,13 @@ With this plugin for [Kirby CMS](http://getkirby.com) you can prevent the most i
1616
+ Kirby CMS, Version **3.x**
1717
+ GD Library or ImageMagick
1818

19+
## Commercial Usage
20+
21+
This plugin is free but if you use it in a commercial project please consider to.
22+
23+
+ [make a donation](https://www.paypal.me/flokosiol/10) or
24+
+ [buy a Kirby license using this affiliate link](https://a.paddle.com/v2/click/1129/36201?link=1170)
25+
1926
## Installation
2027

2128
### Composer
@@ -24,7 +31,7 @@ If you are using Composer, you can install the plugin with `composer require flo
2431

2532
### Download
2633

27-
Download and extract the files from this branch, rename the folder to `focus` and drop it into the `site/plugins/` folder of your Kirby 3 installation. That's it.
34+
Download and extract the [zip of the latest release](https://github.com/flokosiol/kirby-focus/releases/download/v3.0.1/kirby-focus.zip), rename the folder to `focus` and drop it into the `site/plugins/` folder of your Kirby 3 installation. That's it.
2835

2936
## Usage
3037

composer.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "flokosiol/focus",
33
"description": "Better image cropping for Kirby CMS",
4-
"version": "3.0.0",
4+
"version": "3.0.1",
55
"type": "kirby-plugin",
66
"license": "MIT",
77
"require": {
8-
"getkirby/cms": "^3.0.0-RC-1.0"
8+
"getkirby/cms": "^3.0.0"
99
},
1010
"autoload": {
1111
"files": [
@@ -21,5 +21,14 @@
2121
"email": "[email protected]"
2222
}
2323
],
24-
"minimum-stability": "beta"
24+
"scripts": {
25+
"zip": [
26+
"rm kirby-focus.zip",
27+
"composer install --no-dev",
28+
"composer remove getkirby/cms",
29+
"composer dumpautoload -o",
30+
"zip -r kirby-focus.zip . -x *.git*",
31+
"composer require getkirby/cms:'^3.0.0'"
32+
]
33+
}
2534
}

vendor/composer/ClassLoader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function isClassMapAuthoritative()
279279
*/
280280
public function setApcuPrefix($apcuPrefix)
281281
{
282-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
282+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283283
}
284284

285285
/**
@@ -377,11 +377,11 @@ private function findFileWithExtension($class, $ext)
377377
$subPath = $class;
378378
while (false !== $lastPos = strrpos($subPath, '\\')) {
379379
$subPath = substr($subPath, 0, $lastPos);
380-
$search = $subPath.'\\';
380+
$search = $subPath . '\\';
381381
if (isset($this->prefixDirsPsr4[$search])) {
382+
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382383
foreach ($this->prefixDirsPsr4[$search] as $dir) {
383-
$length = $this->prefixLengthsPsr4[$first][$search];
384-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
384+
if (file_exists($file = $dir . $pathEnd)) {
385385
return $file;
386386
}
387387
}

vendor/composer/autoload_classmap.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
$baseDir = dirname($vendorDir);
77

88
return array(
9+
'Parsedown' => $baseDir . '/kirby/dependencies/parsedown/Parsedown.php',
10+
'ParsedownExtra' => $baseDir . '/kirby/dependencies/parsedown-extra/ParsedownExtra.php',
911
);

vendor/composer/autoload_files.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66
$baseDir = dirname($vendorDir);
77

88
return array(
9-
'c417d56f84766727c19c8c673404dc74' => $baseDir . '/config.php',
9+
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
10+
'04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . '/mustangostang/spyc/Spyc.php',
11+
'87988fc7b1c1f093da22a1a3de972f3a' => $baseDir . '/kirby/config/helpers.php',
12+
'428e0a6316e676194f2283f47fbd1fc4' => $baseDir . '/kirby/config/aliases.php',
13+
'd80b806b2b0bfc4457e5f164edcb5232' => $baseDir . '/kirby/config/tests.php',
14+
'9f6b0f75f27a8c290d4344e24ca490c0' => $baseDir . '/config.php',
1015
);

vendor/composer/autoload_namespaces.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
$baseDir = dirname($vendorDir);
77

88
return array(
9+
'claviska' => array($vendorDir . '/claviska/simpleimage/src'),
10+
'Michelf' => array($vendorDir . '/michelf/php-smartypants'),
911
);

vendor/composer/autoload_psr4.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,14 @@
66
$baseDir = dirname($vendorDir);
77

88
return array(
9+
'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper/src'),
10+
'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'),
11+
'TrueBV\\' => array($vendorDir . '/true/punycode/src'),
12+
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
13+
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
14+
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
15+
'Kirby\\ComposerInstaller\\' => array($vendorDir . '/getkirby/composer-installer/src'),
16+
'Kirby\\' => array($baseDir . '/kirby/src'),
917
'Flokosiol\\' => array($baseDir . '/core'),
18+
'' => array($vendorDir . '/league/color-extractor/src'),
1019
);

vendor/composer/autoload_static.php

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,120 @@
77
class ComposerStaticInit54f1e3b07af199d5ea5e9af2164e876f
88
{
99
public static $files = array (
10-
'c417d56f84766727c19c8c673404dc74' => __DIR__ . '/../..' . '/config.php',
10+
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
11+
'04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php',
12+
'87988fc7b1c1f093da22a1a3de972f3a' => __DIR__ . '/../..' . '/kirby/config/helpers.php',
13+
'428e0a6316e676194f2283f47fbd1fc4' => __DIR__ . '/../..' . '/kirby/config/aliases.php',
14+
'd80b806b2b0bfc4457e5f164edcb5232' => __DIR__ . '/../..' . '/kirby/config/tests.php',
15+
'9f6b0f75f27a8c290d4344e24ca490c0' => __DIR__ . '/../..' . '/config.php',
1116
);
1217

1318
public static $prefixLengthsPsr4 = array (
19+
'Z' =>
20+
array (
21+
'Zend\\Escaper\\' => 13,
22+
),
23+
'W' =>
24+
array (
25+
'Whoops\\' => 7,
26+
),
27+
'T' =>
28+
array (
29+
'TrueBV\\' => 7,
30+
),
31+
'S' =>
32+
array (
33+
'Symfony\\Polyfill\\Mbstring\\' => 26,
34+
),
35+
'P' =>
36+
array (
37+
'Psr\\Log\\' => 8,
38+
'PHPMailer\\PHPMailer\\' => 20,
39+
),
40+
'K' =>
41+
array (
42+
'Kirby\\ComposerInstaller\\' => 24,
43+
'Kirby\\' => 6,
44+
),
1445
'F' =>
1546
array (
1647
'Flokosiol\\' => 10,
1748
),
1849
);
1950

2051
public static $prefixDirsPsr4 = array (
52+
'Zend\\Escaper\\' =>
53+
array (
54+
0 => __DIR__ . '/..' . '/zendframework/zend-escaper/src',
55+
),
56+
'Whoops\\' =>
57+
array (
58+
0 => __DIR__ . '/..' . '/filp/whoops/src/Whoops',
59+
),
60+
'TrueBV\\' =>
61+
array (
62+
0 => __DIR__ . '/..' . '/true/punycode/src',
63+
),
64+
'Symfony\\Polyfill\\Mbstring\\' =>
65+
array (
66+
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
67+
),
68+
'Psr\\Log\\' =>
69+
array (
70+
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
71+
),
72+
'PHPMailer\\PHPMailer\\' =>
73+
array (
74+
0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src',
75+
),
76+
'Kirby\\ComposerInstaller\\' =>
77+
array (
78+
0 => __DIR__ . '/..' . '/getkirby/composer-installer/src',
79+
),
80+
'Kirby\\' =>
81+
array (
82+
0 => __DIR__ . '/../..' . '/kirby/src',
83+
),
2184
'Flokosiol\\' =>
2285
array (
2386
0 => __DIR__ . '/../..' . '/core',
2487
),
2588
);
2689

90+
public static $fallbackDirsPsr4 = array (
91+
0 => __DIR__ . '/..' . '/league/color-extractor/src',
92+
);
93+
94+
public static $prefixesPsr0 = array (
95+
'c' =>
96+
array (
97+
'claviska' =>
98+
array (
99+
0 => __DIR__ . '/..' . '/claviska/simpleimage/src',
100+
),
101+
),
102+
'M' =>
103+
array (
104+
'Michelf' =>
105+
array (
106+
0 => __DIR__ . '/..' . '/michelf/php-smartypants',
107+
),
108+
),
109+
);
110+
111+
public static $classMap = array (
112+
'Parsedown' => __DIR__ . '/../..' . '/kirby/dependencies/parsedown/Parsedown.php',
113+
'ParsedownExtra' => __DIR__ . '/../..' . '/kirby/dependencies/parsedown-extra/ParsedownExtra.php',
114+
);
115+
27116
public static function getInitializer(ClassLoader $loader)
28117
{
29118
return \Closure::bind(function () use ($loader) {
30119
$loader->prefixLengthsPsr4 = ComposerStaticInit54f1e3b07af199d5ea5e9af2164e876f::$prefixLengthsPsr4;
31120
$loader->prefixDirsPsr4 = ComposerStaticInit54f1e3b07af199d5ea5e9af2164e876f::$prefixDirsPsr4;
121+
$loader->fallbackDirsPsr4 = ComposerStaticInit54f1e3b07af199d5ea5e9af2164e876f::$fallbackDirsPsr4;
122+
$loader->prefixesPsr0 = ComposerStaticInit54f1e3b07af199d5ea5e9af2164e876f::$prefixesPsr0;
123+
$loader->classMap = ComposerStaticInit54f1e3b07af199d5ea5e9af2164e876f::$classMap;
32124

33125
}, null, ClassLoader::class);
34126
}

0 commit comments

Comments
 (0)