Skip to content

Commit 9ac03ca

Browse files
committed
Merge branch '0.4.1'
Conflicts: README.md
2 parents e160d00 + 9d1ea41 commit 9ac03ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+522
-228
lines changed

CHANGELOG.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
Version 0.4.1
2+
- Added more flexible manifest.json support for packages, thanks to @WooDzu.
3+
- Fixed #30, thanks to @WooDzu.
4+
- Cache clearing optimizations, added "Clear cache" button to dashboard, thanks to @WooDzu.
5+
- Fixed minor problems with cache path detection.
6+
- Added method "php" to view. Allows to use php code inside volt.
7+
- Header widget: do not display logo if empty.
8+
- Fixed escaping in CkEditor form element.
9+
- Helper "Security" renamed to "Acl".
10+
- Console commands: fixed command description output.
11+
- Removed ACL wrapper, for performance reason.
12+
- Helpers implementation was reworked.
13+
- Added languages cache location to config.
14+
- Removed call_user_func_array where it is possible.
15+
- Fixed bug with cacheDir that can be missing in config.
16+
- Reworked cache adapters creation.
17+
- Added strtolower method to dispatcher for action (this is for Phalcon 1.3.2).
18+
- Fixed possible error with form validation message (Phalcon 1.3.2).
19+
- Added caching mechanism for assets generation tool.
20+
- Fixed bugs: #64, #49, #67, #26.
21+
- Implemented: #55.
22+
123
Version 0.4.0
224
- Implemented isCached, getCacheKey, getCacheLifeTime, clearCache methods for widgets caching.
325
- Implemented modules system.

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Phalcon Eye CMS
33

44
Phalcon Eye - CMS based on Phalcon PHP Framework (https://github.com/phalcon/cphalcon).
55

6-
* Version: 0.4.0
6+
* Version: 0.4.1
77
* Requirements: PHP >= 5.4, Phalcon = 1.3.0, mod_rewrite, zlib, mbstring, mcrypt, iconv, gd, fileinfo, zip
88
* Website: http://phalconeye.com/
99

@@ -21,7 +21,15 @@ Installation
2121

2222
Note: If you want to reinstall, set option 'installed' to 'false' in /app/var/data/app.php.
2323

24-
Coding Style [![Build Status](https://secure.travis-ci.org/PhalconEye/cms.png?branch=master)](https://travis-ci.org/PhalconEye/cms)
24+
Contribution
25+
------------
26+
Feel free to contribute.
27+
28+
* Found a bug? Try to find it in issue tracker https://github.com/PhalconEye/cms/issues ... If this bug is missing - you can add an issue about it.
29+
* Want to discuss? Visit http://forum.phalconeye.com/ and create topic that is interesting for you.
30+
* Can/want/like develop? Create pull request and we will check it in nearest time! Just don't forget to check code styling (you can run it via command "ant check") and please don't miss file and class headers (also add yourself as an author if you have changed something).
31+
32+
Coding Style [![Build Status](https://secure.travis-ci.org/PhalconEye/cms.png?branch=master)](http://travis-ci.org/PhalconEye/cms)
2533
------------
2634
PhalconEye CMS code style is checked via Travis CI service. Every commit pushed to this repository will queue a build
2735
into the continuous integration service to run phpmd and phpcs checks.

app/config/development/application.php.dist

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,49 @@ return array (
2626
'debug' => true,
2727
'profiler' => true,
2828
'baseUrl' => '/',
29-
'cache' =>
29+
'cache' =>
3030
array (
3131
'lifetime' => '86400',
3232
'prefix' => 'pe_',
3333
'adapter' => 'File',
3434
'cacheDir' => ROOT_PATH . '/app/var/cache/data/',
3535
),
36-
'logger' =>
36+
'logger' =>
3737
array (
3838
'enabled' => true,
3939
'path' => ROOT_PATH . '/app/var/logs/',
4040
'format' => '[%date%][%type%] %message%',
4141
),
42-
'view' =>
42+
'view' =>
4343
array (
4444
'compiledPath' => ROOT_PATH . '/app/var/cache/view/',
4545
'compiledExtension' => '.php',
4646
'compiledSeparator' => '_',
4747
'compileAlways' => true,
4848
),
49-
'session' =>
49+
'session' =>
5050
array (
5151
'adapter' => 'Files',
5252
'uniqueId' => 'PhalconEye_',
5353
),
54-
'assets' =>
54+
'assets' =>
5555
array (
5656
'local' => 'assets/',
5757
'remote' => false,
58+
'lifetime' => 0,
5859
),
59-
'metadata' =>
60+
'metadata' =>
6061
array (
6162
'adapter' => 'Files',
6263
'metaDataDir' => ROOT_PATH . '/app/var/cache/metadata/',
6364
),
64-
'annotations' =>
65+
'annotations' =>
6566
array (
6667
'adapter' => 'Files',
6768
'annotationsDir' => ROOT_PATH . '/app/var/cache/annotations/',
6869
),
70+
'languages' =>
71+
array(
72+
'cacheDir' => ROOT_PATH . '/app/var/cache/languages/',
73+
),
6974
);

app/config/production/application.php.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ return array (
5555
array (
5656
'local' => 'assets/',
5757
'remote' => false,
58+
'lifetime' => 0,
5859
),
5960
'metadata' =>
6061
array (
@@ -66,4 +67,8 @@ return array (
6667
'adapter' => 'Files',
6768
'annotationsDir' => ROOT_PATH . '/app/var/cache/annotations/',
6869
),
70+
'languages' =>
71+
array(
72+
'cacheDir' => ROOT_PATH . '/app/var/cache/languages/',
73+
),
6974
);

app/engine/Application.php

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -208,31 +208,13 @@ public function getOutput()
208208
*/
209209
public function clearCache($themeDirectory = '')
210210
{
211-
$viewCache = $this->_dependencyInjector->get('viewCache');
212211
$cacheOutput = $this->_dependencyInjector->get('cacheOutput');
213212
$cacheData = $this->_dependencyInjector->get('cacheData');
214-
$modelsCache = $this->_dependencyInjector->get('modelsCache');
215213
$config = $this->_dependencyInjector->get('config');
216214

217-
$keys = $viewCache->queryKeys();
218-
foreach ($keys as $key) {
219-
$viewCache->delete($key);
220-
}
221-
222-
$keys = $cacheOutput->queryKeys();
223-
foreach ($keys as $key) {
224-
$cacheOutput->delete($key);
225-
}
215+
$cacheOutput->flush();
216+
$cacheData->flush();
226217

227-
$keys = $cacheData->queryKeys();
228-
foreach ($keys as $key) {
229-
$cacheData->delete($key);
230-
}
231-
232-
$keys = $modelsCache->queryKeys();
233-
foreach ($keys as $key) {
234-
$modelsCache->delete($key);
235-
}
236218

237219
// Files deleter helper.
238220
$deleteFiles = function ($files) {
@@ -244,7 +226,9 @@ public function clearCache($themeDirectory = '')
244226
};
245227

246228
// Clear files cache.
247-
$deleteFiles(glob($config->application->cache->cacheDir . '*'));
229+
if (isset($config->application->cache->cacheDir)) {
230+
$deleteFiles(glob($config->application->cache->cacheDir . '*'));
231+
}
248232

249233
// Clear view cache.
250234
$deleteFiles(glob($config->application->view->compiledPath . '*'));

app/engine/ApplicationInitialization.php

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -444,26 +444,13 @@ protected function _initCache($di, $config)
444444
$frontOutputCache = new CacheOutput($frontEndOptions);
445445
$frontDataCache = new CacheData($frontEndOptions);
446446

447-
// Cache:View.
448-
$di->set(
449-
'viewCache',
450-
function () use ($cacheAdapter, $frontOutputCache, $backEndOptions) {
451-
return new $cacheAdapter($frontOutputCache, $backEndOptions);
452-
}
453-
);
454-
455-
// Cache:Output.
456-
$cacheOutput = new $cacheAdapter($frontOutputCache, $backEndOptions);
457-
$di->set('cacheOutput', $cacheOutput, true);
458-
459-
// Cache:Data.
460-
$cacheData = new $cacheAdapter($frontDataCache, $backEndOptions);
461-
$di->set('cacheData', $cacheData, true);
462-
463-
// Cache:Models.
464-
$cacheModels = new $cacheAdapter($frontDataCache, $backEndOptions);
465-
$di->set('modelsCache', $cacheModels, true);
447+
$cacheOutputAdapter = new $cacheAdapter($frontOutputCache, $backEndOptions);
448+
$di->set('viewCache', $cacheOutputAdapter, true);
449+
$di->set('cacheOutput', $cacheOutputAdapter, true);
466450

451+
$cacheDataAdapter = new $cacheAdapter($frontDataCache, $backEndOptions);
452+
$di->set('cacheData', $cacheDataAdapter, true);
453+
$di->set('modelsCache', $cacheDataAdapter, true);
467454
} else {
468455
// Create a dummy cache for system.
469456
// System will work correctly and the data will be always current for all adapters.

0 commit comments

Comments
 (0)