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,9 +2,9 @@
|
||||
/**
|
||||
* @brief Nexus Application Class
|
||||
* @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 10 Feb 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -148,7 +148,7 @@ class _Application extends \IPS\Application
|
||||
try
|
||||
{
|
||||
$purchase = \IPS\nexus\Purchase::load( $purchaseId );
|
||||
if ( !$purchase->cancelled )
|
||||
if ( $purchase->renewals and !$purchase->cancelled )
|
||||
{
|
||||
$invoice->addItem( \IPS\nexus\Invoice\Item\Renewal::create( $purchase ) );
|
||||
}
|
||||
@@ -166,7 +166,10 @@ class _Application extends \IPS\Application
|
||||
$transaction = new \IPS\nexus\Transaction;
|
||||
$transaction->member = $invoice->member;
|
||||
$transaction->invoice = $invoice;
|
||||
$transaction->method = $gateway;
|
||||
if ( $gateway )
|
||||
{
|
||||
$transaction->method = $gateway;
|
||||
}
|
||||
$transaction->amount = new \IPS\nexus\Money( $_POST['mc_gross'], $_POST['mc_currency'] );
|
||||
$transaction->gw_id = $_POST['txn_id'];
|
||||
$transaction->approve();
|
||||
@@ -210,8 +213,8 @@ class _Application extends \IPS\Application
|
||||
break;
|
||||
|
||||
case 'requests':
|
||||
$myFilters = \IPS\nexus\Support\Request::myFilters();
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', 'nexus_support_requests', array( array( "( dpt_staff='*' OR " . \IPS\Db::i()->findInSet( 'dpt_staff', \IPS\nexus\Support\Department::staffDepartmentPerms() ) . ')' ), $myFilters['whereClause'] ) )->join( 'nexus_support_departments', 'dpt_id=r_department' )->first();
|
||||
$myStream = \IPS\nexus\Support\Stream::myStream();
|
||||
return $myStream->count( \IPS\Member::loggedIn() );
|
||||
break;
|
||||
|
||||
case 'errors':
|
||||
@@ -258,4 +261,90 @@ class _Application extends \IPS\Application
|
||||
{
|
||||
return $module->key == 'store';
|
||||
}
|
||||
|
||||
/**
|
||||
* Default front navigation
|
||||
*
|
||||
* @code
|
||||
|
||||
// Each item...
|
||||
array(
|
||||
'key' => 'Example', // The extension key
|
||||
'app' => 'core', // [Optional] The extension application. If ommitted, uses this application
|
||||
'config' => array(...), // [Optional] The configuration for the menu item
|
||||
'title' => 'SomeLangKey', // [Optional] If provided, the value of this language key will be copied to menu_item_X
|
||||
'children' => array(...), // [Optional] Array of child menu items for this item. Each has the same format.
|
||||
)
|
||||
|
||||
return array(
|
||||
'rootTabs' => array(), // These go in the top row
|
||||
'browseTabs' => array(), // These go under the Browse tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
|
||||
'browseTabsEnd' => array(), // These go under the Browse tab after all other items on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
|
||||
'activityTabs' => array(), // These go under the Activity tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Activity tab may not exist)
|
||||
)
|
||||
* @endcode
|
||||
* @return array
|
||||
*/
|
||||
public function defaultFrontNavigation()
|
||||
{
|
||||
return array(
|
||||
'rootTabs' => array(
|
||||
array(
|
||||
'key' => 'Store',
|
||||
'children' => array(
|
||||
array( 'key' => 'Donations' ),
|
||||
array( 'key' => 'Orders' ),
|
||||
array( 'key' => 'Purchases' ),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'key' => 'Menu',
|
||||
'title' => 'default_menu_item_my_details',
|
||||
'children' => array(
|
||||
array( 'key' => 'Info' ),
|
||||
array( 'key' => 'Addresses' ),
|
||||
array( 'key' => 'Cards' ),
|
||||
array( 'key' => 'BillingAgreements' ),
|
||||
array( 'key' => 'Credit' ),
|
||||
array( 'key' => 'Alternatives' ),
|
||||
array( 'key' => 'Referrals' ),
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'key' => 'CustomItem',
|
||||
'title' => 'default_menu_item_support',
|
||||
'config' => array( 'menu_custom_item_url' => 'app=nexus&module=support&controller=home', 'internal' => 'support' ),
|
||||
'children' => array(
|
||||
array( 'key' => 'Support' ),
|
||||
array( 'key' => 'NetworkStatus' ),
|
||||
)
|
||||
)
|
||||
),
|
||||
'browseTabs' => array(),
|
||||
'browseTabsEnd' => array(),
|
||||
'activityTabs' => array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform some legacy URL parameter conversions
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertLegacyParameters()
|
||||
{
|
||||
/* Support legacy subscriptions */
|
||||
if( isset( \IPS\Request::i()->app ) AND \IPS\Request::i()->app == 'subscriptions' )
|
||||
{
|
||||
/* Redirecting isn't necessary, we just need to route the payment to the appropriate area.
|
||||
@see \IPS\nexus\Application */
|
||||
\IPS\Request::i()->app = 'nexus';
|
||||
\IPS\Request::i()->module = 'payments';
|
||||
\IPS\Request::i()->section = 'receive'; /* It actually looks for section=receive, so make sure we set that */
|
||||
\IPS\Request::i()->controller = 'receive'; /* We set this just to be complete in case anywhere else only looks at controller */
|
||||
\IPS\Request::i()->validate = 'paypal';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user