Version 3.4.8
This commit is contained in:
1 parent
b45ea0dffb
commit
c603205a25
1398 files changed
+36675
-31023
No files matched your search
@@ -2,20 +2,20 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.6
|
||||
* IP.Board v3.4.8
|
||||
* Twitter plug in for share links library.
|
||||
* This is just the basic fallback twitter share, the front end has JS to do something more fancy
|
||||
*
|
||||
* Created by Matt Mecham
|
||||
* Last Updated: $Date: 2013-02-25 17:56:34 -0500 (Mon, 25 Feb 2013) $
|
||||
* Last Updated: $Date: 2014-09-16 11:37:52 -0400 (Tue, 16 Sep 2014) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mark $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 12023 $
|
||||
* @version $Rev: 12506 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -84,6 +84,34 @@ class sl_print
|
||||
*/
|
||||
public function share( $title, $url )
|
||||
{
|
||||
if ( ! empty( $this->settings['ccs_root_url'] ) )
|
||||
{
|
||||
$_urls = explode( "\n", str_replace( "\r", '', trim( $this->settings['ccs_root_url'] ) ) );
|
||||
$_urls[] = $this->settings['_original_base_url'];
|
||||
$ok = FALSE;
|
||||
|
||||
foreach( $_urls as $_url )
|
||||
{
|
||||
if ( ! empty($_url) AND parse_url( $url, PHP_URL_HOST ) === parse_url( $_url, PHP_URL_HOST ) )
|
||||
{
|
||||
$ok = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ok !== TRUE )
|
||||
{
|
||||
$this->registry->output->showError( 'no_permission', 100234.2, false, null, 403 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( parse_url( $url, PHP_URL_HOST ) !== parse_url( $this->settings['_original_base_url'], PHP_URL_HOST ) )
|
||||
{
|
||||
$this->registry->output->showError( 'no_permission', 100234.3, false, null, 403 );
|
||||
}
|
||||
}
|
||||
|
||||
$title = IPSText::convertCharsets( $title, IPS_DOC_CHAR_SET, 'utf-8' );
|
||||
|
||||
$_qmCount = substr_count( $url, '?' );
|
||||
@@ -98,9 +126,7 @@ class sl_print
|
||||
{
|
||||
$url .= '?forcePrint=1';
|
||||
}
|
||||
|
||||
$url .= '&_k=' . $this->member->form_hash;
|
||||
|
||||
|
||||
$this->registry->output->silentRedirect( $url );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user