diff --git a/couch/addons/mosaic/theme/fields/ctx-setters.php b/couch/addons/mosaic/theme/fields/ctx-setters.php index 271d23c..943a167 100644 --- a/couch/addons/mosaic/theme/fields/ctx-setters.php +++ b/couch/addons/mosaic/theme/fields/ctx-setters.php @@ -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 ); @@ -60,7 +60,7 @@ static function _render_fields( $f ){ $formatted_date = "$h:$m"; } } - + $CTX->set( 'k_date_formatted', $formatted_date ); } } diff --git a/couch/addons/repeatable/repeatable.php b/couch/addons/repeatable/repeatable.php index d77168b..36991c8 100644 --- a/couch/addons/repeatable/repeatable.php +++ b/couch/addons/repeatable/repeatable.php @@ -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; } } @@ -165,6 +165,7 @@ static function show_handler( $params, $node ){ 'as_json'=>'0', 'into'=>'', 'scope'=>'', + 'token'=>'', ), $params) ); @@ -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 @@ -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(); diff --git a/couch/folder.php b/couch/folder.php index 150e867..28fb39e 100644 --- a/couch/folder.php +++ b/couch/folder.php @@ -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; }