From 4d10cb95c29719ee9caf54a9b05513ca981b59fc Mon Sep 17 00:00:00 2001 From: sunhater Date: Sun, 24 Aug 2014 20:16:11 +0300 Subject: [PATCH] 3.20-test2 * 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 --- browse.php | 2 - composer.json | 2 +- conf/config.php | 15 ++------ core/autoload.php | 12 +----- core/bootstrap.php | 2 - core/class/browser.php | 2 - core/class/minifier.php | 9 ++--- core/class/session.php | 76 +++++++++++++++++++++++++++++++++++++ core/class/uploader.php | 61 +++-------------------------- core/types/type_img.php | 2 - core/types/type_mime.php | 2 - css/index.php | 2 - doc/Changelog.md | 7 ++++ index.php | 3 -- integration/drupal.php | 2 - js/index.php | 2 - js_localize.php | 2 - lang/af.php | 2 - lang/bg.php | 2 - lang/ca.php | 2 - lang/cs.php | 2 - lang/da.php | 2 - lang/de.php | 2 - lang/el.php | 2 - lang/en.php | 2 - lang/es.php | 2 - lang/et.php | 2 - lang/fa.php | 2 - lang/fi.php | 2 - lang/fr.php | 2 - lang/he.php | 2 - lang/hu.php | 2 - lang/id.php | 2 - lang/it.php | 2 - lang/ja.php | 2 - lang/lv.php | 2 - lang/nl.php | 2 - lang/no.php | 2 - lang/pl.php | 2 - lang/pt-br.php | 2 - lang/pt.php | 2 - lang/ro.php | 2 - lang/ru.php | 2 - lang/sk.php | 2 - lang/sv.php | 2 - lang/tr.php | 2 - lang/uk.php | 2 - lang/vi.php | 5 +-- lang/zh-cn.php | 2 - lib/class_image.php | 2 - lib/class_image_gd.php | 2 - lib/class_image_gmagick.php | 2 - lib/class_image_imagick.php | 2 - lib/class_zipFolder.php | 2 - lib/helper_dir.php | 2 - lib/helper_file.php | 2 - lib/helper_httpCache.php | 2 - lib/helper_path.php | 2 - lib/helper_phpGet.php | 2 - lib/helper_text.php | 2 - themes/dark/css.php | 2 - themes/dark/js.php | 2 - themes/default/css.php | 2 - themes/default/js.php | 2 - upload.php | 2 - 65 files changed, 99 insertions(+), 203 deletions(-) create mode 100644 core/class/session.php diff --git a/browse.php b/browse.php index da99552..7f1f815 100644 --- a/browse.php +++ b/browse.php @@ -16,5 +16,3 @@ $browser = "kcfinder\\browser"; // To execute core/bootstrap.php on older $browser = new $browser(); // PHP versions (even PHP 4) $browser->action(); - -?> \ No newline at end of file diff --git a/composer.json b/composer.json index 879b3a6..da925e4 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sunhater/kcfinder", "description": "KCFinder web file manager", - "version": "3.20-test1", + "version": "3.20-test2", "type": "library", "keywords": [ "kcfinder", diff --git a/conf/config.php b/conf/config.php index 61324f2..7636437 100644 --- a/conf/config.php +++ b/conf/config.php @@ -16,7 +16,7 @@ even if you are using session configuration. See http://kcfinder.sunhater.com/install for setting descriptions */ -$_CONFIG = array( +return array( // GENERAL SETTINGS @@ -108,20 +108,11 @@ // THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION SETTINGS - '_normalizeFilenames' => false, + '_sessionVar' => "KCFINDER", '_check4htaccess' => true, + '_normalizeFilenames' => false, '_dropUploadMaxFilesize' => 10485760, //'_tinyMCEPath' => "/tiny_mce", - - '_sessionVar' => "KCFINDER", - //'_sessionLifetime' => 30, - //'_sessionDir' => "/full/directory/path", - //'_sessionDomain' => ".mysite.com", - //'_sessionPath' => "/my/path", - //'_cssMinCmd' => "java -jar /path/to/yuicompressor.jar --type css {file}", //'_jsMinCmd' => "java -jar /path/to/yuicompressor.jar --type js {file}", - ); - -?> \ No newline at end of file diff --git a/core/autoload.php b/core/autoload.php index 0988af8..8d1fbcf 100644 --- a/core/autoload.php +++ b/core/autoload.php @@ -21,14 +21,8 @@ list($ns, $class) = $path; if ($ns == "kcfinder") { - - if ($class == "uploader") - require "core/class/uploader.php"; - elseif ($class == "browser") - require "core/class/browser.php"; - elseif ($class == "minifier") - require "core/class/minifier.php"; - + if (in_array($class, array("uploader", "browser", "minifier", "session"))) + require "core/class/$class.php"; elseif (file_exists("core/types/$class.php")) require "core/types/$class.php"; elseif (file_exists("lib/class_$class.php")) @@ -37,5 +31,3 @@ require "lib/helper_$class.php"; } }); - -?> \ No newline at end of file diff --git a/core/bootstrap.php b/core/bootstrap.php index bd98538..69b7fdf 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -177,5 +177,3 @@ public function gc($maxlifetime) { // PUT YOUR ADDITIONAL CODE HERE - -?> \ No newline at end of file diff --git a/core/class/browser.php b/core/class/browser.php index 0425f67..0f648e4 100644 --- a/core/class/browser.php +++ b/core/class/browser.php @@ -936,5 +936,3 @@ protected function getLangs() { return $langs; } } - -?> \ No newline at end of file diff --git a/core/class/minifier.php b/core/class/minifier.php index dfe7eab..bbe0db7 100644 --- a/core/class/minifier.php +++ b/core/class/minifier.php @@ -25,13 +25,12 @@ class minifier { ); public function __construct($type=null) { - require "conf/config.php"; - $this->config = $_CONFIG; + $this->config = require("conf/config.php"); $type = strtolower($type); if (isset($this->mime[$type])) $this->type = $type; - if (isset($_CONFIG["_{$this->type}MinCmd"])) - $this->minCmd = $_CONFIG["_{$this->type}MinCmd"]; + if (isset($this->config["_{$this->type}MinCmd"])) + $this->minCmd = $this->config["_{$this->type}MinCmd"]; } public function minify($cacheFile=null, $dir=null) { @@ -110,5 +109,3 @@ public function minify($cacheFile=null, $dir=null) { } } - -?> \ No newline at end of file diff --git a/core/class/session.php b/core/class/session.php new file mode 100644 index 0000000..918a016 --- /dev/null +++ b/core/class/session.php @@ -0,0 +1,76 @@ + + * @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; + } + +} diff --git a/core/class/uploader.php b/core/class/uploader.php index 8151817..447d0ff 100644 --- a/core/class/uploader.php +++ b/core/class/uploader.php @@ -17,7 +17,7 @@ class uploader { /** Release version */ - const VERSION = "3.20-test1"; + const VERSION = "3.20-test2"; /** Config session-overrided settings * @var array */ @@ -107,59 +107,10 @@ public function __construct() { if (count($_FILES)) $this->file = &$_FILES[key($_FILES)]; - // LOAD DEFAULT CONFIGURATION - require "conf/config.php"; - - // SETTING UP SESSION - if (!session_id()) { - if (isset($_CONFIG['_sessionLifetime'])) - ini_set('session.gc_maxlifetime', $_CONFIG['_sessionLifetime'] * 60); - if (isset($_CONFIG['_sessionDir'])) - ini_set('session.save_path', $_CONFIG['_sessionDir']); - if (isset($_CONFIG['_sessionDomain'])) - ini_set('session.cookie_domain', $_CONFIG['_sessionDomain']); - session_start(); - } - - // LOAD SESSION CONFIGURATION IF EXISTS - $this->config = $_CONFIG; - $sessVar = "_sessionVar"; - if (isset($_CONFIG[$sessVar])) { - - $sessVar = $_CONFIG[$sessVar]; - - if (!isset($_SESSION[$sessVar])) - $_SESSION[$sessVar] = array(); - - $sessVar = &$_SESSION[$sessVar]; - - if (!is_array($sessVar)) - $sessVar = array(); - - foreach ($sessVar as $key => $val) - if ((substr($key, 0, 1) != "_") && isset($_CONFIG[$key])) - $this->config[$key] = $val; - - if (!isset($sessVar['self'])) - $sessVar['self'] = array(); - - $this->session = &$sessVar['self']; - - } else - $this->session = &$_SESSION; - - // SECURING THE SESSION - $stamp = array( - 'ip' => $_SERVER['REMOTE_ADDR'], - 'agent' => md5($_SERVER['HTTP_USER_AGENT']) - ); - if (!isset($this->session['stamp'])) - $this->session['stamp'] = $stamp; - elseif (!is_array($this->session['stamp']) || ($this->session['stamp'] !== $stamp)) { - if ($this->session['stamp']['ip'] === $stamp['ip']) - session_destroy(); - die; - } + // CONFIG & SESSION SETUP + $session = new session("conf/config.php"); + $this->config = $session->getConfig(); + $this->session = &$session->values; // IMAGE DRIVER INIT if (isset($this->config['imageDriversPriority'])) { @@ -813,5 +764,3 @@ protected function get_htaccess() { return file_get_contents("conf/upload.htaccess"); } } - -?> diff --git a/core/types/type_img.php b/core/types/type_img.php index 378e59d..c03ca7d 100644 --- a/core/types/type_img.php +++ b/core/types/type_img.php @@ -29,5 +29,3 @@ public function checkFile($file, array $config) { return true; } } - -?> \ No newline at end of file diff --git a/core/types/type_mime.php b/core/types/type_mime.php index 96cc514..9fc734d 100644 --- a/core/types/type_mime.php +++ b/core/types/type_mime.php @@ -45,5 +45,3 @@ public function checkFile($file, array $config) { : true; } } - -?> \ No newline at end of file diff --git a/css/index.php b/css/index.php index 0347e40..256a7b5 100644 --- a/css/index.php +++ b/css/index.php @@ -18,5 +18,3 @@ require "core/autoload.php"; $min = new minifier("css"); $min->minify("cache/base.css"); - -?> \ No newline at end of file diff --git a/doc/Changelog.md b/doc/Changelog.md index 025bd4e..f7674ec 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -1,3 +1,10 @@ +3.20-test2: 2014-08-24 +---------------------- +* 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 + 3.20-test1: 2014-08-19 ---------------------- * "`DOCUMENT_ROOT` is symlink" bugfix diff --git a/index.php b/index.php index 6d49d5f..15a4b5e 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,2 @@ \ No newline at end of file diff --git a/integration/drupal.php b/integration/drupal.php index 52dbda1..e5db5f9 100644 --- a/integration/drupal.php +++ b/integration/drupal.php @@ -109,5 +109,3 @@ function CheckAuthentication($drupal_path) { } CheckAuthentication(get_drupal_path()); - -?> \ No newline at end of file diff --git a/js/index.php b/js/index.php index 627bae5..962e48e 100644 --- a/js/index.php +++ b/js/index.php @@ -18,5 +18,3 @@ require "core/autoload.php"; $min = new minifier("js"); $min->minify("cache/base.js"); - -?> \ No newline at end of file diff --git a/js_localize.php b/js_localize.php index d84df78..3ac3c76 100644 --- a/js_localize.php +++ b/js_localize.php @@ -44,5 +44,3 @@ } echo "}"; - -?> diff --git a/lang/af.php b/lang/af.php index abac588..86c2eb7 100644 --- a/lang/af.php +++ b/lang/af.php @@ -244,5 +244,3 @@ "Select Thumbnails" => "Kies duimnaels", "Download files" => "Laai lêers af", ); - -?> \ No newline at end of file diff --git a/lang/bg.php b/lang/bg.php index 8a6f1b0..2aa78a0 100644 --- a/lang/bg.php +++ b/lang/bg.php @@ -276,5 +276,3 @@ "Uploaded {uploaded} of {total}" => "Качено {uploaded} от общо {total}", "Errors:" => "Грешки:" ); - -?> \ No newline at end of file diff --git a/lang/ca.php b/lang/ca.php index 9dc5dde..2cf49f3 100644 --- a/lang/ca.php +++ b/lang/ca.php @@ -126,5 +126,3 @@ "Uploading file {number} of {count}... {progress}" => "Carregant arxiu {number} de {count}... {progress}", "Failed to upload {filename}!" => "Error al carregar {filename}", ); - -?> \ No newline at end of file diff --git a/lang/cs.php b/lang/cs.php index 56782f4..a7efad2 100644 --- a/lang/cs.php +++ b/lang/cs.php @@ -130,5 +130,3 @@ "Confirmation" => "Potvrzení", "Warning" => "Varování", ); - -?> \ No newline at end of file diff --git a/lang/da.php b/lang/da.php index 0617441..13759cc 100644 --- a/lang/da.php +++ b/lang/da.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Uploader fil {number} af {count} ... {progress}", "Failed to upload {filename}!" => "Kunne ikke uploade {filename}!", ); - -?> \ No newline at end of file diff --git a/lang/de.php b/lang/de.php index b141375..9027bec 100644 --- a/lang/de.php +++ b/lang/de.php @@ -130,5 +130,3 @@ "Confirmation" => "Bestätigung", "Warning" => "Warnung" ); - -?> \ No newline at end of file diff --git a/lang/el.php b/lang/el.php index e3b7c22..c550b8a 100644 --- a/lang/el.php +++ b/lang/el.php @@ -130,5 +130,3 @@ "Confirmation" => "Επιβεβαίωση", "Warning" => "Προειδοποίηση", ); - -?> \ No newline at end of file diff --git a/lang/en.php b/lang/en.php index d2bc64a..c66f2d3 100644 --- a/lang/en.php +++ b/lang/en.php @@ -23,5 +23,3 @@ '_dateTimeMid' => "%a %b %e %Y %I:%M %p", '_dateTimeSmall' => "%m/%d/%Y %I:%M %p", ); - -?> \ No newline at end of file diff --git a/lang/es.php b/lang/es.php index 9f3b5e2..5ff6d06 100644 --- a/lang/es.php +++ b/lang/es.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Cargando archivo {number} de {count}... {progress}", "Failed to upload {filename}!" => "¡No se pudo cargar el archivo {filename}!", ); - -?> diff --git a/lang/et.php b/lang/et.php index 5b4ac67..ba7e6e1 100644 --- a/lang/et.php +++ b/lang/et.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Laen üles faili {number} {count}-st... {progress}", "Failed to upload {filename}!" => "{filename} üleslaadimine ebaõnnestus!", ); - -?> \ No newline at end of file diff --git a/lang/fa.php b/lang/fa.php index 7046d73..429749c 100644 --- a/lang/fa.php +++ b/lang/fa.php @@ -265,5 +265,3 @@ "Failed to upload {filename}!" => "! {filename} خطا در ارسال" ); - -?> diff --git a/lang/fi.php b/lang/fi.php index 71ce46d..788f825 100644 --- a/lang/fi.php +++ b/lang/fi.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Siirretään tiedostoa {number}/{count} ... {progress}", "Failed to upload {filename}!" => "Siirto epäonnistui {filename}!", ); - -?> \ No newline at end of file diff --git a/lang/fr.php b/lang/fr.php index 623cc75..82b5daf 100644 --- a/lang/fr.php +++ b/lang/fr.php @@ -131,5 +131,3 @@ "Confirmation" => "Confirmation", "Warning" => "Avertissement", ); - -?> diff --git a/lang/he.php b/lang/he.php index 0847df1..387b5f3 100644 --- a/lang/he.php +++ b/lang/he.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "מעלה קובץ {number} מתוך {count}... {progress}", "Failed to upload {filename}!" => "העלאת הקובץ נכשלה!", ); - -?> \ No newline at end of file diff --git a/lang/hu.php b/lang/hu.php index 02a46ff..77973a6 100644 --- a/lang/hu.php +++ b/lang/hu.php @@ -130,5 +130,3 @@ "Confirmation" => "Megerősítés", "Warning" => "Figyelem" ); - -?> \ No newline at end of file diff --git a/lang/id.php b/lang/id.php index 3b9c44a..24a8e7d 100644 --- a/lang/id.php +++ b/lang/id.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Mengunggah file {number} of {count}... {progress}", "Failed to upload {filename}!" => "Gagal untuk mengunggah {filename}", ); - -?> \ No newline at end of file diff --git a/lang/it.php b/lang/it.php index 4874212..377e56c 100644 --- a/lang/it.php +++ b/lang/it.php @@ -130,5 +130,3 @@ "Confirmation" => "Conferma", "Warning" => "Attenzione", ); - -?> \ No newline at end of file diff --git a/lang/ja.php b/lang/ja.php index dcf0845..bde1a72 100644 --- a/lang/ja.php +++ b/lang/ja.php @@ -131,5 +131,3 @@ "Uploading file {number} of {count}... {progress}" => "ファイルをアップロード中({number}/{count})... {progress}", "Failed to upload {filename}!" => "{filename}のアップロードに失敗しました", ); - -?> diff --git a/lang/lv.php b/lang/lv.php index 0669f55..d3abaab 100644 --- a/lang/lv.php +++ b/lang/lv.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Augšupielādējot failu {number} no {count}... {progress}", "Failed to upload {filename}!" => "Neizdevās augšupielādēt {filename}!", ); - -?> \ No newline at end of file diff --git a/lang/nl.php b/lang/nl.php index ed34908..6d3e9a3 100644 --- a/lang/nl.php +++ b/lang/nl.php @@ -131,5 +131,3 @@ "Confirmation" => "Bevestiging", "Warning" => "Waarschuwing", ); - -?> diff --git a/lang/no.php b/lang/no.php index 9de001e..3482ef5 100644 --- a/lang/no.php +++ b/lang/no.php @@ -240,5 +240,3 @@ "Select Thumbnails" => "Velg miniatyrbilde", "Download files" => "Last ned filer", ); - -?> \ No newline at end of file diff --git a/lang/pl.php b/lang/pl.php index a411d63..afbe644 100644 --- a/lang/pl.php +++ b/lang/pl.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Wysyłanie pliku nr {number} spośród {count} ... {progress}", "Failed to upload {filename}!" => "Wysyłanie pliku {filename} nie powiodło się!", ); - -?> \ No newline at end of file diff --git a/lang/pt-br.php b/lang/pt-br.php index f18ccff..4acdec5 100644 --- a/lang/pt-br.php +++ b/lang/pt-br.php @@ -128,5 +128,3 @@ "Uploading file {number} of {count}... {progress}" => "Enviando arquivo {number} de {count}... {progress}", "Failed to upload {filename}!" => "Falha no envio do arquivo {filename}!", ); - -?> \ No newline at end of file diff --git a/lang/pt.php b/lang/pt.php index 285b0aa..acd898a 100644 --- a/lang/pt.php +++ b/lang/pt.php @@ -241,5 +241,3 @@ "Select Thumbnails" => "Seleccionar miniaturas", "Download files" => "Sacar ficheiros", ); - -?> diff --git a/lang/ro.php b/lang/ro.php index ef384b6..63f4955 100644 --- a/lang/ro.php +++ b/lang/ro.php @@ -124,5 +124,3 @@ "Uploading file {number} of {count}... {progress}" => "Încărcare fișier {number} din {count}... {progress}", "Failed to upload {filename}!" => "Încărcare {filename} eșuată!", ); - -?> \ No newline at end of file diff --git a/lang/ru.php b/lang/ru.php index f70cffb..f9ada3c 100644 --- a/lang/ru.php +++ b/lang/ru.php @@ -131,5 +131,3 @@ "Confirmation" => "Подтверждение", "Warning" => "Предупреждение", ); - -?> diff --git a/lang/sk.php b/lang/sk.php index 2ebf851..4262b02 100644 --- a/lang/sk.php +++ b/lang/sk.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Nahrávam súbor {number} z {count}... {progress}", "Failed to upload {filename}!" => "Nepodarilo sa nahrať súbor {filename}!", ); - -?> \ No newline at end of file diff --git a/lang/sv.php b/lang/sv.php index 2f5aa35..7241cea 100644 --- a/lang/sv.php +++ b/lang/sv.php @@ -125,5 +125,3 @@ "Uploading file {number} of {count}... {progress}" => "Ladda upp fil {number} av {count} ... {progress}", "Failed to upload {filename}!" => "Uppladdning misslyckad {filename}!", ); - -?> \ No newline at end of file diff --git a/lang/tr.php b/lang/tr.php index f98bd93..645c476 100644 --- a/lang/tr.php +++ b/lang/tr.php @@ -130,5 +130,3 @@ "Confirmation" => "Onay", "Warning" => "Uyarı", ); - -?> diff --git a/lang/uk.php b/lang/uk.php index a542d15..a619c06 100644 --- a/lang/uk.php +++ b/lang/uk.php @@ -126,5 +126,3 @@ "Uploading file {number} of {count}... {progress}" => "Завантаження файлу {number} з {count}... {progress}", "Failed to upload {filename}!" => "Помилка завантаження {filename}!", ); - -?> \ No newline at end of file diff --git a/lang/vi.php b/lang/vi.php index 9b6002e..7974066 100644 --- a/lang/vi.php +++ b/lang/vi.php @@ -128,6 +128,5 @@ "Previous" => "Trước", "Next" => "Sau", "Confirmation" => "Xác nhận", - "Warning" => "Cảnh báo",); - -?> + "Warning" => "Cảnh báo", +); diff --git a/lang/zh-cn.php b/lang/zh-cn.php index 8c608a4..1e53969 100644 --- a/lang/zh-cn.php +++ b/lang/zh-cn.php @@ -128,5 +128,3 @@ "Uploading file {number} of {count}... {progress}" => "正在上传文件{number} / {count}... {progress}", "Failed to upload {filename}!" => "上传失败{filename}!", ); - -?> \ No newline at end of file diff --git a/lib/class_image.php b/lib/class_image.php index 4905652..0e6666e 100644 --- a/lib/class_image.php +++ b/lib/class_image.php @@ -239,5 +239,3 @@ abstract protected function getBlankImage($width, $height); abstract protected function getImage($image, &$width, &$height); } - -?> \ No newline at end of file diff --git a/lib/class_image_gd.php b/lib/class_image_gd.php index b46ec6c..98f79be 100644 --- a/lib/class_image_gd.php +++ b/lib/class_image_gd.php @@ -350,5 +350,3 @@ protected function imageCopyResampled( return imageCopyResampled($this->image, $src, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH); } } - -?> \ No newline at end of file diff --git a/lib/class_image_gmagick.php b/lib/class_image_gmagick.php index f49b0f1..41ef437 100644 --- a/lib/class_image_gmagick.php +++ b/lib/class_image_gmagick.php @@ -300,5 +300,3 @@ protected function optimize_jpeg(array $options=array()) { } } - -?> \ No newline at end of file diff --git a/lib/class_image_imagick.php b/lib/class_image_imagick.php index e3dfa33..59bc39d 100644 --- a/lib/class_image_imagick.php +++ b/lib/class_image_imagick.php @@ -303,5 +303,3 @@ protected function optimize_jpeg(array $options=array()) { } } - -?> \ No newline at end of file diff --git a/lib/class_zipFolder.php b/lib/class_zipFolder.php index 7dc6e64..64b446e 100644 --- a/lib/class_zipFolder.php +++ b/lib/class_zipFolder.php @@ -58,5 +58,3 @@ function zip($folder, $parent=null) { } } } - -?> \ No newline at end of file diff --git a/lib/helper_dir.php b/lib/helper_dir.php index dcc057f..a197a27 100644 --- a/lib/helper_dir.php +++ b/lib/helper_dir.php @@ -154,5 +154,3 @@ static function fileSort($a, $b) { return ($a < $b) ? -1 : 1; } } - -?> \ No newline at end of file diff --git a/lib/helper_file.php b/lib/helper_file.php index 4119ec9..5c3c34f 100644 --- a/lib/helper_file.php +++ b/lib/helper_file.php @@ -212,5 +212,3 @@ static function normalizeFilename($filename) { } } - -?> \ No newline at end of file diff --git a/lib/helper_httpCache.php b/lib/helper_httpCache.php index 8d51e8c..24e022a 100644 --- a/lib/helper_httpCache.php +++ b/lib/helper_httpCache.php @@ -96,5 +96,3 @@ static function checkMTime($mtime, $sendHeaders=null) { } } - -?> \ No newline at end of file diff --git a/lib/helper_path.php b/lib/helper_path.php index b6421a4..e2e085a 100644 --- a/lib/helper_path.php +++ b/lib/helper_path.php @@ -145,5 +145,3 @@ static function urlPathDecode($path) { } } - -?> \ No newline at end of file diff --git a/lib/helper_phpGet.php b/lib/helper_phpGet.php index 1f0f0db..3b6c83b 100644 --- a/lib/helper_phpGet.php +++ b/lib/helper_phpGet.php @@ -156,5 +156,3 @@ function_exists('socket_read') && function_exists('socket_close'); } } - -?> \ No newline at end of file diff --git a/lib/helper_text.php b/lib/helper_text.php index 15fcae2..d750e5e 100644 --- a/lib/helper_text.php +++ b/lib/helper_text.php @@ -51,5 +51,3 @@ static function jsValue($string) { } } - -?> \ No newline at end of file diff --git a/themes/dark/css.php b/themes/dark/css.php index 569abc7..247857b 100644 --- a/themes/dark/css.php +++ b/themes/dark/css.php @@ -8,5 +8,3 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("css"); $min->minify("cache/theme_$theme.css"); - -?> \ No newline at end of file diff --git a/themes/dark/js.php b/themes/dark/js.php index 32245b6..b60b450 100644 --- a/themes/dark/js.php +++ b/themes/dark/js.php @@ -8,5 +8,3 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("js"); $min->minify("cache/theme_$theme.js"); - -?> \ No newline at end of file diff --git a/themes/default/css.php b/themes/default/css.php index 569abc7..247857b 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -8,5 +8,3 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("css"); $min->minify("cache/theme_$theme.css"); - -?> \ No newline at end of file diff --git a/themes/default/js.php b/themes/default/js.php index 32245b6..b60b450 100644 --- a/themes/default/js.php +++ b/themes/default/js.php @@ -8,5 +8,3 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("js"); $min->minify("cache/theme_$theme.js"); - -?> \ No newline at end of file diff --git a/upload.php b/upload.php index dd6cfb2..5a86e60 100644 --- a/upload.php +++ b/upload.php @@ -16,5 +16,3 @@ $uploader = "kcfinder\\uploader"; // To execute core/bootstrap.php on older $uploader = new $uploader(); // PHP versions (even PHP 4) $uploader->upload(); - -?> \ No newline at end of file