Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

kcfinder\session class added #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hranicka
Copy link

@hranicka hranicka commented Aug 1, 2014

  1. I've moved session init to separate class (out of uploader.php) because I think that starting and managing of session is not in uploader's responsibility.

Important: return $_CONFIG; at the end of config.php file is necessary. I think that use of $config = require 'conf/config.php'; is better and more clear than require 'conf/config.php'; $something = $_CONFIG['key'].

  1. It still supports "session key" definition in the config file but now also \Iterator objects or clean arrays.

So we can set _sessionVar in the config like KCFINDER and SESSION['KCFINDER'] will be used.

But we can also set $someObject as value of _sessionVar. Then this object will be used for sessions.
It's very useful for better session control for example with frameworks. In this case, KCFinder won't start session and won't access $_SESSION super global variable directly. It will access via given object from config.

@sunhater
Copy link
Owner

I have viewed your modifications, and I implemented my version. Take a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants