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 );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* API: Core
|
||||
* Last Updated: $Date: 2009-11-11 20:48:24 -0500 (Wed, 11 Nov 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
|
||||
* @version $Rev: 5376 $
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 7174 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -24,7 +26,6 @@ class hanEmail
|
||||
/**
|
||||
* Emailer object reference
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $emailer;
|
||||
@@ -32,7 +33,6 @@ class hanEmail
|
||||
/**
|
||||
* Email header
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $header;
|
||||
@@ -40,7 +40,6 @@ class hanEmail
|
||||
/**
|
||||
* Email footer
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $footer;
|
||||
@@ -48,7 +47,6 @@ class hanEmail
|
||||
/**
|
||||
* Email from
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $from;
|
||||
@@ -56,7 +54,6 @@ class hanEmail
|
||||
/**
|
||||
* Email to
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $to;
|
||||
@@ -64,7 +61,6 @@ class hanEmail
|
||||
/**
|
||||
* Email bcc's
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $bcc = array();
|
||||
@@ -72,7 +68,6 @@ class hanEmail
|
||||
/**
|
||||
* Email subject
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $subject;
|
||||
@@ -80,7 +75,6 @@ class hanEmail
|
||||
/**
|
||||
* Email body
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $message;
|
||||
@@ -88,7 +82,6 @@ class hanEmail
|
||||
/**
|
||||
* Temp word swapping array
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
private $_words;
|
||||
@@ -96,15 +89,15 @@ class hanEmail
|
||||
/**
|
||||
* Headers to pass to email lib
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
private $temp_headers = array();
|
||||
|
||||
private $_attachments = array();
|
||||
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
@@ -113,12 +106,12 @@ class hanEmail
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
*/
|
||||
@@ -137,7 +130,6 @@ class hanEmail
|
||||
/**
|
||||
* Init method (setup stuff)
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
@@ -145,9 +137,9 @@ class hanEmail
|
||||
$this->header = $this->settings['email_header'] ? $this->settings['email_header'] : '';
|
||||
$this->footer = $this->settings['email_footer'] ? $this->settings['email_footer'] : '';
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classEmail.php' );
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classEmail.php', 'classEmail' );
|
||||
|
||||
$this->emailer = new classEmail(
|
||||
$this->emailer = new $classToLoad(
|
||||
array(
|
||||
'debug' => $this->settings['fake_mail'] ? $this->settings['fake_mail'] : '0',
|
||||
'debug_path' => DOC_IPS_ROOT_PATH . '_mail',
|
||||
@@ -168,7 +160,6 @@ class hanEmail
|
||||
/**
|
||||
* Clear out any temporary headers
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function clearHeaders()
|
||||
@@ -179,7 +170,6 @@ class hanEmail
|
||||
/**
|
||||
* Manually set an email header
|
||||
*
|
||||
* @access public
|
||||
* @param string Header key
|
||||
* @param string Header value
|
||||
* @return void
|
||||
@@ -192,7 +182,6 @@ class hanEmail
|
||||
/**
|
||||
* Send an email
|
||||
*
|
||||
* @access public
|
||||
* @return boolean Email sent successfully
|
||||
*/
|
||||
public function sendMail()
|
||||
@@ -201,6 +190,15 @@ class hanEmail
|
||||
//$this->emailer->clearError();
|
||||
$this->init();
|
||||
|
||||
/* Add attachments if any */
|
||||
if ( count( $this->_attachments ) )
|
||||
{
|
||||
foreach( $this->_attachments as $a )
|
||||
{
|
||||
$this->emailer->addAttachment( $a[0], $a[1], $a[2] );
|
||||
}
|
||||
}
|
||||
|
||||
$this->settings['board_name'] = $this->cleanMessage($this->settings['board_name']);
|
||||
|
||||
$this->emailer->setFrom( $this->from ? $this->from : $this->settings['email_out'], $this->settings['board_name'] );
|
||||
@@ -219,7 +217,13 @@ class hanEmail
|
||||
}
|
||||
}
|
||||
|
||||
$this->emailer->setSubject( $this->subject );
|
||||
//-----------------------------------------
|
||||
// Added strip_tags for the subject 4.16.2010
|
||||
// so we can have links in subject for inline
|
||||
// notifications and still use the subject
|
||||
//-----------------------------------------
|
||||
|
||||
$this->emailer->setSubject( $this->_cleanSubject($this->subject) );
|
||||
$this->emailer->setBody( $this->message );
|
||||
$this->emailer->sendMail();
|
||||
|
||||
@@ -234,7 +238,6 @@ class hanEmail
|
||||
/**
|
||||
* Retrieve an email template
|
||||
*
|
||||
* @access public
|
||||
* @param string Template key
|
||||
* @param string Language to use
|
||||
* @param string Language file to load
|
||||
@@ -308,7 +311,6 @@ class hanEmail
|
||||
/**
|
||||
* Builds an email from a template, replacing variables
|
||||
*
|
||||
* @access public
|
||||
* @param array Replacement keys to values
|
||||
* @param bool Do not "clean"
|
||||
* @return void
|
||||
@@ -361,7 +363,6 @@ class hanEmail
|
||||
/**
|
||||
* Replaces key with value
|
||||
*
|
||||
* @access private
|
||||
* @param string Key
|
||||
* @return string Replaced variable
|
||||
*/
|
||||
@@ -370,17 +371,41 @@ class hanEmail
|
||||
return $this->_words[ $matches[1] ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans the email subject
|
||||
*
|
||||
* @param string In text
|
||||
* @return string Out text
|
||||
*/
|
||||
private function _cleanSubject( $subject )
|
||||
{
|
||||
$subject = strip_tags( $subject );
|
||||
|
||||
$subject = str_replace( "$", "\$", $subject );
|
||||
$subject = str_replace( "!" , "!" , $subject );
|
||||
$subject = str_replace( """ , '"' , $subject );
|
||||
$subject = str_replace( "'" , "'" , $subject );
|
||||
$subject = str_replace( "|", '|' , $subject );
|
||||
$subject = str_replace( "&" , '&' , $subject );
|
||||
$subject = str_replace( ":" , ":" , $subject );
|
||||
$subject = str_replace( "[" , "[" , $subject );
|
||||
$subject = str_replace( "]" , "]" , $subject );
|
||||
$subject = str_replace( "@", '@' , $subject );
|
||||
$subject = str_replace( " " , ' ', $subject );
|
||||
|
||||
return $subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans an email message
|
||||
*
|
||||
* @access public
|
||||
* @param string Email content
|
||||
* @return string Cleaned email content
|
||||
*/
|
||||
public function cleanMessage( $message = "" )
|
||||
{
|
||||
$message = preg_replace( "#\[quote.*\](.+?)\[/quote\]#", "<br /><br />------------ QUOTE ----------<br />\\1<br />-----------------------------<br /><br />" , $message );
|
||||
$message = preg_replace_callback( "#\[url=(.+?)\](.+?)\[/url\]#", array( $this, "_formatUrl" ), $message );
|
||||
$message = preg_replace( '#\[quote.*\](.+?)\[/quote\]#s', "<br /><br />------------ QUOTE ----------<br />\\1<br />-----------------------------<br /><br />" , $message );
|
||||
$message = preg_replace_callback( '#\[url=(.+?)\](.+?)\[/url\]#', array( $this, "_formatUrl" ), $message );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -440,7 +465,6 @@ class hanEmail
|
||||
/**
|
||||
* Format url for email
|
||||
*
|
||||
* @access public
|
||||
* @param array preg_replace matches
|
||||
* @return string Formatted url
|
||||
*/
|
||||
@@ -451,10 +475,22 @@ class hanEmail
|
||||
return $matches[2] . ' (' . $matches[1] . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an attachment to the current email
|
||||
*
|
||||
* @param string File data
|
||||
* @param string File name
|
||||
* @param string File type (MIME)
|
||||
* @return void
|
||||
*/
|
||||
public function addAttachment( $data="", $name="", $ctype='application/octet-stream' )
|
||||
{
|
||||
$this->_attachments[] = array( $data, $name, $ctype );
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a fatal error
|
||||
*
|
||||
* @access private
|
||||
* @param string Message
|
||||
* @param string Help key (deprecated)
|
||||
* @return bool
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Login handler abstraction
|
||||
* Last Updated: $Date: 2009-11-11 20:48:24 -0500 (Wed, 11 Nov 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 Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5376 $
|
||||
*
|
||||
* @version $Revision: 7174 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -25,57 +25,18 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
class han_login
|
||||
{
|
||||
/**
|
||||
* Registry object
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
|
||||
/**
|
||||
* Database object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $DB;
|
||||
|
||||
/**
|
||||
* Settings object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $settings;
|
||||
|
||||
/**
|
||||
* Request object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Language object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $lang;
|
||||
|
||||
/**
|
||||
* Member object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $member;
|
||||
|
||||
/**
|
||||
* Login module registry
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
private $modules = array();
|
||||
@@ -83,7 +44,6 @@ class han_login
|
||||
/**
|
||||
* Flag :: ACP Login
|
||||
*
|
||||
* @access public
|
||||
* @var integer
|
||||
*/
|
||||
public $is_admin_auth = 0;
|
||||
@@ -91,7 +51,6 @@ class han_login
|
||||
/**
|
||||
* Login handler return code
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $return_code = 'WRONG_AUTH';
|
||||
@@ -99,7 +58,6 @@ class han_login
|
||||
/**
|
||||
* Login handler return details
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $return_details = "";
|
||||
@@ -107,7 +65,6 @@ class han_login
|
||||
/**
|
||||
* Flag :: Account unlocked
|
||||
*
|
||||
* @access public
|
||||
* @var integer
|
||||
*/
|
||||
public $account_unlock = 0;
|
||||
@@ -115,7 +72,6 @@ class han_login
|
||||
/**
|
||||
* Member data returned
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $member_data = array( 'member_id' => 0 );
|
||||
@@ -123,7 +79,6 @@ class han_login
|
||||
/**
|
||||
* Login methods
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $login_methods = array();
|
||||
@@ -131,7 +86,6 @@ class han_login
|
||||
/**
|
||||
* Login configuration details
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $login_confs = array();
|
||||
@@ -139,7 +93,6 @@ class han_login
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
*/
|
||||
@@ -150,9 +103,11 @@ class han_login
|
||||
$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();
|
||||
|
||||
//-----------------------------------------
|
||||
// Do not set member, memberData or lang
|
||||
// Causes issues with SSO implementations
|
||||
//-----------------------------------------
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -160,12 +115,11 @@ class han_login
|
||||
* DOES NOT CHECK FOR A USERNAME OR PASSWORD.
|
||||
* << USE WITH CAUTION >>
|
||||
*
|
||||
* @access public
|
||||
* @param int Member ID to log in
|
||||
* @param boolean Set cookies
|
||||
* @return mixed FALSE on error or array [0=Words to show, 1=URL to send to] on success
|
||||
*/
|
||||
public function loginWithoutCheckingCredentials( $memberID, $setCookies=TRUE)
|
||||
public function loginWithoutCheckingCredentials( $memberID, $setCookies=TRUE )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
@@ -196,7 +150,7 @@ class han_login
|
||||
$member['timenow'] = $partial['partial_date'];
|
||||
}
|
||||
|
||||
return array( $this->lang->words['partial_login'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=complete_login&mid='.$member['member_id'].'&key='.$member['timenow'] );
|
||||
return array( $this->registry->getClass('class_localization')->words['partial_login'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=complete_login&mid='.$member['member_id'].'&key='.$member['timenow'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -243,7 +197,7 @@ class han_login
|
||||
|
||||
if ( $member['ip_address'] == "" OR $member['ip_address'] == '127.0.0.1' )
|
||||
{
|
||||
$core['ip_address'] = $this->member->ip_address;
|
||||
$core['ip_address'] = $this->registry->member()->ip_address;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -257,13 +211,13 @@ class han_login
|
||||
$privacy = 1;
|
||||
}
|
||||
|
||||
$session_id = $this->member->sessionClass()->convertGuestToMember( array( 'member_name' => $member['members_display_name'],
|
||||
$session_id = $this->registry->member()->sessionClass()->convertGuestToMember( array( 'member_name' => $member['members_display_name'],
|
||||
'member_id' => $member['member_id'],
|
||||
'member_group' => $member['member_group_id'],
|
||||
'login_type' => $privacy ) );
|
||||
|
||||
|
||||
if ( $this->request['referer'] AND $this->request['referer'] AND $this->request['section'] != 'register' )
|
||||
if ( isset( $this->request['referer'] ) AND $this->request['referer'] AND $this->request['section'] != 'register' )
|
||||
{
|
||||
if ( stripos( $this->request['referer'], 'section=register' ) OR stripos( $this->request['referer'], 'section=login' ) OR stripos( $this->request['referer'], 'section=lostpass' ) )
|
||||
{
|
||||
@@ -276,7 +230,7 @@ class han_login
|
||||
//$url = str_replace( "{$this->settings['board_url']}/", "", $url );
|
||||
//$url = str_replace( "{$this->settings['board_url']}", "", $url );
|
||||
//$url = preg_replace( "#^(.+?)\?#", "" , $url );
|
||||
$url = preg_replace( "#s=(\w){32}#", "" , $url );
|
||||
$url = preg_replace( '#s=(\w){32}#', "" , $url );
|
||||
$url = ltrim( $url, '?' );
|
||||
}
|
||||
}
|
||||
@@ -284,6 +238,7 @@ class han_login
|
||||
{
|
||||
$url = $this->settings['base_url'];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Set our privacy status
|
||||
@@ -299,20 +254,20 @@ class han_login
|
||||
// Clear out any passy change stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->delete( 'validating', 'member_id=' . $this->memberData['member_id'] . ' AND lost_pass=1' );
|
||||
$this->DB->delete( 'validating', 'member_id=' . $this->registry->member()->getProperty('member_id') . ' AND lost_pass=1' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect them to either the board
|
||||
// index, or where they came from
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->request['return'] AND $this->request['return'] != "" )
|
||||
if ( !empty($this->request['return']) )
|
||||
{
|
||||
$return = urldecode($this->request['return']);
|
||||
|
||||
if ( strpos( $return, "http://" ) === 0 )
|
||||
{
|
||||
return array( $this->lang->words['partial_login'], $return );
|
||||
return array( $this->registry->getClass('class_localization')->words['partial_login'], $return );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,12 +278,12 @@ class han_login
|
||||
/* Member Sync */
|
||||
IPSLib::runMemberSync( 'onLogin', $member );
|
||||
|
||||
return array( $this->lang->words['partial_login'], str_replace( '?&', '?', $url . '&s=' . $session_id ) );
|
||||
return array( $this->registry->getClass('class_localization')->words['partial_login'], str_replace( '?&', '?', $url . '&s=' . $session_id ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for loginAuthenticate - returns more information
|
||||
*
|
||||
* @access public
|
||||
* @return mixed array [0=Words to show, 1=URL to send to, 2=error message language key]
|
||||
*/
|
||||
public function verifyLogin()
|
||||
@@ -409,7 +364,7 @@ class han_login
|
||||
|
||||
if ( $member['members_created_remote'] AND isset($member['full']) AND !$member['full'] )
|
||||
{
|
||||
return array( $this->lang->words['partial_login'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=complete_login&mid='.$member['member_id'].'&key='.$member['timenow'] );
|
||||
return array( $this->registry->getClass('class_localization')->words['partial_login'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=complete_login&mid='.$member['member_id'].'&key='.$member['timenow'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -456,7 +411,7 @@ class han_login
|
||||
|
||||
if ( $member['ip_address'] == "" OR $member['ip_address'] == '127.0.0.1' )
|
||||
{
|
||||
$core['ip_address'] = $this->member->ip_address;
|
||||
$core['ip_address'] = $this->registry->member()->ip_address;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -470,7 +425,7 @@ class han_login
|
||||
$privacy = 1;
|
||||
}
|
||||
|
||||
$session_id = $this->member->sessionClass()->convertGuestToMember( array( 'member_name' => $member['members_display_name'],
|
||||
$session_id = $this->registry->member()->sessionClass()->convertGuestToMember( array( 'member_name' => $member['members_display_name'],
|
||||
'member_id' => $member['member_id'],
|
||||
'member_group' => $member['member_group_id'],
|
||||
'login_type' => $privacy ) );
|
||||
@@ -480,22 +435,21 @@ class han_login
|
||||
{
|
||||
if ( stripos( $this->request['referer'], 'section=register' ) OR stripos( $this->request['referer'], 'section=login' ) OR stripos( $this->request['referer'], 'section=lostpass' ) OR stripos( $this->request['referer'], CP_DIRECTORY . '/' ) )
|
||||
{
|
||||
$url = $this->settings['base_url'] . '?act=idx';
|
||||
$url = $this->settings['base_url'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = str_replace( '&' , '&', $this->request['referer'] );
|
||||
$url = preg_replace( "#s=(\w){32}#", "" , $url );
|
||||
|
||||
if( $this->member->session_type != 'cookie' )
|
||||
$url = str_replace( '&', '&', $this->request['referer'] );
|
||||
|
||||
if( $this->registry->member()->session_type == 'cookie' )
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?s=' . $session_id;
|
||||
$url = preg_replace( '#s=(\w){32}#', "" , $url );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = $this->settings['base_url'] . '?act=idx';
|
||||
$url = $this->settings['base_url'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -512,20 +466,20 @@ class han_login
|
||||
// Clear out any passy change stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->delete( 'validating', 'member_id=' . $this->memberData['member_id'] . ' AND lost_pass=1' );
|
||||
$this->DB->delete( 'validating', 'member_id=' . $this->registry->member()->getProperty('member_id') . ' AND lost_pass=1' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect them to either the board
|
||||
// index, or where they came from
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->request['return'] )
|
||||
if ( !empty($this->request['return']) )
|
||||
{
|
||||
$return = urldecode($this->request['return']);
|
||||
|
||||
if ( strpos( $return, "http://" ) === 0 )
|
||||
{
|
||||
return array( $this->lang->words['partial_login'], $return );
|
||||
return array( $this->registry->getClass('class_localization')->words['partial_login'], $return );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,16 +487,19 @@ class han_login
|
||||
// Still here?
|
||||
//-----------------------------------------
|
||||
|
||||
$member['plainPassword'] = $password;
|
||||
|
||||
/* Member Sync */
|
||||
IPSLib::runMemberSync( 'onLogin', $member );
|
||||
|
||||
return array( $this->lang->words['partial_login'], $url );
|
||||
unset( $member['plainPassword'] );
|
||||
|
||||
return array( $this->registry->getClass('class_localization')->words['partial_login'], $url );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize class
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
@@ -585,10 +542,8 @@ class han_login
|
||||
$this->login_confs[ $login_method['login_order'] ] = $LOGIN_CONF;
|
||||
}
|
||||
|
||||
$classname = "login_" . $login_method['login_folder_name'];
|
||||
|
||||
require_once( $classes[ $login_method['login_order'] ] );
|
||||
$this->modules[ $login_method['login_order'] ] = new $classname( $this->registry, $login_method, $this->login_confs[ $login_method['login_order'] ] );
|
||||
$classname = IPSLib::loadLibrary( $classes[ $login_method['login_order'] ], 'login_' . $login_method['login_folder_name'] );
|
||||
$this->modules[ $login_method['login_order'] ] = new $classname( $this->registry, $login_method, $this->login_confs[ $login_method['login_order'] ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -654,7 +609,7 @@ class han_login
|
||||
|
||||
if( !count($this->modules) )
|
||||
{
|
||||
$this->registry->output->showError( $this->lang->words['no_login_methods'], 4000 );
|
||||
$this->registry->output->showError( $this->registry->getClass('class_localization')->words['no_login_methods'], 4000 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -672,7 +627,6 @@ class han_login
|
||||
/**
|
||||
* Force email check flag in any modules, currently used for facebook
|
||||
*
|
||||
* @access public
|
||||
* @param boolean
|
||||
* @return null
|
||||
*/
|
||||
@@ -690,7 +644,6 @@ class han_login
|
||||
/**
|
||||
* Checks if password authenticates
|
||||
*
|
||||
* @access public
|
||||
* @param string Username
|
||||
* @param string Email Address
|
||||
* @param string Password
|
||||
@@ -716,7 +669,6 @@ class han_login
|
||||
/**
|
||||
* Authenticate the user - creates account if possible
|
||||
*
|
||||
* @access public
|
||||
* @param string Username
|
||||
* @param string Email Address
|
||||
* @param string Password
|
||||
@@ -727,7 +679,7 @@ class han_login
|
||||
foreach( $this->modules as $k => $obj_reference )
|
||||
{
|
||||
$obj_reference->authenticate( $username, $email_address, $password );
|
||||
$this->return_code = ( $obj_reference->return_code == 'SUCCESS' ? 'SUCCESS' : $obj_reference->return_code );
|
||||
$this->return_code = $obj_reference->return_code;
|
||||
$this->member_data = $obj_reference->member_data;
|
||||
$this->account_unlock = ( $obj_reference->account_unlock ) ? $obj_reference->account_unlock : $this->account_unlock;
|
||||
|
||||
@@ -747,7 +699,7 @@ class han_login
|
||||
// Want to redirect somewhere to login?
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$redirect AND $this->login_methods[ $k ]['login_login_url'] )
|
||||
if( $this->login_methods[ $k ]['login_login_url'] )
|
||||
{
|
||||
$redirect = $this->login_methods[ $k ]['login_login_url'];
|
||||
}
|
||||
@@ -770,7 +722,6 @@ class han_login
|
||||
/**
|
||||
* Logout callback - called when a user logs out
|
||||
*
|
||||
* @access public
|
||||
* @return mixed Possible redirection based on login method config, else array of messages
|
||||
*/
|
||||
public function logoutCallback()
|
||||
@@ -810,7 +761,6 @@ class han_login
|
||||
/**
|
||||
* Alternate login URL redirection
|
||||
*
|
||||
* @access public
|
||||
* @return mixed Possible redirection based on login method config, else false
|
||||
*/
|
||||
public function checkLoginUrlRedirect()
|
||||
@@ -849,7 +799,6 @@ class han_login
|
||||
/**
|
||||
* User maintenance callback
|
||||
*
|
||||
* @access public
|
||||
* @return mixed Possible redirection based on login method config, else false
|
||||
*/
|
||||
public function checkMaintenanceRedirect()
|
||||
@@ -884,12 +833,46 @@ class han_login
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check if the username is already in use
|
||||
*
|
||||
* @param string User Name
|
||||
* @param string Array of member data
|
||||
* @param srting Field to check, members_l_username or members_l_display_name
|
||||
* @return boolean Authenticate successful
|
||||
*/
|
||||
public function nameExistsCheck( $nameToCheck, $memberData, $fieldToCheck='members_l_username' )
|
||||
{
|
||||
$this->return_code = 'METHOD_NOT_DEFINED';
|
||||
|
||||
foreach( $this->modules as $k => $obj_reference )
|
||||
{
|
||||
if( method_exists( $obj_reference, 'nameExistsCheck' ) )
|
||||
{
|
||||
$obj_reference->nameExistsCheck( $nameToCheck, $memberData, $fieldToCheck );
|
||||
$this->return_code = $obj_reference->return_code;
|
||||
|
||||
if( $this->return_code AND !in_array( $this->return_code, array( 'NAME_NOT_IN_USE', 'METHOD_NOT_DEFINED', 'WRONG_AUTH', 'WRONG_OPENID' ) ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $this->return_code AND !in_array( $this->return_code, array( 'NAME_NOT_IN_USE', 'METHOD_NOT_DEFINED', 'WRONG_AUTH', 'WRONG_OPENID' ) ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the email is already in use
|
||||
*
|
||||
* @access public
|
||||
* @param string Email address
|
||||
* @return boolean Authenticate successful
|
||||
*/
|
||||
@@ -924,12 +907,11 @@ class han_login
|
||||
/**
|
||||
* Change a user's email address
|
||||
*
|
||||
* @access public
|
||||
* @param string Old Email address
|
||||
* @param string New Email address
|
||||
* @return boolean Email changed successfully
|
||||
*/
|
||||
public function changeEmail( $old_email, $new_email )
|
||||
public function changeEmail( $old_email, $new_email, $memberData )
|
||||
{
|
||||
$this->return_code = 'METHOD_NOT_DEFINED';
|
||||
|
||||
@@ -937,7 +919,7 @@ class han_login
|
||||
{
|
||||
if( method_exists( $obj_reference, 'changeEmail' ) )
|
||||
{
|
||||
$obj_reference->changeEmail( $old_email, $new_email );
|
||||
$obj_reference->changeEmail( $old_email, $new_email, $memberData );
|
||||
$this->return_code = $obj_reference->return_code;
|
||||
}
|
||||
}
|
||||
@@ -948,12 +930,13 @@ class han_login
|
||||
/**
|
||||
* Change a user's password
|
||||
*
|
||||
* @access public
|
||||
* @param string Email address
|
||||
* @param string New password
|
||||
* @param string Plain Text Password
|
||||
* @param string Member Array
|
||||
* @return boolean Password changed successfully
|
||||
*/
|
||||
public function changePass( $email, $new_pass )
|
||||
public function changePass( $email, $new_pass, $plain_pass, $memberData )
|
||||
{
|
||||
$this->return_code = 'METHOD_NOT_DEFINED';
|
||||
|
||||
@@ -961,8 +944,8 @@ class han_login
|
||||
{
|
||||
if( method_exists( $obj_reference, 'changePass' ) )
|
||||
{
|
||||
$obj_reference->changePass( $email, $new_pass );
|
||||
$this->return_code = $obj_reference->return_code;
|
||||
$obj_reference->changePass( $email, $new_pass, $plain_pass, $memberData );
|
||||
$this->return_code = $this->return_code == 'SUCCESS' ? 'SUCCESS' : $obj_reference->return_code;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -972,13 +955,13 @@ class han_login
|
||||
/**
|
||||
* Change a login name
|
||||
*
|
||||
* @access public
|
||||
* @param string Old Name
|
||||
* @param string New Name
|
||||
* @param string User's email address
|
||||
* @param array Arra of Member Data
|
||||
* @return boolean Request was successful
|
||||
*/
|
||||
public function changeName( $old_name, $new_name, $email_address )
|
||||
public function changeName( $old_name, $new_name, $email_address, $memberData )
|
||||
{
|
||||
$this->return_code = 'METHOD_NOT_DEFINED';
|
||||
|
||||
@@ -986,7 +969,7 @@ class han_login
|
||||
{
|
||||
if( method_exists( $obj_reference, 'changeName' ) )
|
||||
{
|
||||
$obj_reference->changeName( $old_name, $new_name, $email_address );
|
||||
$obj_reference->changeName( $old_name, $new_name, $email_address, $memberData );
|
||||
$this->return_code = $obj_reference->return_code;
|
||||
}
|
||||
}
|
||||
@@ -997,7 +980,6 @@ class han_login
|
||||
/**
|
||||
* Create a user's account
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of member information
|
||||
* @return boolean Account created successfully
|
||||
*/
|
||||
@@ -1025,7 +1007,6 @@ class han_login
|
||||
/**
|
||||
* Determine email address or username login
|
||||
*
|
||||
* @access public
|
||||
* @return integer [1=Username, 2=Email, 3=Both]
|
||||
*/
|
||||
public function emailOrUsername()
|
||||
@@ -1035,6 +1016,12 @@ class han_login
|
||||
|
||||
foreach( $this->login_methods as $k => $method )
|
||||
{
|
||||
if( $method['login_user_id'] == 'either' )
|
||||
{
|
||||
$username = true;
|
||||
$email = true;
|
||||
break;
|
||||
}
|
||||
if( $method['login_user_id'] == 'username' )
|
||||
{
|
||||
$username = true;
|
||||
@@ -1072,7 +1059,6 @@ class han_login
|
||||
/**
|
||||
* Get additional login form HTML add/replace
|
||||
*
|
||||
* @access public
|
||||
* @return mixed Null or Array [0=Add or replace flag, 1=Array of HTML blocks to add/replace with]
|
||||
*/
|
||||
public function additionalFormHTML()
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* BBCode parsing gateway.
|
||||
* Last Updated: $Date: 2009-11-11 20:48:24 -0500 (Wed, 11 Nov 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: 5376 $
|
||||
*
|
||||
* @version $Revision: 7174 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -23,10 +24,24 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
class parseBbcode
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Allowed to update the caches if not present
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $allow_update_caches = true;
|
||||
@@ -34,7 +49,6 @@ class parseBbcode
|
||||
/**
|
||||
* Parse emoticons?
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $parse_smilies = true;
|
||||
@@ -43,7 +57,6 @@ class parseBbcode
|
||||
* Parse HTML?
|
||||
* HIGHLY NOT RECOMMENDED IN MOST CASES
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $parse_html = false;
|
||||
@@ -51,7 +64,6 @@ class parseBbcode
|
||||
/**
|
||||
* Parse bbcode?
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $parse_bbcode = true;
|
||||
@@ -60,7 +72,6 @@ class parseBbcode
|
||||
* Strip quotes?
|
||||
* Strips quotes from the resulting text
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $strip_quotes = false;
|
||||
@@ -68,7 +79,6 @@ class parseBbcode
|
||||
/**
|
||||
* Auto convert newlines to html line breaks
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $parse_nl2br = true;
|
||||
@@ -76,7 +86,6 @@ class parseBbcode
|
||||
/**
|
||||
* Parse wordwrap
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $parse_wordwrap = 0;
|
||||
@@ -84,7 +93,6 @@ class parseBbcode
|
||||
/**
|
||||
* Bypass badwords?
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $bypass_badwords = false;
|
||||
@@ -92,7 +100,6 @@ class parseBbcode
|
||||
/**
|
||||
* Section keyword for parsing area
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $parsing_section = 'post';
|
||||
@@ -100,7 +107,6 @@ class parseBbcode
|
||||
/**
|
||||
* Group id of poster
|
||||
*
|
||||
* @access public
|
||||
* @var int
|
||||
*/
|
||||
public $parsing_mgroup = 0;
|
||||
@@ -108,7 +114,6 @@ class parseBbcode
|
||||
/**
|
||||
* Value of mgroup_others for poster
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $parsing_mgroup_others = '';
|
||||
@@ -116,7 +121,6 @@ class parseBbcode
|
||||
/**
|
||||
* Error code stored
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $error = '';
|
||||
@@ -124,7 +128,6 @@ class parseBbcode
|
||||
/**
|
||||
* Warning code stored
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $warning = '';
|
||||
@@ -132,7 +135,6 @@ class parseBbcode
|
||||
/**
|
||||
* BBCode library object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $bbclass;
|
||||
@@ -140,71 +142,13 @@ class parseBbcode
|
||||
/**
|
||||
* Already loaded the classes?
|
||||
*
|
||||
* @access protected
|
||||
* @var boolean
|
||||
*/
|
||||
protected $classes_loaded = false;
|
||||
|
||||
/**
|
||||
* Registry object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
|
||||
/**
|
||||
* Database object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $DB;
|
||||
|
||||
/**
|
||||
* Settings object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $settings;
|
||||
|
||||
/**
|
||||
* Request object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Language object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $lang;
|
||||
|
||||
/**
|
||||
* Member object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $member;
|
||||
|
||||
/**
|
||||
* Cache object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @param string Parsing method to use
|
||||
* @return void
|
||||
@@ -236,8 +180,9 @@ class parseBbcode
|
||||
/**
|
||||
* Load the required bbcode classes and initialize the object
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
* @todo Needs the new library hook call when implemented
|
||||
* @todo Remove that swith and just check for 'if legacy' => load the other file and change class
|
||||
*/
|
||||
private function _loadClasses()
|
||||
{
|
||||
@@ -247,7 +192,7 @@ class parseBbcode
|
||||
{
|
||||
$_NOW = IPSDebug::getMemoryDebugFlag();
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/bbcode/core.php' );
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/bbcode/core.php', 'class_bbcode_core' );
|
||||
|
||||
IPSDebug::setMemoryDebugFlag( "Require once call for core.php", $_NOW );
|
||||
|
||||
@@ -259,7 +204,7 @@ class parseBbcode
|
||||
break;
|
||||
default:
|
||||
$file = '';//'normal.php';
|
||||
$class = 'class_bbcode_core';
|
||||
$class = $classToLoad;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -280,7 +225,6 @@ class parseBbcode
|
||||
/**
|
||||
* Pass off our settings to our bbcode handler
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _passSettings()
|
||||
@@ -308,7 +252,6 @@ class parseBbcode
|
||||
* Parses the bbcode to be stored into the database.
|
||||
* If all bbcodes are parse on display, this method does nothing really
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw input text to parse
|
||||
* @return string Parsed text ready to be stored in database
|
||||
*/
|
||||
@@ -327,7 +270,6 @@ class parseBbcode
|
||||
* Parses the bbcode to be shown in the STD editor.
|
||||
* If all bbcodes are parse on display, this method does nothing really
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw input text to parse
|
||||
* @return string Parsed text ready to be stored in database
|
||||
*/
|
||||
@@ -346,7 +288,6 @@ class parseBbcode
|
||||
* Parses the bbcode to be shown in the browser. Expects preDbParse has already been done before the save.
|
||||
* If all bbcodes are parse on save, this method does nothing really
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw input text to parse
|
||||
* @return string Parsed text ready to be displayed
|
||||
*/
|
||||
@@ -371,7 +312,6 @@ class parseBbcode
|
||||
* Parses the bbcode to be shown in the polls.
|
||||
* Parses img and url, if enabled
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw input text to parse
|
||||
* @return string Parsed text ready to be displayed
|
||||
*/
|
||||
@@ -390,7 +330,6 @@ class parseBbcode
|
||||
* Converts the STD contents to RTE compatible output
|
||||
* Used when switching editors or taking the bbcode post and putting into the RTE
|
||||
*
|
||||
* @access public
|
||||
* @param string BBCode text
|
||||
* @return string RTE-compatible text
|
||||
*/
|
||||
@@ -434,7 +373,6 @@ class parseBbcode
|
||||
/**
|
||||
* Converts "IP.Board HTML" to regular (RTE) HTML
|
||||
*
|
||||
* @access public
|
||||
* @param string Parsed text
|
||||
* @return string RTE-compatible text
|
||||
*/
|
||||
@@ -448,7 +386,6 @@ class parseBbcode
|
||||
/**
|
||||
* Strip all HTML and bbcode tags
|
||||
*
|
||||
* @access public
|
||||
* @param string BBCode + HTML text
|
||||
* @param boolean Run through pre_edit_parse
|
||||
* @param boolean Check "strip from search" option
|
||||
@@ -464,7 +401,6 @@ class parseBbcode
|
||||
/**
|
||||
* Strip quotes
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw posted text
|
||||
* @return string Raw text with no quotes
|
||||
*/
|
||||
@@ -478,7 +414,6 @@ class parseBbcode
|
||||
/**
|
||||
* Strip emoticons
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw posted text
|
||||
* @return string Raw text with no emoticons
|
||||
*/
|
||||
@@ -492,7 +427,6 @@ class parseBbcode
|
||||
/**
|
||||
* Unconvert emoticons
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw posted text
|
||||
* @return string Raw text with text emoticons
|
||||
*/
|
||||
@@ -506,7 +440,6 @@ class parseBbcode
|
||||
/**
|
||||
* Strip badwords
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw posted text
|
||||
* @return string Raw text with no badwords
|
||||
*/
|
||||
@@ -517,10 +450,22 @@ class parseBbcode
|
||||
return $this->bbclass->badWords( $t );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check against blacklisted URLs
|
||||
*
|
||||
* @param string Raw posted text
|
||||
* @return bool False if blacklisted url present, otherwise true
|
||||
*/
|
||||
public function checkBlacklistUrls( $t )
|
||||
{
|
||||
$this->_passSettings();
|
||||
|
||||
return $this->bbclass->checkBlacklistUrls( $t );
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply word wrapping
|
||||
*
|
||||
* @access public
|
||||
* @param string BBCode + HTML text
|
||||
* @param integer Number of characters to wrap after
|
||||
* @param string Break string
|
||||
@@ -537,7 +482,6 @@ class parseBbcode
|
||||
/**
|
||||
* Make data in quotes "safe"
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw posted text
|
||||
* @return string Raw text safe for use in quote tag
|
||||
*/
|
||||
@@ -551,7 +495,6 @@ class parseBbcode
|
||||
/**
|
||||
* Clean content from XSS (best shot at least)
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw posted text
|
||||
* @param boolean Attempt to fix script tag
|
||||
* @return string Cleaned text
|
||||
@@ -567,7 +510,6 @@ class parseBbcode
|
||||
* Determines if member is viewing images
|
||||
* If not, unparses smilies
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw input text to parse
|
||||
* @return string Parsed text ready to be stored in database
|
||||
*/
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user