Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Email template management
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 02 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\modules\admin\customization;
|
||||
@@ -50,9 +49,22 @@ class _emails extends \IPS\Dispatcher\Controller
|
||||
$table->limit = 100;
|
||||
|
||||
/* Default sort options */
|
||||
$table->sortBy = $table->sortBy ?: 'template_name';
|
||||
$table->noSort = array( 'template_name' );
|
||||
$table->sortDirection = $table->sortDirection ?: 'desc';
|
||||
|
||||
$table->quickSearch = function( $val )
|
||||
{
|
||||
$matches = \IPS\Member::loggedIn()->language()->searchCustom( 'emailtpl_', $val, TRUE );
|
||||
if ( count( $matches ) )
|
||||
{
|
||||
return '(' . \IPS\Db::i()->in( '`template_name`', array_keys( $matches ) ) . " OR `template_name` LIKE '%{$val}%')";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "`template_name` LIKE '%{$val}%'";
|
||||
}
|
||||
};
|
||||
|
||||
/* Custom parsers */
|
||||
$table->parsers = array(
|
||||
'template_name' => function( $val, $row )
|
||||
@@ -113,7 +125,7 @@ class _emails extends \IPS\Dispatcher\Controller
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('emailtpl_header');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'title', (string) $table );
|
||||
\IPS\Output::i()->output = (string) $table;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -302,7 +314,7 @@ class _emails extends \IPS\Dispatcher\Controller
|
||||
|
||||
/* Output */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('emailtpl_edit');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'emailtpl_edit', $form );
|
||||
\IPS\Output::i()->output = $form->customTemplate( array( call_user_func_array( array( \IPS\Theme::i(), 'getTemplate' ), array( 'customization', 'core', 'admin' ) ), 'email' ) );;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user