Skip to content

Commit

Permalink
Misc. changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kksidd committed May 14, 2019
1 parent 6ffd20e commit 5ef1cfc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions couch/addons/mosaic/theme/fields/ctx-setters.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static function _render_fields( $f ){
$formatted_date .= "@$h:$m";
}
}

if( $f->only_time ){
$h = substr( $date, 11, 2 );
$m = substr( $date, 14, 2 );
Expand All @@ -60,7 +60,7 @@ static function _render_fields( $f ){
$formatted_date = "$h:$m";
}
}

$CTX->set( 'k_date_formatted', $formatted_date );
}
}
Expand Down
9 changes: 8 additions & 1 deletion couch/addons/repeatable/repeatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static function tag_handler( $params, $node ){
$attr = $FUNCS->get_named_vars( array('type'=>'', 'name'=>''), $child_params );
$child_type = strtolower( trim($attr['type']) );
if( $FUNCS->is_core_type($child_type) ){
if( in_array($child_type, array('thumbnail', 'hidden', 'message', 'group')) ){ //unsupported types
if( in_array($child_type, array('thumbnail', 'hidden', 'group')) ){ //unsupported types
continue;
}
}
Expand Down Expand Up @@ -165,6 +165,7 @@ static function show_handler( $params, $node ){
'as_json'=>'0',
'into'=>'',
'scope'=>'',
'token'=>'',
),
$params)
);
Expand All @@ -178,6 +179,7 @@ static function show_handler( $params, $node ){
$as_json = ( $as_json==1 ) ? 1 : 0;
$into = trim( $into );
$scope = strtolower( trim($scope) );
$token = trim( $token );

if( $var ){
// get the data array from CTX
Expand Down Expand Up @@ -222,6 +224,11 @@ static function show_handler( $params, $node ){
$CTX->set_object( 'k_bound_page', $pg );
}

// HOOK: rr_alter_ctx_xxx
if( $token ){
$FUNCS->dispatch_event( 'rr_alter_ctx_'.$token, array($params, $node) );
}

// and call the children providing each row's data
foreach( $node->children as $child ){
$html .= $child->get_HTML();
Expand Down
2 changes: 1 addition & 1 deletion couch/folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ function set_in_context(){
$arr_vars['k_'.$label.'_is_collapsed'] = $f->collapsed;
$arr_vars['k_'.$label.'_data'] = $f->get_data( 1 );
$arr_vars['k_'.$label.'_definition'] = $FUNCS->escape_HTML( $f->_html );
$arr_vars['k_'.$label.'_err_msg'] = $CTX->get( 'k_error_'.$f->name );
$arr_vars['k_'.$label.'_err_msg'] = $f->err_msg;
if($f->system){
$arr_vars['k_'.$label.'_wrapper_id'] = $f->name;
}
Expand Down

0 comments on commit 5ef1cfc

Please sign in to comment.