diff --git a/composer.lock b/composer.lock index 5adb12f..51249cc 100644 --- a/composer.lock +++ b/composer.lock @@ -516,16 +516,16 @@ }, { "name": "php-di/invoker", - "version": "2.3.3", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786" + "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/cd6d9f267d1a3474bdddf1be1da079f01b942786", - "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786", + "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/33234b32dafa8eb69202f950a1fc92055ed76a86", + "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86", "shasum": "" }, "require": { @@ -559,7 +559,7 @@ ], "support": { "issues": "https://github.com/PHP-DI/Invoker/issues", - "source": "https://github.com/PHP-DI/Invoker/tree/2.3.3" + "source": "https://github.com/PHP-DI/Invoker/tree/2.3.4" }, "funding": [ { @@ -567,7 +567,7 @@ "type": "github" } ], - "time": "2021-12-13T09:22:56+00:00" + "time": "2023-09-08T09:24:21+00:00" }, { "name": "php-di/php-di", @@ -1738,16 +1738,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -1762,7 +1762,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1800,7 +1800,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -1816,20 +1816,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -1844,7 +1844,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1883,7 +1883,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -1899,20 +1899,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -1921,7 +1921,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1966,7 +1966,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -1982,20 +1982,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -2004,7 +2004,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2045,7 +2045,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -2061,7 +2061,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/yaml", @@ -2139,16 +2139,16 @@ }, { "name": "twig/twig", - "version": "v3.7.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "5cf942bbab3df42afa918caeba947f1b690af64b" + "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b", - "reference": "5cf942bbab3df42afa918caeba947f1b690af64b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", + "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", "shasum": "" }, "require": { @@ -2158,7 +2158,7 @@ }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + "symfony/phpunit-bridge": "^5.4.9|^6.3" }, "type": "library", "autoload": { @@ -2194,7 +2194,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.7.0" + "source": "https://github.com/twigphp/Twig/tree/v3.7.1" }, "funding": [ { @@ -2206,7 +2206,7 @@ "type": "tidelift" } ], - "time": "2023-07-26T07:16:09+00:00" + "time": "2023-08-28T11:09:02+00:00" }, { "name": "vlucas/valitron", diff --git a/content/00-welcome/05-todos.txt b/content/00-welcome/05-todos.txt index c42a4eb..7a6f6e6 100644 --- a/content/00-welcome/05-todos.txt +++ b/content/00-welcome/05-todos.txt @@ -1 +1 @@ -["# ToDos Version 2","[TOC]","## System settings","* DONE: Migrate from backend to frontend with vue and api\n* DONE: Redesign\n* DONE: License feature\n* DONE: Enhance with plugins","## Visual Editor","* DONE: Refactor and redesign\n* DONE: Fix toc component in new block\n* DONE: Fix hr component in new block\n* DONE: finish shortcode component\n* DONE: Fix inline formats\n* DONE: fix lenght of page\n* DONE: Fix design of new block at the end (background color)\n* DONE: Move Block\n* DONE: Fix headline design\n* DONE: Fix save on two enter\n* DONE: fix quote design\n* DONE: Fix toc preview\n* DONE: disable enable \n* DONE: Add load sign (from navigation)\n* DONE: File is not published from tmp to media\/files if you save the block.","## Raw Editor","* DONE: Refactor and redesign\n* DONE: Integrate highlighting","## Navigation","* DONE: Refactor and redesign\n* DONE: fix status in navigation\n* DONE: refresh navigation after changes","## Publish Controller","* DONE: Refactor and redesign\n* DONE: Create \n* DONE: publish\n* DONE: unpublish\n* DONE: discard\n* DONE: delete\n* DONE: save draft\n* DONE: switch to raw","## Meta Tabs","* DONE: Refactor and redesign\n* DONE: Enhance with plugins","## Medialib","* DONE: Refactor and redesign","## Posts","* DONE: Refactor and redesign","## Plugins","* Asset Class in progress","## Frontend","* DONE: Refactor\n* DONE: Test restrictions","## Other big tasks","* DONE: System setup\n* DONE: Recover Password","## Medium tasks","* DONE: Merge processAssets modell\n* DONE: Table of content duplicated for published pages\n* DONE: Session handling: csrf fail and session start error if restrictions are active\n* DONE: Image and files for meta","## Open tasks","* DONE: Sitemap and ping\n* DONE: Version check\n* DONE: Proxy support\n* DONE: SVG checker: https:\/\/github.com\/TribalSystems\/SVG-Sanitizer\n* DONE: Backend form builder\n* DONE: Image generation on the fly\n* DONE: Delete folder in base level\n* DONE: Make folder delete easier with glob or scandir\n* DONE: fix error messages (check models)\n* DONE: error status codes (check middleware)\n* DONE: Warn if open another block\n* DONE: Customfields not styled yet\n* DOING: Fix error api systemnavi + validate\n* FIXED: System stores html or sends wrong error messsages\n* FIXED: Wrong frontend navigation if unpublished pages\n* DONE: Icon for hidden pages\n* DOING: Responsive design\n*DONE: Captcha integration\n* Reference feature\n* Typemill Utilities\n* Markdown secure rendering\n* finish youtube component\n* Solution for logo and favicon\n* Handle formdata centrally ???\n* BUG: Raw editor jumps if you edit long text at the end\n* BUG: Error fields in account form not styled correctly","## later","* Clear cache\n* Show security Log\n* User search only for +10 users\n* For api translations should be done completely in backoffice\n* Change translation files so they are loaded in settings instead of adding them manually to settings-defaults.yaml","## Cleanups:","* DONE: Events\n* DONE: Error messages\n* DONE: Translations","## Info: Select userroles","* Userroles for file restriction: in vue-blox-components loaded via api\n* Userroles for userfields: in php model user getUserFields()\n* Userroles for meta: in php controller apiAuthorMeta getMeta()\n* Plugins and themes: in php model extension getThemeDefinitions()","## Info: License Check","* On activation in apiControllerExtension. It checks the license in yaml.\n* In plugin php code with setPremiumLicense\n* In static plugins, it checks manual premium list and method setPremiumLicense and more ","## Plugins","* MAKER: Rebuild search\n* MAKER: Rebuild contactform with shortcode","## Status codes","| Status code | Description | \n|---|---|\n| 200 ok | cell | \n| 400 bad request | The request was unacceptable due to missing or invalid parameter. | \n| 401 unauthorized | The request requires an authorization. | \n| (402 request failed) | The parameters where there but the request failed for other reasons. | \n| 403 forbidden | The user is authenticated but he has not enough rights. | \n| 404 not found | new | \n| 500 internal server error | new |"] \ No newline at end of file +["# ToDos Version 2","[TOC]","## System settings","* DONE: Migrate from backend to frontend with vue and api\n* DONE: Redesign\n* DONE: License feature\n* DONE: Enhance with plugins","## Visual Editor","* DONE: Refactor and redesign\n* DONE: Fix toc component in new block\n* DONE: Fix hr component in new block\n* DONE: finish shortcode component\n* DONE: Fix inline formats\n* DONE: fix lenght of page\n* DONE: Fix design of new block at the end (background color)\n* DONE: Move Block\n* DONE: Fix headline design\n* DONE: Fix save on two enter\n* DONE: fix quote design\n* DONE: Fix toc preview\n* DONE: disable enable \n* DONE: Add load sign (from navigation)\n* DONE: File is not published from tmp to media\/files if you save the block.","## Raw Editor","* DONE: Refactor and redesign\n* DONE: Integrate highlighting","## Navigation","* DONE: Refactor and redesign\n* DONE: fix status in navigation\n* DONE: refresh navigation after changes","## Publish Controller","* DONE: Refactor and redesign\n* DONE: Create \n* DONE: publish\n* DONE: unpublish\n* DONE: discard\n* DONE: delete\n* DONE: save draft\n* DONE: switch to raw","## Meta Tabs","* DONE: Refactor and redesign\n* DONE: Enhance with plugins","## Medialib","* DONE: Refactor and redesign","## Posts","* DONE: Refactor and redesign","## Plugins","* Asset Class in progress","## Frontend","* DONE: Refactor\n* DONE: Test restrictions","## Other big tasks","* DONE: System setup\n* DONE: Recover Password","## Medium tasks","* DONE: Merge processAssets modell\n* DONE: Table of content duplicated for published pages\n* DONE: Session handling: csrf fail and session start error if restrictions are active\n* DONE: Image and files for meta","## Open tasks","* DONE: Sitemap and ping\n* DONE: Version check\n* DONE: Proxy support\n* DONE: SVG checker: https:\/\/github.com\/TribalSystems\/SVG-Sanitizer\n* DONE: Backend form builder\n* DONE: Image generation on the fly\n* DONE: Delete folder in base level\n* DONE: Make folder delete easier with glob or scandir\n* DONE: fix error messages (check models)\n* DONE: error status codes (check middleware)\n* DONE: Warn if open another block\n* DONE: Customfields not styled yet\n* DOING: Fix error api systemnavi + validate\n* FIXED: System stores html or sends wrong error messsages\n* FIXED: Wrong frontend navigation if unpublished pages\n* DONE: Icon for hidden pages\n* DOING: Responsive design\n* DONE: Captcha integration\n* DONE: Solution for logo and favicon\n* Reference feature\n* Typemill Utilities\n* Markdown secure rendering\n* finish youtube component\n* Handle formdata centrally ???\n* BUG: Raw editor jumps if you edit long text at the end\n* BUG: Error fields in account form not styled correctly","## later","* Clear cache\n* Show security Log\n* User search only for +10 users\n* For api translations should be done completely in backoffice\n* Change translation files so they are loaded in settings instead of adding them manually to settings-defaults.yaml","## Cleanups:","* DONE: Events\n* DONE: Error messages\n* DONE: Translations","## Info: Select userroles","* Userroles for file restriction: in vue-blox-components loaded via api\n* Userroles for userfields: in php model user getUserFields()\n* Userroles for meta: in php controller apiAuthorMeta getMeta()\n* Plugins and themes: in php model extension getThemeDefinitions()","## Info: License Check","* On activation in apiControllerExtension. It checks the license in yaml.\n* In plugin php code with setPremiumLicense\n* In static plugins, it checks manual premium list and method setPremiumLicense and more ","## Plugins","* MAKER: Rebuild search\n* MAKER: Rebuild contactform with shortcode","## Status codes","| Status code | Description | \n|---|---|\n| 200 ok | cell | \n| 400 bad request | The request was unacceptable due to missing or invalid parameter. | \n| 401 unauthorized | The request requires an authorization. | \n| (402 request failed) | The parameters where there but the request failed for other reasons. | \n| 403 forbidden | The user is authenticated but he has not enough rights. | \n| 404 not found | new | \n| 500 internal server error | new |"] \ No newline at end of file diff --git a/data/security/securitylog.txt b/data/security/securitylog.txt index 39a876c..dfaea29 100644 --- a/data/security/securitylog.txt +++ b/data/security/securitylog.txt @@ -10,3 +10,4 @@ 127.0.0.1;2023-09-13 22:20:17;wrong captcha http://localhost/typemill/tm/login 127.0.0.1;2023-09-15 06:06:46;wrong login 127.0.0.1;2023-09-15 22:03:38;wrong login +127.0.0.1;2023-09-16 08:49:53;wrong login diff --git a/media/custom/favicon-114x114.png b/media/custom/favicon-114x114.png new file mode 100644 index 0000000..dc2e17a Binary files /dev/null and b/media/custom/favicon-114x114.png differ diff --git a/media/custom/favicon-144x144.png b/media/custom/favicon-144x144.png new file mode 100644 index 0000000..9f4ebae Binary files /dev/null and b/media/custom/favicon-144x144.png differ diff --git a/media/custom/favicon-16x16.png b/media/custom/favicon-16x16.png new file mode 100644 index 0000000..04b4932 Binary files /dev/null and b/media/custom/favicon-16x16.png differ diff --git a/media/custom/favicon-180x180.png b/media/custom/favicon-180x180.png new file mode 100644 index 0000000..ddca050 Binary files /dev/null and b/media/custom/favicon-180x180.png differ diff --git a/media/custom/favicon-32x32.png b/media/custom/favicon-32x32.png new file mode 100644 index 0000000..6b96a4f Binary files /dev/null and b/media/custom/favicon-32x32.png differ diff --git a/media/custom/favicon-72x72.png b/media/custom/favicon-72x72.png new file mode 100644 index 0000000..3fcd8ef Binary files /dev/null and b/media/custom/favicon-72x72.png differ diff --git a/media/live/android-chrome-512x512-1.png b/media/live/android-chrome-512x512-1.png new file mode 100644 index 0000000..4c5543d Binary files /dev/null and b/media/live/android-chrome-512x512-1.png differ diff --git a/media/live/android-chrome-512x512-2.png b/media/live/android-chrome-512x512-2.png new file mode 100644 index 0000000..4c5543d Binary files /dev/null and b/media/live/android-chrome-512x512-2.png differ diff --git a/media/live/android-chrome-512x512.png b/media/live/android-chrome-512x512.png new file mode 100644 index 0000000..4c5543d Binary files /dev/null and b/media/live/android-chrome-512x512.png differ diff --git a/media/original/android-chrome-512x512-1.png b/media/original/android-chrome-512x512-1.png new file mode 100644 index 0000000..28a60ef Binary files /dev/null and b/media/original/android-chrome-512x512-1.png differ diff --git a/media/original/android-chrome-512x512-2.png b/media/original/android-chrome-512x512-2.png new file mode 100644 index 0000000..28a60ef Binary files /dev/null and b/media/original/android-chrome-512x512-2.png differ diff --git a/media/original/android-chrome-512x512.png b/media/original/android-chrome-512x512.png new file mode 100644 index 0000000..28a60ef Binary files /dev/null and b/media/original/android-chrome-512x512.png differ diff --git a/media/thumbs/android-chrome-512x512-1.png b/media/thumbs/android-chrome-512x512-1.png new file mode 100644 index 0000000..25095db Binary files /dev/null and b/media/thumbs/android-chrome-512x512-1.png differ diff --git a/media/thumbs/android-chrome-512x512-2.png b/media/thumbs/android-chrome-512x512-2.png new file mode 100644 index 0000000..25095db Binary files /dev/null and b/media/thumbs/android-chrome-512x512-2.png differ diff --git a/media/thumbs/android-chrome-512x512.png b/media/thumbs/android-chrome-512x512.png new file mode 100644 index 0000000..25095db Binary files /dev/null and b/media/thumbs/android-chrome-512x512.png differ diff --git a/system/typemill/Controllers/Controller.php b/system/typemill/Controllers/Controller.php index 593737e..4dfd530 100644 --- a/system/typemill/Controllers/Controller.php +++ b/system/typemill/Controllers/Controller.php @@ -50,6 +50,19 @@ abstract class Controller return false; } + protected function hasChanged($input, $stored, $field) + { + if(isset($input[$field]) && isset($stored[$field]) && $input[$field] == $stored[$field]) + { + return false; + } + if(!isset($input[$field]) && !isset($input[$field])) + { + return false; + } + return true; + } + protected function getItem($navigation, $url, $urlinfo) { $url = $this->removeEditorFromUrl($url); diff --git a/system/typemill/Controllers/ControllerApiAuthorMeta.php b/system/typemill/Controllers/ControllerApiAuthorMeta.php index ae888b0..641ee1d 100644 --- a/system/typemill/Controllers/ControllerApiAuthorMeta.php +++ b/system/typemill/Controllers/ControllerApiAuthorMeta.php @@ -328,7 +328,6 @@ class ControllerApiAuthorMeta extends Controller return $response->withHeader('Content-Type', 'application/json')->withStatus(500); } - # we have to flatten field definitions for tabs if there are fieldsets in it public function flattenTabFields($tabfields, $flattab, $fieldset = null) { @@ -350,17 +349,4 @@ class ControllerApiAuthorMeta extends Controller } return $flattab; } - - protected function hasChanged($input, $page, $field) - { - if(isset($input[$field]) && isset($page[$field]) && $input[$field] == $page[$field]) - { - return false; - } - if(!isset($input[$field]) && !isset($input[$field])) - { - return false; - } - return true; - } } \ No newline at end of file diff --git a/system/typemill/Controllers/ControllerApiImage.php b/system/typemill/Controllers/ControllerApiImage.php index a9d2dd5..a444560 100644 --- a/system/typemill/Controllers/ControllerApiImage.php +++ b/system/typemill/Controllers/ControllerApiImage.php @@ -14,7 +14,6 @@ class ControllerApiImage extends Controller # MISSING # - # solution for logo # return error messages and display in image component # check if resized is bigger than original, then use original diff --git a/system/typemill/Controllers/ControllerApiSystemSettings.php b/system/typemill/Controllers/ControllerApiSystemSettings.php index b2492dc..629838a 100644 --- a/system/typemill/Controllers/ControllerApiSystemSettings.php +++ b/system/typemill/Controllers/ControllerApiSystemSettings.php @@ -6,6 +6,7 @@ use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Http\Message\ResponseInterface as Response; use Typemill\Models\Validation; use Typemill\Models\Extension; +use Typemill\Models\Media; use Typemill\Models\User; use Typemill\Models\Settings; use Typemill\Static\Translations; @@ -43,6 +44,26 @@ class ControllerApiSystemSettings extends Controller return $response->withHeader('Content-Type', 'application/json')->withStatus(400); } + # if everything is fine, create customsizes for favicon + if(isset($validatedOutput['favicon']) && $validatedOutput['favicon'] != '' && ($validatedOutput['favicon'] != $this->settings['favicon'])) + { + $media = new Media(); + + $sizes = [ + '16' => ['width' => 16, 'height' => 16], + '32' => ['width' => 32, 'height' => 32], + '72' => ['width' => 72, 'height' => 72], + '114' => ['width' => 114, 'height' => 114], + '144' => ['width' => 144, 'height' => 144], + '180' => ['width' => 180, 'height' => 180], + ]; + + foreach ($sizes as $size) + { + $favicon = $media->createCustomSize($validatedOutput['favicon'], $size['width'], $size['height'], 'favicon'); + } + } + # store updated settings here $updatedSettings = $settingsModel->updateSettings($validatedOutput); diff --git a/system/typemill/Controllers/ControllerWebFrontend.php b/system/typemill/Controllers/ControllerWebFrontend.php index 797c4a9..6f2c001 100644 --- a/system/typemill/Controllers/ControllerWebFrontend.php +++ b/system/typemill/Controllers/ControllerWebFrontend.php @@ -178,13 +178,13 @@ class ControllerWebFrontend extends Controller { $favicon = true; $assets->addMeta('tilecolor',''); - $assets->addMeta('tileimage',''); - $assets->addMeta('icon16',''); - $assets->addMeta('icon32',''); - $assets->addMeta('icon72',''); - $assets->addMeta('icon114',''); - $assets->addMeta('icon144',''); - $assets->addMeta('icon180',''); + $assets->addMeta('tileimage',''); + $assets->addMeta('icon16',''); + $assets->addMeta('icon32',''); + $assets->addMeta('icon72',''); + $assets->addMeta('icon114',''); + $assets->addMeta('icon144',''); + $assets->addMeta('icon180',''); } diff --git a/system/typemill/Models/Media.php b/system/typemill/Models/Media.php index aca544e..8e00188 100644 --- a/system/typemill/Models/Media.php +++ b/system/typemill/Models/Media.php @@ -486,7 +486,7 @@ class Media return true; } - public function createCustomSize($imageUrl, $width = NULL, $height = NULL) + public function createCustomSize($imageUrl, $width = NULL, $height = NULL, $forcename = NULL) { $this->setPathInfo($imageUrl); @@ -506,19 +506,18 @@ class Media $extension = $this->getExtension(); $originalName = $this->getFilename(); $originalFile = $originalName . '.' . $extension; - $customName = $originalName . $resizeName; + $customName = $forcename ? $forcename . $resizeName : $originalName . $resizeName; $customFile = $customName . '.' . $extension; $storage = new StorageWrapper('\Typemill\Models\Storage'); - if($storage->checkFile('customFolder', '', $customFile)) + if(!$forcename && $storage->checkFile('customFolder', '', $customFile)) { # we should get the custom folder url dynamically from storage class return '/media/custom/' . $customFile; } - # if name is in customfolder (resized already) - if($storage->checkFile('customFolder', '', $originalFile)) + if(!$forcename && $storage->checkFile('customFolder', '', $originalFile)) { $imagePath = $storage->getFolderPath('customFolder') . $originalFile; } @@ -536,7 +535,7 @@ class Media $originalSize = $this->getImageSize($image); $resizedImage = $this->resizeImage($image, $desiredSize, $originalSize); - if($resizedImage && $storage->storeCustomImage($image, $extension, $customName)) + if($resizedImage && $storage->storeCustomImage($resizedImage, $extension, $customName)) { return '/media/custom/' . $customFile; } diff --git a/system/typemill/author/auth/recover.twig b/system/typemill/author/auth/recover.twig index ef3eba3..e469e40 100644 --- a/system/typemill/author/auth/recover.twig +++ b/system/typemill/author/auth/recover.twig @@ -31,6 +31,16 @@ + {% if captcha == 'standard' %} + + {{ captcha(true) }} + + {% elseif captcha == 'aftererror' %} + + {{ captcha(old) }} + + {% endif %} +