| 1 |
<?php |
<?php |
| 2 |
// $Id: fckeditor.module,v 1.20.2.34.2.84 2009/10/05 08:00:12 jorrit Exp $ |
// $Id: fckeditor.module,v 1.20.2.34.2.85 2009/10/22 20:35:17 jorrit Exp $ |
| 3 |
/** |
/** |
| 4 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
| 5 |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
| 161 |
$fckeditor_filters = array(); |
$fckeditor_filters = array(); |
| 162 |
|
|
| 163 |
// Iterate over element children; resetting array keys to access last index. |
// Iterate over element children; resetting array keys to access last index. |
| 164 |
if ($children = array_values(element_children($form))) { |
if (($children = array_values(element_children($form)))) { |
| 165 |
foreach ($children as $index => $item) { |
foreach ($children as $index => $item) { |
| 166 |
$element = &$form[$item]; |
$element = &$form[$item]; |
| 167 |
|
|
| 376 |
* FCKeditor does not implement any kind of potection on private files. |
* FCKeditor does not implement any kind of potection on private files. |
| 377 |
*/ |
*/ |
| 378 |
function fckeditor_file_download($file) { |
function fckeditor_file_download($file) { |
| 379 |
if ($path = file_create_path($file)) { |
if (($path = file_create_path($file))) { |
| 380 |
$result = db_query("SELECT f.* FROM {files} f WHERE filepath = '%s'", $path); |
$result = db_query("SELECT f.* FROM {files} f WHERE filepath = '%s'", $path); |
| 381 |
if (db_fetch_object($result)) { |
if (db_fetch_object($result)) { |
| 382 |
return NULL; |
return NULL; |
| 770 |
|
|
| 771 |
if (!empty($conf['js_conf'])) { |
if (!empty($conf['js_conf'])) { |
| 772 |
$lines = preg_split("/[\n\r]+/", $conf['js_conf']); |
$lines = preg_split("/[\n\r]+/", $conf['js_conf']); |
| 773 |
foreach ($lines as $l) |
foreach ($lines as $l) { |
| 774 |
if ($l && strlen($l) > 5) { |
if (strlen($l) > 5) { |
| 775 |
$eqpos = strpos($l, "="); |
$eqpos = strpos($l, '='); |
| 776 |
if (FALSE !== $eqpos) { |
if (FALSE !== $eqpos) { |
| 777 |
$option = str_replace("FCKConfig.", "", substr($l, 0, $eqpos)); |
$option = str_replace('FCKConfig.', '', substr($l, 0, $eqpos)); |
| 778 |
$js .= "\n". $js_id .".Config['". trim($option) ."'] =". substr($l, $eqpos + 1); |
$js .= "\n". $js_id .".Config['". trim($option) ."'] =". substr($l, $eqpos + 1); |
| 779 |
|
} |
| 780 |
} |
} |
| 781 |
} |
} |
| 782 |
} |
} |