Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,18 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Editor Library: Gateway
|
||||
* Last Updated: $Date: 2009-08-13 19:35:55 -0400 (Thu, 13 Aug 2009) $
|
||||
* Last Updated: $Date: 2010-11-12 13:07:33 -0500 (Fri, 12 Nov 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 5015 $
|
||||
* @version $Revision: 7174 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -26,7 +27,6 @@ class hanEditor
|
||||
/**
|
||||
* Editor reference
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $class_editor;
|
||||
@@ -34,7 +34,6 @@ class hanEditor
|
||||
/**
|
||||
* Editing method (rte|std)
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $method = '';
|
||||
@@ -42,7 +41,6 @@ class hanEditor
|
||||
/**
|
||||
* Editor width
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
* @deprecated
|
||||
*/
|
||||
@@ -51,7 +49,6 @@ class hanEditor
|
||||
/**
|
||||
* Editor height
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
* @deprecated
|
||||
*/
|
||||
@@ -60,7 +57,6 @@ class hanEditor
|
||||
/**
|
||||
* RTE enabled?
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $rte_on = false;
|
||||
@@ -68,7 +64,6 @@ class hanEditor
|
||||
/**
|
||||
* Images directory (for acp)
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $image_dir = '';
|
||||
@@ -76,7 +71,6 @@ class hanEditor
|
||||
/**
|
||||
* Emoticons directory (for acp)
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $emo_dir = '';
|
||||
@@ -84,7 +78,6 @@ class hanEditor
|
||||
/**
|
||||
* Current editor id
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $editor_id = 'ed-0';
|
||||
@@ -92,7 +85,6 @@ class hanEditor
|
||||
/**
|
||||
* Remove emoticons from editor
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $remove_emoticons = false;
|
||||
@@ -100,7 +92,6 @@ class hanEditor
|
||||
/**
|
||||
* ACP editor id
|
||||
*
|
||||
* @access public
|
||||
* @var integer
|
||||
*/
|
||||
public $acp_editor_id = 0;
|
||||
@@ -108,7 +99,6 @@ class hanEditor
|
||||
/**#@+
|
||||
* Registry objects
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
@@ -117,34 +107,34 @@ class hanEditor
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
*/
|
||||
@@ -208,7 +198,7 @@ class hanEditor
|
||||
//-----------------------------------------
|
||||
// Sneaky Opera or Safari
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( $this->method == 'rte' )
|
||||
{
|
||||
if ( $this->memberData['_canUseRTE'] !== TRUE )
|
||||
@@ -242,9 +232,9 @@ class hanEditor
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/editor/class_editor.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/editor/' . $class );
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/' . $class, 'class_editor_module' );
|
||||
|
||||
$this->class_editor = new class_editor_module( $this->registry );
|
||||
$this->class_editor = new $classToLoad( $this->registry );
|
||||
|
||||
$this->class_editor->allow_unicode = IPS_ALLOW_UNICODE;
|
||||
$this->class_editor->get_magic_quotes = IPS_MAGIC_QUOTES;
|
||||
@@ -289,7 +279,6 @@ class hanEditor
|
||||
/**
|
||||
* Show the editor
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw text with bbcode
|
||||
* @param string Form field name
|
||||
* @return string Editor HTML
|
||||
@@ -338,7 +327,7 @@ class hanEditor
|
||||
|
||||
if( $this->method == 'rte' )
|
||||
{
|
||||
$text = preg_replace( "#(<|<|&lt;|&\#60;)script#si", "&lt;script", $text );
|
||||
$text = preg_replace( '#(<|<|&lt;|&\#60;)script#si', "&lt;script", $text );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -349,7 +338,7 @@ class hanEditor
|
||||
{
|
||||
$return_html = $this->registry->getClass('output')->global_template->ips_editor( $form_field, $text, $this->settings['img_url'].'/folder_editor_images/', $this->rte_on, $this->editor_id, $smilies );
|
||||
|
||||
$return_html = preg_replace( "#([^/\.])js/#is", "\\1".$this->settings['board_url']."/public/js/" , $return_html );
|
||||
$return_html = preg_replace( '#([^/\.])js/#is', "\\1".$this->settings['board_url']."/public/js/" , $return_html );
|
||||
$return_html = str_replace( "<#IMG_DIR#>" , $this->settings['board_url']."/public/style_images/{$this->image_dir}", $return_html );
|
||||
}
|
||||
else
|
||||
@@ -363,19 +352,18 @@ class hanEditor
|
||||
/**
|
||||
* Retrieve the posted contents from the editor
|
||||
*
|
||||
* @access public
|
||||
* @param string Form field name OR raw text
|
||||
* @param boolean Is definitely full text and not a field name
|
||||
* @return string Editor HTML
|
||||
*/
|
||||
public function processRawPost( $form_field )
|
||||
public function processRawPost( $form_field, $isDefinitelyFullText=false )
|
||||
{
|
||||
return $this->class_editor->processAfterForm( $form_field );
|
||||
return $this->class_editor->processAfterForm( $form_field, $isDefinitelyFullText );
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs through processBeforeForm
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw text
|
||||
* @return string Processed text
|
||||
*/
|
||||
@@ -383,5 +371,4 @@ class hanEditor
|
||||
{
|
||||
return $this->class_editor->processBeforeForm( $text );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user