Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* @brief Editor Extension: Admin
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 18 Mar 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ class _Admin
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
@@ -76,11 +76,11 @@ class _Admin
|
||||
{
|
||||
try
|
||||
{
|
||||
$purchase = \IPS\nexus\Purchase::loadFromUrl( new \IPS\Http\Url( $_SERVER['HTTP_REFERER'] ) );
|
||||
$purchase = \IPS\nexus\Purchase::loadFromUrl( \IPS\Http\Url\Friendly::createFromString( $_SERVER['HTTP_REFERER'] ) );
|
||||
$options['ps_id'] = $purchase->id;
|
||||
$options['ps_name'] = $purchase->name;
|
||||
}
|
||||
catch ( \OutOfRangeException $e ) { }
|
||||
catch ( \LogicException $e ) { }
|
||||
}
|
||||
|
||||
$customer->log( 'download', $options );
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Editor Extension: Customer Fields and Notes
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 29 Aug 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -46,7 +46,7 @@ class _Customer
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
@@ -54,9 +54,10 @@ class _Customer
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
{
|
||||
if ( ( $id3 !== 'note' and $member->member_id == $id1 ) or $member->hasAcpRestriction( 'nexus', 'customers', 'customers_view' ) )
|
||||
{
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Editor Extension: Purchase Custom Fields
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 23 Feb 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -46,7 +46,7 @@ class _Purchases
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
@@ -54,12 +54,35 @@ class _Purchases
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
{
|
||||
try
|
||||
{
|
||||
return \IPS\nexus\Purchase::load( $id )->canView( $member );
|
||||
/* If it's in the cart, we have to allow it to be public
|
||||
so the member can see what they're doing. This is only a
|
||||
temporary state */
|
||||
if ( $id3 == 'cart' )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* If it's in an invoice, we can check that */
|
||||
if ( mb_substr( $id3, 0, 7 ) == 'invoice' )
|
||||
{
|
||||
return \IPS\nexus\Invoice::load( intval( mb_substr( $id3, 7 ) ) )->canView( $member );
|
||||
}
|
||||
|
||||
/* If it's in an purchase, we can link to that */
|
||||
if ( $id3 == 'purchase' )
|
||||
{
|
||||
return \IPS\nexus\Purchase::load( $id1 )->canView( $member );
|
||||
}
|
||||
|
||||
/* Still here? Return false */
|
||||
return FALSE;
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
@@ -78,6 +101,26 @@ class _Purchases
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
return \IPS\nexus\Purchase::load( $id2 );
|
||||
/* If it's in the cart, wer obviously can't link to that */
|
||||
if ( $id3 == 'cart' )
|
||||
{
|
||||
throw new \LogicException;
|
||||
}
|
||||
|
||||
/* If it's in an invoice, we can link to that */
|
||||
if ( mb_substr( $id3, 0, 8 ) == 'invoice-' )
|
||||
{
|
||||
$invoice = \IPS\nexus\Invoice::load( intval( mb_substr( $id3, 8 ) ) );
|
||||
return \IPS\Dispatcher::i()->controllerLocation == 'admin' ? $invoice->acpUrl() : $invoice->url();
|
||||
}
|
||||
|
||||
/* If it's in an purchase, we can link to that */
|
||||
if ( $id3 == 'purchase' )
|
||||
{
|
||||
return \IPS\nexus\Purchase::load( $id1 );
|
||||
}
|
||||
|
||||
/* Still here? No idea */
|
||||
throw new \LogicException;
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Editor Extension: Product Reviews
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 5 May 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -46,7 +46,7 @@ class _Store
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
@@ -54,9 +54,10 @@ class _Store
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Editor Extension: Support
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 09 Apr 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -44,9 +44,14 @@ class _Support
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
if ( $field->options['autoSaveKey'] == 'default_content' )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
@@ -54,8 +59,10 @@ class _Support
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -89,10 +96,9 @@ class _Support
|
||||
*/
|
||||
public function htmlPurifierConfig( \HTMLPurifier_Config $config )
|
||||
{
|
||||
$config->set( 'AutoFormat.Linkify', TRUE );
|
||||
$config->set( 'URI.Munge', (string) \IPS\Http\Url::internal( "app=core&module=system&controller=redirect&url=%s&key=%t&resource=%r", 'front' ) );
|
||||
$config->set( 'URI.Munge', \IPS\Settings::i()->base_url . 'index.php?app=core&module=system&controller=redirect&url=%s&key=%t&resource=%r' );
|
||||
$config->set( 'URI.MungeResources', TRUE );
|
||||
$config->set( 'URI.MungeSecretKey', md5( \IPS\Settings::i()->sql_pass . \IPS\Settings::i()->board_url . \IPS\Settings::i()->sql_database ) );
|
||||
$config->set( 'URI.MungeSecretKey', \IPS\Settings::i()->site_secret_key );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user