/[drupal]/contributions/modules/fckeditor/fckeditor.admin.inc
ViewVC logotype

Diff of /contributions/modules/fckeditor/fckeditor.admin.inc

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

revision 1.1.2.46, Mon Oct 26 19:53:09 2009 UTC revision 1.1.2.47, Mon Nov 2 18:53:11 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: fckeditor.admin.inc,v 1.1.2.45 2009/10/24 09:48:27 jorrit Exp $  // $Id: fckeditor.admin.inc,v 1.1.2.46 2009/10/26 19:53:09 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 626  function fckeditor_admin_profile_form($f Line 626  function fckeditor_admin_profile_form($f
626      '#default_value' => !empty($profile->settings['css_path']) ? $profile->settings['css_path'] : "",      '#default_value' => !empty($profile->settings['css_path']) ? $profile->settings['css_path'] : "",
627      '#size' => 40,      '#size' => 40,
628      '#maxlength' => 255,      '#maxlength' => 255,
629      '#description' =>      '#description' =>
630        t('Enter path to CSS file (Example: %cssexample1) or a list of CSS files separated by a comma (Example: %cssexample2). Make sure to select %defcss above.',        t('Enter path to CSS file (Example: %cssexample1) or a list of CSS files separated by a comma (Example: %cssexample2). Make sure to select %defcss above.',
631          array(          array(
632            '%cssexample1' => 'css/editor.css',            '%cssexample1' => 'css/editor.css',
# Line 668  function fckeditor_admin_profile_form($f Line 668  function fckeditor_admin_profile_form($f
668          array(          array(
669            '@type' => t('styles'),            '@type' => t('styles'),
670            '%example' => '/fckstyles.xml',            '%example' => '/fckstyles.xml',
671            '%setting' => t('Define path to fckstyles.xml'),            '%setting' => t('Define path to fckstyles.xml'),
672          )) .'<br />'.          )) .'<br />'.
673        t('Available placeholders') .':<br />'.        t('Available placeholders') .':<br />'.
674        '<strong>%h</strong> - '. t('host name (%host)', array('%host' => base_path())) .'<br />'.        '<strong>%h</strong> - '. t('host name (%host)', array('%host' => base_path())) .'<br />'.
# Line 1321  function fckeditor_rebuild_selectors($na Line 1321  function fckeditor_rebuild_selectors($na
1321    
1322        foreach (array('excl', 'simple_incl') as $var) {        foreach (array('excl', 'simple_incl') as $var) {
1323          $settings[$var .'_regex'] = '';          $settings[$var .'_regex'] = '';
         $rules = preg_split('/[\s,]+/', $settings[$var]);  
         $regex = array();  
1324    
1325          if (!empty($rules)) {          if (!empty($settings[$var])) {
1326            foreach ($rules as $rule) {            $rules = preg_split('/[\s,]+/', $settings[$var]);
1327              if (!empty($rule)) {            $regex = array();
1328                $rule = fckeditor_parse_rule($rule);  
1329                $regex[] = '(?:'. fckeditor_rule_to_regex($rule) .')';            if (!empty($rules)) {
1330                foreach ($rules as $rule) {
1331                  if (!empty($rule)) {
1332                    $rule = fckeditor_parse_rule($rule);
1333                    $regex[] = '(?:'. fckeditor_rule_to_regex($rule) .')';
1334                  }
1335              }              }
           }  
1336    
1337            if (!empty($regex)) {              if (!empty($regex)) {
1338              $settings[$var .'_regex'] = '#'. implode('|', $regex) .'#';                $settings[$var .'_regex'] = '#'. implode('|', $regex) .'#';
1339                }
1340            }            }
1341          }          }
1342        }        }

Legend:
Removed from v.1.1.2.46  
changed lines
  Added in v.1.1.2.47

  ViewVC Help
Powered by ViewVC 1.1.2