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 Customization AJAX actions
|
||||
* @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
|
||||
* @since 07 May 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -84,17 +84,7 @@ class _ajax extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
foreach( $templateNames[ $app ][ $location ] as $path => $items )
|
||||
{
|
||||
if ( $path === 'custom' )
|
||||
{
|
||||
foreach( $items as $name => $data )
|
||||
{
|
||||
if ( $name !== 'custom.css' )
|
||||
{
|
||||
unset( $templateNames[ $app ][ $location ][ $path ][ $name ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( $path != 'custom' )
|
||||
{
|
||||
unset( $templateNames[ $app ][ $location ][ $path ] );
|
||||
}
|
||||
@@ -181,7 +171,24 @@ class _ajax extends \IPS\Dispatcher\Controller
|
||||
$where = array();
|
||||
if ( \IPS\Request::i()->term )
|
||||
{
|
||||
$where[] = array( 'LOWER(template_content) LIKE ?', '%' . mb_strtolower( \IPS\Request::i()->term ) . '%' );
|
||||
$where[] = array( '( LOWER(template_name) LIKE ? OR LOWER(template_content) LIKE ? )', '%' . mb_strtolower( \IPS\Request::i()->term ) . '%', '%' . mb_strtolower( \IPS\Request::i()->term ) . '%' );
|
||||
|
||||
/* If searching content we need to specifically only search the templates *actually* being used */
|
||||
$uniqueIds = array();
|
||||
foreach ( $theme->getRawTemplates( '', '', '', \IPS\Theme::RETURN_ALL_NO_CONTENT ) as $locations )
|
||||
{
|
||||
foreach ( $locations as $groups )
|
||||
{
|
||||
foreach ( $groups as $templates )
|
||||
{
|
||||
foreach ( $templates as $template )
|
||||
{
|
||||
$uniqueIds[] = "'" . $template['template_unique_key'] . "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$where[] = array( 'template_unique_key IN (' . implode( ',' , $uniqueIds ) . ')' );
|
||||
}
|
||||
if ( in_array( 'inherited', explode( ',', \IPS\Request::i()->filters ) ) )
|
||||
{
|
||||
@@ -203,6 +210,10 @@ class _ajax extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$where[] = array( 'template_user_edited>0 or template_added_to > 0' );
|
||||
}
|
||||
if ( !in_array( 'modified', explode( ',', \IPS\Request::i()->filters ) ) )
|
||||
{
|
||||
$where[] = array( 'template_added_to=0' );
|
||||
}
|
||||
$where[] = array( 'template_set_id IN (' . implode( ',' , $parents ) . ')' );
|
||||
|
||||
$select = \IPS\Db::i()->select(
|
||||
@@ -247,7 +258,24 @@ class _ajax extends \IPS\Dispatcher\Controller
|
||||
$where = array();
|
||||
if ( \IPS\Request::i()->term )
|
||||
{
|
||||
$where[] = array( 'LOWER(css_content) LIKE ?', '%' . mb_strtolower( \IPS\Request::i()->term ) . '%' );
|
||||
$where[] = array( '( LOWER(css_name) LIKE ? OR LOWER(css_content) LIKE ? )', '%' . mb_strtolower( \IPS\Request::i()->term ) . '%', '%' . mb_strtolower( \IPS\Request::i()->term ) . '%' );
|
||||
|
||||
/* If searching content we need to specifically only search the css files *actually* being used */
|
||||
$uniqueIds = array();
|
||||
foreach ( $theme->getRawCss( '', '', '', \IPS\Theme::RETURN_ALL_NO_CONTENT ) as $locations )
|
||||
{
|
||||
foreach ( $locations as $groups )
|
||||
{
|
||||
foreach ( $groups as $templates )
|
||||
{
|
||||
foreach ( $templates as $template )
|
||||
{
|
||||
$uniqueIds[] = "'" . $template['css_unique_key'] . "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$where[] = array( 'css_unique_key IN (' . implode( ',' , $uniqueIds ) . ')' );
|
||||
}
|
||||
if ( in_array( 'inherited', explode( ',', \IPS\Request::i()->filters ) ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user