/[drupal]/contributions/modules/fckeditor/fckeditor.module
ViewVC logotype

Diff of /contributions/modules/fckeditor/fckeditor.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.20.2.34.2.85, Thu Oct 22 20:35:17 2009 UTC revision 1.20.2.34.2.86, Sat Oct 24 09:48:27 2009 UTC
# Line 1  Line 1 
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
# Line 161  function fckeditor_process_form(&$form) Line 161  function fckeditor_process_form(&$form)
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    
# Line 376  function fckeditor_init() { Line 376  function fckeditor_init() {
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;
# Line 770  function fckeditor_process_textarea($ele Line 770  function fckeditor_process_textarea($ele
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      }      }

Legend:
Removed from v.1.20.2.34.2.85  
changed lines
  Added in v.1.20.2.34.2.86

  ViewVC Help
Powered by ViewVC 1.1.2