Version 5.0.14
This commit is contained in:
1 parent
5efe744c5f
commit
dbd774b30c
364 files changed
+7048
-1377
No files matched your search
@@ -279,7 +279,7 @@ class search extends Controller
|
||||
break;
|
||||
|
||||
default:
|
||||
$$l = DateTime::ts( Request::i()->$key );
|
||||
$$l = DateTime::ts( (int) Request::i()->$key );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -646,8 +646,8 @@ class search extends Controller
|
||||
if ( isset( Request::i()->$beforeKey ) and Request::i()->$beforeKey != 'any' and isset( Request::i()->$afterKey ) and Request::i()->$afterKey != 'any' )
|
||||
{
|
||||
/* Javascript takes a date and turns it into a timestamp but does not apply any timezone offsetting, so we don't want to do so here or else the date we create may not be the same one the user chose. */
|
||||
$after = DateTime::ts( Request::i()->$afterKey, TRUE );
|
||||
$before = DateTime::ts( Request::i()->$beforeKey, TRUE );
|
||||
$after = DateTime::ts( (int) Request::i()->$afterKey, TRUE );
|
||||
$before = DateTime::ts( (int) Request::i()->$beforeKey, TRUE );
|
||||
$titleConditions[] = Member::loggedIn()->language()->addToStack( "search_blurb_date_$k", FALSE, array( 'sprintf' => array( Member::loggedIn()->language()->addToStack( "search_blurb_date_between", FALSE, array( 'sprintf' => array( $after->localeDate(), $before->localeDate() ) ) ) ) ) );
|
||||
|
||||
$query->$method( $after, $before );
|
||||
@@ -693,7 +693,7 @@ class search extends Controller
|
||||
break;
|
||||
|
||||
default:
|
||||
$$l = DateTime::ts( Request::i()->$$key );
|
||||
$$l = DateTime::ts( (int) Request::i()->$$key );
|
||||
$dateCondition = Member::loggedIn()->language()->addToStack( "search_blurb_date_{$l}", FALSE, array( 'sprintf' => array( $$l->localeDate() ) ) );
|
||||
break;
|
||||
}
|
||||
@@ -1043,12 +1043,12 @@ class search extends Controller
|
||||
|
||||
/* Dates */
|
||||
$form->add( new Select( 'startDate', ( isset( Request::i()->start_before ) or ( isset( Request::i()->start_after ) and is_numeric( Request::i()->start_after ) ) ) ? 'custom' : Request::i()->start_after, FALSE, array( 'options' => $dateOptions, 'toggles' => array( 'custom' => array( 'elCustomDate_startDate' ) ) ), NULL, NULL, NULL, 'startDate' ), NULL, 'search_tab_content' );
|
||||
$form->add( new DateRange( 'startDateCustom', array( 'start' => ( isset( Request::i()->start_after ) and is_numeric( Request::i()->start_after ) ) ? DateTime::ts( Request::i()->start_after, TRUE ) : NULL, 'end' => isset( Request::i()->start_before ) ? DateTime::ts( Request::i()->start_before, TRUE ) : NULL ), false, array(
|
||||
$form->add( new DateRange( 'startDateCustom', array( 'start' => ( isset( Request::i()->start_after ) and is_numeric( Request::i()->start_after ) ) ? DateTime::ts( (int) Request::i()->start_after, TRUE ) : NULL, 'end' => isset( Request::i()->start_before ) ? DateTime::ts( (int) Request::i()->start_before, TRUE ) : NULL ), false, array(
|
||||
'start' => array( 'timezone' => new DateTimeZone( 'UTC' ), 'time' => FALSE ),
|
||||
'end' => array( 'timezone' => new DateTimeZone( 'UTC' ), 'time' => FALSE )
|
||||
) ), NULL, 'search_tab_content' );
|
||||
$form->add( new Select( 'updatedDate', ( isset( Request::i()->updated_before ) or ( isset( Request::i()->updated_after ) and is_numeric( Request::i()->updated_after ) ) ) ? 'custom' : Request::i()->updated_after, FALSE, array( 'options' => $dateOptions, 'toggles' => array( 'custom' => array( 'elCustomDate_updatedDate' ) ) ), NULL, NULL, NULL, 'updatedDate' ), NULL, 'search_tab_content' );
|
||||
$form->add( new DateRange( 'updatedDateCustom', array( 'start' => ( isset( Request::i()->updated_after ) and is_numeric( Request::i()->updated_after ) ) ? DateTime::ts( Request::i()->updated_after, TRUE ) : NULL, 'end' => isset( Request::i()->updated_before ) ? DateTime::ts( Request::i()->updated_before, TRUE ) : NULL ), false, array(
|
||||
$form->add( new DateRange( 'updatedDateCustom', array( 'start' => ( isset( Request::i()->updated_after ) and is_numeric( Request::i()->updated_after ) ) ? DateTime::ts( (int) Request::i()->updated_after, TRUE ) : NULL, 'end' => isset( Request::i()->updated_before ) ? DateTime::ts( (int) Request::i()->updated_before, TRUE ) : NULL ), false, array(
|
||||
'start' => array( 'timezone' => new DateTimeZone( 'UTC' ), 'time' => FALSE ),
|
||||
'end' => array( 'timezone' => new DateTimeZone( 'UTC' ), 'time' => FALSE )
|
||||
) ), NULL, 'search_tab_content' );
|
||||
@@ -1366,7 +1366,7 @@ class search extends Controller
|
||||
public static function contentTypes( Member|bool $member = TRUE ) : array
|
||||
{
|
||||
$types = array();
|
||||
foreach( Content\Search\SearchContent::searchableClasses() as $class )
|
||||
foreach( Content\Search\SearchContent::searchableClasses( $member instanceof Member ? $member : Member::loggedIn() ) as $class )
|
||||
{
|
||||
if( in_array( 'IPS\Content\Item', class_parents( $class ) ) )
|
||||
{
|
||||
@@ -1374,6 +1374,7 @@ class search extends Controller
|
||||
$types[ $key ] = $class;
|
||||
}
|
||||
}
|
||||
|
||||
return $types;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user