Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\modules\admin\system;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -22,6 +22,11 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class _ajax extends \IPS\core\modules\front\system\ajax
|
||||
{
|
||||
/**
|
||||
* @brief Has been CSRF-protected
|
||||
*/
|
||||
public static $csrfProtected = TRUE;
|
||||
|
||||
/**
|
||||
* Save ACP Tabs
|
||||
*
|
||||
@@ -29,7 +34,9 @@ class _ajax extends \IPS\core\modules\front\system\ajax
|
||||
*/
|
||||
protected function saveTabs()
|
||||
{
|
||||
if ( is_array( \IPS\Request::i()->tabOrder ) )
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
|
||||
if ( \is_array( \IPS\Request::i()->tabOrder ) )
|
||||
{
|
||||
$tabs = array();
|
||||
|
||||
@@ -55,6 +62,8 @@ class _ajax extends \IPS\core\modules\front\system\ajax
|
||||
*/
|
||||
protected function searchKeywords()
|
||||
{
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
|
||||
if ( \IPS\IN_DEV )
|
||||
{
|
||||
$url = base64_decode( \IPS\Request::i()->url );
|
||||
@@ -76,7 +85,7 @@ class _ajax extends \IPS\core\modules\front\system\ajax
|
||||
);
|
||||
}
|
||||
|
||||
if( count( $inserts ) )
|
||||
if( \count( $inserts ) )
|
||||
{
|
||||
\IPS\Db::i()->insert( 'core_acp_search_index', $inserts );
|
||||
}
|
||||
@@ -95,7 +104,7 @@ class _ajax extends \IPS\core\modules\front\system\ajax
|
||||
$keywords[ $url ]['keywords'] = array_unique( $entry['keywords'] );
|
||||
}
|
||||
|
||||
\file_put_contents( \IPS\ROOT_PATH . "/applications/{$qs['app']}/data/acpsearch.json", json_encode( $keywords, version_compare( PHP_VERSION, '5.4.0' ) >= 0 ? JSON_PRETTY_PRINT : 0 ) );
|
||||
\file_put_contents( \IPS\ROOT_PATH . "/applications/{$qs['app']}/data/acpsearch.json", json_encode( $keywords, JSON_PRETTY_PRINT ) );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->json( 'ok' );
|
||||
|
||||
Reference in new issue
Block a user