Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -13,6 +13,7 @@ namespace IPS\core\modules\front\search;
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use DateInterval;
|
||||
use DateMalformedStringException;
|
||||
use DateTimeZone;
|
||||
use IPS\Application;
|
||||
use IPS\Application\Module;
|
||||
@@ -92,11 +93,15 @@ class search extends Controller
|
||||
protected function _checkCached() : void
|
||||
{
|
||||
/* Check whether a 304 Not modified response is appropriate */
|
||||
if( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) AND ( new DateTime( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) )->getTimestamp() > ( time() - $this->_cacheTimeout ) )
|
||||
try
|
||||
{
|
||||
header('HTTP/1.1 304 Not Modified' );
|
||||
exit;
|
||||
if( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) AND ( new DateTime( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) )->getTimestamp() > ( time() - $this->_cacheTimeout ) )
|
||||
{
|
||||
header('HTTP/1.1 304 Not Modified' );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
catch( DateMalformedStringException ){}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -160,7 +165,7 @@ class search extends Controller
|
||||
}
|
||||
|
||||
/* Data Layer Event */
|
||||
if ( Settings::i()->core_datalayer_enabled AND !Request::i()->isAjax() AND Request::i()->q )
|
||||
if ( DataLayer::enabled() AND !Request::i()->isAjax() AND Request::i()->q )
|
||||
{
|
||||
DataLayer::i()->addEvent( 'search', array( 'query' => Request::i()->q, ) );
|
||||
}
|
||||
@@ -1010,8 +1015,10 @@ class search extends Controller
|
||||
'source' => Content\Tag::allTags(),
|
||||
'minimized' => FALSE,
|
||||
'forceLower' => (bool)Settings::i()->tags_force_lower,
|
||||
'freeChoice' => false
|
||||
'freeChoice' => false,
|
||||
'separator' => ','
|
||||
) ), NULL, NULL, NULL, 'tags' ), NULL, 'search_tab_content' );
|
||||
Member::loggedIn()->language()->words['tags_desc'] = Member::loggedIn()->language()->get( 'tags_search_desc' );
|
||||
$form->add( new Radio( 'eitherTermsOrTags', Request::i()->eitherTermsOrTags, FALSE, array( 'options' => array( 'or' => 'termsortags_or_desc', 'and' => 'termsortags_and_desc' ) ), NULL, NULL, NULL, 'eitherTermsOrTags' ), NULL, 'search_tab_content' );
|
||||
|
||||
/* Author */
|
||||
|
||||
Reference in new issue
Block a user