This repository has been archived by the owner on Feb 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* jQuery adapter added * Session handling improvements. Now `_sessionVar` option could get arrays by reference * Session related ini options in `conf/config.php` are removed and no more supported * Removed redundant closing tags in PHP files
- Loading branch information
Showing
65 changed files
with
99 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,5 +177,3 @@ public function gc($maxlifetime) { | |
|
||
|
||
// PUT YOUR ADDITIONAL CODE HERE | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -936,5 +936,3 @@ protected function getLangs() { | |
return $langs; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
|
||
/** This file is part of KCFinder project | ||
* | ||
* @desc Session class | ||
* @package KCFinder | ||
* @version 3.12 | ||
* @author Pavel Tzonkov <[email protected]> | ||
* @copyright 2010-2014 KCFinder Project | ||
* @license http://opensource.org/licenses/GPL-3.0 GPLv3 | ||
* @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 | ||
* @link http://kcfinder.sunhater.com | ||
*/ | ||
|
||
namespace kcfinder; | ||
|
||
class session { | ||
|
||
const SESSION_VAR = "_sessionVar"; | ||
public $values; | ||
protected $config; | ||
|
||
public function __construct($configFile) { | ||
|
||
// Start session if it is not already started | ||
if (!session_id()) | ||
session_start(); | ||
|
||
$config = require($configFile); | ||
|
||
// _sessionVar option is set | ||
if (isset($config[self::SESSION_VAR])) { | ||
$session = &$config[self::SESSION_VAR]; | ||
|
||
// _sessionVar option is string | ||
if (is_string($session)) | ||
$session = &$_SESSION[$session]; | ||
|
||
if (!is_array($session)) | ||
$session = array(); | ||
|
||
// Use global _SESSION array if _sessionVar option is not set | ||
} else | ||
$session = &$_SESSION; | ||
|
||
// Securing the session | ||
$stamp = array( | ||
'ip' => $_SERVER['REMOTE_ADDR'], | ||
'agent' => md5($_SERVER['HTTP_USER_AGENT']) | ||
); | ||
if (!isset($session['stamp'])) | ||
$session['stamp'] = $stamp; | ||
elseif (!is_array($session['stamp']) || ($session['stamp'] !== $stamp)) { | ||
// Destroy session if user agent is different (e.g. after browser update) | ||
if ($session['stamp']['ip'] === $stamp['ip']) | ||
session_destroy(); | ||
die; | ||
} | ||
|
||
// Load session configuration | ||
foreach ($config as $key => $val) | ||
$this->config[$key] = ((substr($key, 0, 1) != "_") && isset($session[$key])) | ||
? $session[$key] | ||
: $val; | ||
|
||
// Session data goes to 'self' element | ||
if (!isset($session['self'])) | ||
$session['self'] = array(); | ||
$this->values = &$session['self']; | ||
} | ||
|
||
public function getConfig() { | ||
return $this->config; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,5 +29,3 @@ public function checkFile($file, array $config) { | |
return true; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,5 +45,3 @@ public function checkFile($file, array $config) { | |
: true; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,3 @@ | |
require "core/autoload.php"; | ||
$min = new minifier("css"); | ||
$min->minify("cache/base.css"); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
<?php | ||
|
||
require "browse.php"; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,5 +109,3 @@ function CheckAuthentication($drupal_path) { | |
} | ||
|
||
CheckAuthentication(get_drupal_path()); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,3 @@ | |
require "core/autoload.php"; | ||
$min = new minifier("js"); | ||
$min->minify("cache/base.js"); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,5 +44,3 @@ | |
} | ||
|
||
echo "}"; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -244,5 +244,3 @@ | |
"Select Thumbnails" => "Kies duimnaels", | ||
"Download files" => "Laai lêers af", | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,5 +276,3 @@ | |
"Uploaded {uploaded} of {total}" => "Качено {uploaded} от общо {total}", | ||
"Errors:" => "Грешки:" | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,5 +130,3 @@ | |
"Confirmation" => "Potvrzení", | ||
"Warning" => "Varování", | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,5 +130,3 @@ | |
"Confirmation" => "Bestätigung", | ||
"Warning" => "Warnung" | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,5 +130,3 @@ | |
"Confirmation" => "Επιβεβαίωση", | ||
"Warning" => "Προειδοποίηση", | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,3 @@ | |
'_dateTimeMid' => "%a %b %e %Y %I:%M %p", | ||
'_dateTimeSmall' => "%m/%d/%Y %I:%M %p", | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.