Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -2,18 +2,18 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Share links library.
|
||||
* Created by Matt Mecham
|
||||
* Last Updated: $Date: 2010-01-25 13:21:25 +0000 (Mon, 25 Jan 2010) $
|
||||
* Last Updated: $Date: 2011-10-07 22:31:51 -0400 (Fri, 07 Oct 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5746 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9588 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -25,8 +25,10 @@ class share_links
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
@@ -37,7 +39,7 @@ class share_links
|
||||
/**
|
||||
* Plug in object
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $_plugin;
|
||||
@@ -48,7 +50,7 @@ class share_links
|
||||
* @access public
|
||||
* @param object Registry
|
||||
* @param string Plug in key
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( $registry, $plugin )
|
||||
{
|
||||
@@ -74,6 +76,9 @@ class share_links
|
||||
{
|
||||
return $e->getMessage();
|
||||
}
|
||||
|
||||
/* Verify moderator perms are set */
|
||||
$this->memberData = IPSMember::setUpModerator( $this->memberData );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -105,14 +110,13 @@ class share_links
|
||||
if ( $this->_plugin->requiresPermissionCheck( $data ) !== false )
|
||||
{
|
||||
$_file = IPSLib::getAppDir( $data['data_app'] ) . '/extensions/coreExtensions.php';
|
||||
$_class = $data['data_app'] . 'ShareLinks';
|
||||
$_result = false;
|
||||
|
||||
/* Check for the file */
|
||||
if ( file_exists( $_file ) )
|
||||
if ( is_file( $_file ) )
|
||||
{
|
||||
/* Get the file */
|
||||
require_once( $_file );
|
||||
$_class = IPSLib::loadLibrary( $_file, $data['data_app'] . 'ShareLinks', $data['data_app'] );
|
||||
|
||||
/* Check for the class */
|
||||
if ( class_exists( $_class ) )
|
||||
@@ -153,20 +157,18 @@ class share_links
|
||||
/**
|
||||
* Init the plug in
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string Plug in
|
||||
*/
|
||||
private function _initPlugin( $plugin='' )
|
||||
protected function _initPlugin( $plugin='' )
|
||||
{
|
||||
$plugin = IPSText::alphanumericalClean( $plugin );
|
||||
$parf = IPS_ROOT_PATH . 'sources/classes/share/plugins/';
|
||||
$clarse = 'sl_' . $plugin;
|
||||
$_file = IPS_ROOT_PATH . 'sources/classes/share/plugins/' . IPSText::alphanumericalClean( $plugin ) . '.php';
|
||||
|
||||
/* Goddit? */
|
||||
if ( file_exists( $parf . $plugin . '.php' ) )
|
||||
if ( is_file( $_file ) )
|
||||
{
|
||||
require_once( $parf . $plugin . '.php' );
|
||||
$this->_plugin = new $clarse( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( $_file, 'sl_' . $plugin );
|
||||
$this->_plugin = new $classToLoad( $this->registry );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -262,8 +264,8 @@ class share_links
|
||||
'log_share_key' => $this->_pluginKey,
|
||||
'log_data_app' => $urlParts['data_app'],
|
||||
'log_data_type' => $urlParts['data_type'],
|
||||
'log_data_primary_id' => $urlParts['data_primary_id'],
|
||||
'log_data_secondary_id' => $urlParts['data_secondary_id'] ) );
|
||||
'log_data_primary_id' => intval($urlParts['data_primary_id']),
|
||||
'log_data_secondary_id' => intval($urlParts['data_secondary_id']) ) );
|
||||
|
||||
/* Rebuild caches */
|
||||
$this->rebuildCaches();
|
||||
@@ -334,11 +336,11 @@ class share_links
|
||||
/**
|
||||
* Try and deconstruct the link via app specific processing
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param array Array or URL bits
|
||||
* @return array Array of request data or false
|
||||
*/
|
||||
private function _checkForApps( $url )
|
||||
protected function _checkForApps( $url )
|
||||
{
|
||||
$app_cache = $this->cache->getCache('app_cache');
|
||||
|
||||
@@ -350,14 +352,13 @@ class share_links
|
||||
{
|
||||
/* Setup */
|
||||
$_file = IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/coreExtensions.php';
|
||||
$_class = $app['app_directory'] . 'ShareLinks';
|
||||
|
||||
/* Check for the file */
|
||||
if( file_exists( $_file ) )
|
||||
if( is_file( $_file ) )
|
||||
{
|
||||
/* Get the file */
|
||||
require_once( $_file );
|
||||
|
||||
$_class = IPSLib::loadLibrary( $_file, $app['app_directory'] . 'ShareLinks', $app['app_directory'] );
|
||||
|
||||
/* Check for the class */
|
||||
if( class_exists( $_class ) )
|
||||
{
|
||||
@@ -386,20 +387,22 @@ class share_links
|
||||
/**
|
||||
* Try and deconstruct the link if it's a FURRY FURL
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string Incoming URL
|
||||
* @return array Array of request data or false
|
||||
*/
|
||||
private function _checkForFurl( $url )
|
||||
protected function _checkForFurl( $url )
|
||||
{
|
||||
$_urlBits = array();
|
||||
$_toTest = $url;
|
||||
$templates = array();
|
||||
|
||||
/* Grab FURL data... */
|
||||
if ( ! IN_DEV AND file_exists( DOC_IPS_ROOT_PATH . 'cache/furlCache.php' ) )
|
||||
if ( ! IN_DEV AND is_file( DOC_IPS_ROOT_PATH . 'cache/furlCache.php' ) )
|
||||
{
|
||||
require( DOC_IPS_ROOT_PATH . 'cache/furlCache.php' );
|
||||
$templates = array();
|
||||
include( DOC_IPS_ROOT_PATH . 'cache/furlCache.php' );/*noLibHook*/
|
||||
|
||||
$_seoTemplates = $templates;
|
||||
}
|
||||
else
|
||||
@@ -411,16 +414,14 @@ class share_links
|
||||
{
|
||||
IPSLib::cacheFurlTemplates();
|
||||
}
|
||||
catch( Exception $e )
|
||||
{
|
||||
}
|
||||
catch( Exception $e ) {}
|
||||
}
|
||||
|
||||
if ( is_array( $_seoTemplates ) AND count( $_seoTemplates ) )
|
||||
{
|
||||
foreach( $_seoTemplates as $key => $data )
|
||||
{
|
||||
if ( ! isset( $data['in']['regex'] ) OR ! $data['in']['regex'] )
|
||||
if ( empty( $data['in']['regex'] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -541,11 +542,11 @@ class share_links
|
||||
/**
|
||||
* Explode a URL (foo=bar&baz=umm) into array( 'foo' => 'bar', .... )
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string URL
|
||||
* @return array Values
|
||||
*/
|
||||
private function _explodeUrl( $url )
|
||||
protected function _explodeUrl( $url )
|
||||
{
|
||||
$url = str_replace( '&', '&', $url );
|
||||
$ret = array();
|
||||
|
||||
Reference in new issue
Block a user